diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..299e906 --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + description = "tzlil's system"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + impermanence.url = "github:nix-community/impermanence"; + agenix.url = "github:ryantm/agenix"; + nixos-hardware.url = "github:nixos/nixos-hardware"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = inputs: let + mkSystem_ = pkgs: system: h: modules: + pkgs.lib.nixosSystem { + system = system; + modules = [./hosts/${h}/cfg.nix] ++ modules; + specialArgs = {inherit inputs;}; + }; + mkSystem = pkgs: system: h: (mkSystem_ pkgs system h [ + inputs.agenix.nixosModule inputs.impermanence.nixosModules.impermanence + ]); + in { + nixosConfigurations = { + # pc = mkSystem inputs.nixpkgs "x86_64-linux" "pc"; + vm = mkSystem inputs.nixpkgs "x86_64-linux" "vm"; + }; + }; +} |