diff options
| author | Preston Pan <ret2pop@gmail.com> | 2025-09-07 20:48:46 -0700 |
|---|---|---|
| committer | Preston Pan <ret2pop@gmail.com> | 2025-09-07 20:48:46 -0700 |
| commit | 5b8d09f2d7ebb7a1670c695af5761353d5b76d7e (patch) | |
| tree | 7cd2d1d4a30012e325c38d5bda65e83e6a48b5d6 /nix/flake.nix | |
| parent | 5146b2fa654b469eaf425345797d58f0126de4b9 (diff) | |
create drive abstractions and entry points for disko
Diffstat (limited to 'nix/flake.nix')
| -rw-r--r-- | nix/flake.nix | 15 |
1 files changed, 14 insertions, 1 deletions
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; |
