summaryrefslogtreecommitdiff
path: root/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'configuration.nix')
-rw-r--r--configuration.nix21
1 files changed, 18 insertions, 3 deletions
diff --git a/configuration.nix b/configuration.nix
index 2b48913..4382d53 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -1,7 +1,22 @@
-{ ... }:
+{ lib, ... }:
let
- host = import ./host.nix;
+ host = import ./hosts.nix;
+ # system = import ./system.nix;
in
+assert lib.assertMsg (
+ host.type != "home"
+) "${host.name} is a Home Manager host; use home-manager instead.";
{
- imports = [ (./hosts + "/${host.name}.nix") ];
+ imports = [
+ # system.module
+ (./hosts + "/${host.name}.nix")
+ ]
+ ++ lib.optional (host.type == "nixos") (./hosts/hardware-configurations + "/${host.name}.nix");
+
+ nixpkgs.hostPlatform = host.system;
+ # nix.settings.nix-path = lib.mkDefault system.module.nix.nixPath;
+
+ security.sudo.extraConfig = ''
+ Defaults env_keep += "NIX_HOST"
+ '';
}