diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..44d5cc5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09"; + inputs.nixpkgs_unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = { self, nixpkgs, nixpkgs_unstable }: { + + nixosConfigurations = let + mkConfig = { hostName, module }: { + name = hostName; + value = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = + [ module + ({...}: { + # Let 'nixos-version --json' know about the Git revision + # of this flake. + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + }) + ]; + }; + }; + myMachines = [ + { hostName = "pincer"; module = ./machines/x1-pincer.nix; } + ]; + in builtins.listToAttrs (map mkConfig myMachines); + + }; +} |