about summary refs log tree commit diff
path: root/hosts/default.nix
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-17 19:09:27 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-17 19:09:27 +0200
commitad58b57df7b298bc3e25c578f590d44da3ce36c9 (patch)
tree28be43da790fa014e13a7284e5a5979537a8721a /hosts/default.nix
downloadnixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.tar.gz
nixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.tar.bz2
nixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.zip
Initial commit
Diffstat (limited to 'hosts/default.nix')
-rw-r--r--hosts/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/hosts/default.nix b/hosts/default.nix
new file mode 100644
index 0000000..f6814c5
--- /dev/null
+++ b/hosts/default.nix
@@ -0,0 +1,40 @@
+{ user, lib, nixpkgs, nur, inputs, home-manager, ... }:
+let
+  system = "x86_64-linux"; # System architecture
+
+  pkgs = import nixpkgs {
+    inherit system;
+    config.allowUnfree = true; # Allow proprietary software
+    overlays = [
+      nur.overlay
+      (import ../packages)
+      (import ../overlays/base.nix)
+    ];
+  };
+
+  inherit (nixpkgs.lib);
+
+  secrets = import ../secrets;
+in
+{
+  phobos =
+    let hostname = "phobos";
+    in
+    lib.nixosSystem {
+      inherit system;
+      specialArgs = { inherit pkgs inputs user secrets hostname; };
+      modules = [
+        ./configuration.nix
+        ./phobos
+        home-manager.nixosModules.home-manager
+        {
+          home-manager.useGlobalPkgs = true;
+          home-manager.useUserPackages = true;
+          home-manager.extraSpecialArgs = { inherit pkgs user secrets hostname inputs; };
+          home-manager.users.${user} = {
+            imports = [ ./home.nix ] ++ [ (import ./phobos/home.nix) ];
+          };
+        }
+      ];
+    };
+}