summary refs log tree commit diff
path: root/hosts/default.nix
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-07-29 20:53:14 +0300
committertzlil <tzlils@protonmail.com>2023-07-29 20:53:14 +0300
commitfeefcfc89b00d4955dbb3314c20be035f3db206f (patch)
tree5099a13763dcfd274cae83af4dbac0bf4bef6cce /hosts/default.nix
parent11526bdd2bb3b4b445665aa671e4bc72021b8183 (diff)
disko for laptop, wip rewrite
Diffstat (limited to 'hosts/default.nix')
-rw-r--r--hosts/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/hosts/default.nix b/hosts/default.nix
new file mode 100644
index 0000000..0b9bd1c
--- /dev/null
+++ b/hosts/default.nix
@@ -0,0 +1,47 @@
+inputs: let
+  commonProfiles = [
+    {
+      imports = [
+        ../profiles/nix.nix
+        ../profiles/tzlil.nix
+        ../profiles/security.nix
+        ../profiles/ssh.nix
+      ];
+    }
+    inputs.agenix.nixosModules.age
+    inputs.impermanence.nixosModules.impermanence
+  ];
+
+  commonHome = [
+    inputs.home-manager.nixosModule
+    {
+      home-manager = {
+        useGlobalPkgs = true;
+        extraSpecialArgs = {inherit inputs;};
+      };
+    }
+  ];
+
+  nixinate = host: {
+    _module.args.nixinate = {
+      inherit host;
+      sshUser = "tzlil";
+      buildOn = "remote"; # valid args are "local" or "remote"
+      substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s"
+      hermetic = false;
+    };
+  };
+in {
+  navi = inputs.nixpkgs.lib.nixosSystem {
+    system = "x86_64-linux";
+    specialArgs = {inherit inputs;};
+    modules =
+      [
+        "${inputs.self}/hosts/navi"
+        {networking.hostName = "navi";}
+        (nixinate "navi")
+      ]
+      ++ commonProfiles
+      ++ commonHome;
+  };
+}