diff options
| author | seth <[email protected]> | 2023-01-27 05:48:52 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-01-27 05:48:52 -0500 |
| commit | 6dd3d7415b0a9388b6fdbff6d39ba5ad8123283c (patch) | |
| tree | e6df5cd7e08b3c434d3918498fb934f1501206b3 | |
| parent | d4cb82429ce0f531cac1a2d6e1b256c5d1b5f726 (diff) | |
stop repeating things for hosts
| -rw-r--r-- | hosts/glados-wsl/default.nix | 18 | ||||
| -rw-r--r-- | hosts/glados/default.nix | 17 | ||||
| -rw-r--r-- | util/host.nix | 12 |
3 files changed, 12 insertions, 35 deletions
diff --git a/hosts/glados-wsl/default.nix b/hosts/glados-wsl/default.nix index fa4a750..b9057cf 100644 --- a/hosts/glados-wsl/default.nix +++ b/hosts/glados-wsl/default.nix @@ -1,23 +1,7 @@ -{ - config, - modulesPath, - pkgs, - ... -}: { +{modulesPath, ...}: { imports = [ (modulesPath + "/profiles/minimal.nix") - ../common - ../../users/seth ]; sys.wsl.enable = true; - - # enable non-free packages - nixpkgs.config.allowUnfree = true; - - # Enable nix flakes - nix.package = pkgs.nixFlakes; - nix.settings.experimental-features = ["nix-command" "flakes"]; - - system.stateVersion = "22.11"; } diff --git a/hosts/glados/default.nix b/hosts/glados/default.nix index d6eba70..3a5e2a0 100644 --- a/hosts/glados/default.nix +++ b/hosts/glados/default.nix @@ -1,27 +1,12 @@ -{ - modulesPath, - pkgs, - ... -}: { +_: { imports = [ - (modulesPath + "/profiles/base.nix") - ../common ../common/desktop/gnome.nix ../common/hardware/nvidia.nix ./boot.nix ./network.nix ./packages.nix ./services.nix - ../../users/seth ]; - # enable non-free packages - nixpkgs.config.allowUnfree = true; - - # Enable nix flakes - nix.package = pkgs.nixFlakes; - nix.settings.experimental-features = ["nix-command" "flakes"]; - - system.stateVersion = "23.05"; sys.gui.enable = true; } diff --git a/util/host.nix b/util/host.nix index 048f39c..8c3ab91 100644 --- a/util/host.nix +++ b/util/host.nix @@ -3,6 +3,7 @@ name, modules, system ? "x86_64-linux", + version ? "22.11", pkgs, }: with pkgs.lib; @@ -12,9 +13,16 @@ [ ../hosts/common - { + ({pkgs, ...}: { + system.stateVersion = version; networking.hostName = mkDefault name; - } + # enable non-free packages + nixpkgs.config.allowUnfree = true; + + # Enable nix flakes + nix.package = pkgs.nixFlakes; + nix.settings.experimental-features = ["nix-command" "flakes"]; + }) home-manager.nixosModules.home-manager { |
