diff --git a/depot/hosts/ostara/meta.nix b/depot/hosts/ostara/meta.nix index df1b325b..a308f91e 100644 --- a/depot/hosts/ostara/meta.nix +++ b/depot/hosts/ostara/meta.nix @@ -7,7 +7,7 @@ type = "resource"; connection = { port = 62954; - host = "192.168.1.245"; + host = "192.168.1.171"; }; }; }; diff --git a/depot/hosts/ostara/nixos.nix b/depot/hosts/ostara/nixos.nix index 9503a0c3..ecb453f1 100644 --- a/depot/hosts/ostara/nixos.nix +++ b/depot/hosts/ostara/nixos.nix @@ -7,7 +7,6 @@ with lib; imports = with meta; [ profiles.hardware.eeepc-1015pem - profiles.laptop services.kattv ]; @@ -39,10 +38,8 @@ with lib; networking = { hostId = "9f89b327"; useDHCP = false; - wireless.interfaces = [ "wlp2s0" ]; interfaces = { enp1s0.useDHCP = true; - wlp2s0.useDHCP = true; }; }; @@ -50,7 +47,7 @@ with lib; kw.fw = { public = { - interfaces = singleton "wlp2s0"; + interfaces = singleton "enp1s0"; tcp.ports = [ 9981 9982 ]; }; }; diff --git a/depot/hosts/yule/nixos.nix b/depot/hosts/yule/nixos.nix index 9f3b87fe..a84af657 100644 --- a/depot/hosts/yule/nixos.nix +++ b/depot/hosts/yule/nixos.nix @@ -8,7 +8,6 @@ with lib; imports = with meta; [ profiles.hardware.v330-14arr profiles.gui - profiles.laptop users.kat.guiFull services.netdata services.nginx diff --git a/depot/profiles/base/profiles.nix b/depot/profiles/base/profiles.nix index 310421e1..b33fcd8c 100644 --- a/depot/profiles/base/profiles.nix +++ b/depot/profiles/base/profiles.nix @@ -6,7 +6,6 @@ with lib; options = { deploy.profile = { gui = mkEnableOption "Graphical System"; - laptop = mkEnableOption "Laptop (Implies WiFi)"; vfio = mkEnableOption "VFIO"; trusted = mkEnableOption "Trusted Submodule"; hardware = { @@ -14,6 +13,8 @@ with lib; amdgpu = mkEnableOption "AMD GPU"; hcloud-imperative = mkEnableOption "Imperative Hetzner Cloud Setup"; intel = mkEnableOption "Intel CPU"; + laptop = mkEnableOption "Laptop"; + wifi = mkEnableOption "WiFi, home network"; ryzen = mkEnableOption "AMD Ryzen CPU"; ms-7b86 = mkEnableOption "MSI B450-A Pro Max"; rm-310 = mkEnableOption "Intel DQ67OW"; @@ -27,7 +28,6 @@ with lib; ({ superConfig, ... }: { options.deploy.profile = { gui = mkEnableOption "Graphical System"; - laptop = mkEnableOption "Laptop (Implies WiFi)"; vfio = mkEnableOption "VFIO"; trusted = mkEnableOption "Trusted Submodule"; hardware = { @@ -35,6 +35,8 @@ with lib; amdgpu = mkEnableOption "AMD GPU"; hcloud-imperative = mkEnableOption "Imperative Hetzner Cloud Setup"; intel = mkEnableOption "Intel CPU"; + laptop = mkEnableOption "Laptop"; + wifi = mkEnableOption "WiFi, home network"; ryzen = mkEnableOption "AMD Ryzen CPU"; ms-7b86 = mkEnableOption "MSI B450-A Pro Max"; rm-310 = mkEnableOption "Intel DQ67OW"; diff --git a/depot/profiles/hardware/default.nix b/depot/profiles/hardware/default.nix index 3f74eb95..6c27597b 100644 --- a/depot/profiles/hardware/default.nix +++ b/depot/profiles/hardware/default.nix @@ -1,6 +1,10 @@ let hardwareProfiles = { lib }: -let profiles = with profiles; lib.modList { - modulesDir = ./.; +let profiles = with profiles; lib.domainMerge { + folder = ""; # not used in this usage + folderPaths = [ + ./. + ../../trusted/profiles/hardware + ]; } // { ms-7b86 = { imports = [ @@ -20,12 +24,15 @@ let profiles = with profiles; lib.modList { v330-14arr-base ryzen amdgpu + laptop + wifi ]; }; eeepc-1015pem = { imports = [ eeepc-1015pem-base intel + laptop ]; }; }; in profiles; diff --git a/depot/profiles/hardware/laptop/default.nix b/depot/profiles/hardware/laptop/default.nix new file mode 100644 index 00000000..f7cee909 --- /dev/null +++ b/depot/profiles/hardware/laptop/default.nix @@ -0,0 +1,9 @@ +{ config, ... }: + +{ + deploy.profile.hardware.laptop = true; + + imports = [ + ./light.nix + ]; +} diff --git a/depot/profiles/laptop/light.nix b/depot/profiles/hardware/laptop/light.nix similarity index 100% rename from depot/profiles/laptop/light.nix rename to depot/profiles/hardware/laptop/light.nix diff --git a/depot/profiles/hardware/wifi/default.nix b/depot/profiles/hardware/wifi/default.nix new file mode 100644 index 00000000..2823f57d --- /dev/null +++ b/depot/profiles/hardware/wifi/default.nix @@ -0,0 +1,6 @@ +{ config, ... }: + +{ + deploy.profile.hardware.wifi = true; + networking.wireless.enable = true; +} diff --git a/depot/profiles/laptop/default.nix b/depot/profiles/laptop/default.nix deleted file mode 100644 index 6ddb882f..00000000 --- a/depot/profiles/laptop/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - imports = [ ./light.nix ]; - - deploy.profile.laptop = true; -} diff --git a/pkgs/lib/domain-merge.nix b/pkgs/lib/domain-merge.nix index 3ee28cb8..af6e5512 100644 --- a/pkgs/lib/domain-merge.nix +++ b/pkgs/lib/domain-merge.nix @@ -1,10 +1,9 @@ -{ lib }: { folder, defaultFile ? "default.nix" }: with lib; let - folderNames = [ (../../depot + "/${folder}") (../../depot/trusted + "/${folder}") ]; +{ lib }: { folder, defaultFile ? "default.nix", folderPaths ? [ (../../depot + "/${folder}") (../../depot/trusted + "/${folder}") ] }: with lib; let defaultFileFinal = if (defaultFile == "default.nix" && folder == "hosts") then "meta.nix" else defaultFile; - folderModLists = map (folderName: modList { - modulesDir = folderName; + folderModLists = map (folderPath: modList { + modulesDir = folderPath; defaultFile = defaultFileFinal; - }) (filter builtins.pathExists folderNames); + }) (filter builtins.pathExists folderPaths); in foldl modListMerge { } folderModLists