summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2022-12-13 02:15:50 +0200
committertzlil <tzlils@protonmail.com>2022-12-13 02:15:50 +0200
commit24637dfdfdd6dc8d116542f16a07d808c9e43c36 (patch)
tree369b5fb04e408604d481984b35aa02523217dbfd /flake.nix
first commit
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix31
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";
+    };
+  };
+}