From 24637dfdfdd6dc8d116542f16a07d808c9e43c36 Mon Sep 17 00:00:00 2001 From: tzlil Date: Tue, 13 Dec 2022 02:15:50 +0200 Subject: first commit --- flake.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') 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"; + }; + }; +} -- cgit 1.4.1