From 5b8d09f2d7ebb7a1670c695af5761353d5b76d7e Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sun, 7 Sep 2025 20:48:46 -0700 Subject: create drive abstractions and entry points for disko --- nix/flake.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'nix/flake.nix') diff --git a/nix/flake.nix b/nix/flake.nix index 021bcce..cffec96 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -42,13 +42,19 @@ "spontaneity" # add hostnames here ]; + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + generate = nixos-dns.utils.generate nixpkgs.legacyPackages."${system}"; + dnsConfig = { inherit (self) nixosConfigurations; extraConfig = import ./dns/default.nix; }; + + # function that generates all systems from hostnames mkConfigs = map (hostname: {name = "${hostname}"; value = nixpkgs.lib.nixosSystem { inherit system; @@ -78,10 +84,17 @@ ]; }; }); + + mkDiskoFiles = map (hostname: { + name = "${hostname}"; + value = self.nixosConfigurations."${hostname}".config.monorepo.vars.myDiskoSpec; + }); + in { - # add new systems here nixosConfigurations = builtins.listToAttrs (mkConfigs hostnames); + evalDisko = builtins.listToAttrs (mkDiskoFiles (builtins.filter (x: x != "installer") hostnames)); + topology."${system}" = import nix-topology { pkgs = import nixpkgs { inherit system; -- cgit v1.3