mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Ostara rework - extend domainMerge
This commit is contained in:
parent
a9b7332d3c
commit
2c512aeb7b
10 changed files with 34 additions and 22 deletions
|
|
@ -7,7 +7,7 @@
|
|||
type = "resource";
|
||||
connection = {
|
||||
port = 62954;
|
||||
host = "192.168.1.245";
|
||||
host = "192.168.1.171";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 ];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ with lib;
|
|||
imports = with meta; [
|
||||
profiles.hardware.v330-14arr
|
||||
profiles.gui
|
||||
profiles.laptop
|
||||
users.kat.guiFull
|
||||
services.netdata
|
||||
services.nginx
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
9
depot/profiles/hardware/laptop/default.nix
Normal file
9
depot/profiles/hardware/laptop/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
deploy.profile.hardware.laptop = true;
|
||||
|
||||
imports = [
|
||||
./light.nix
|
||||
];
|
||||
}
|
||||
6
depot/profiles/hardware/wifi/default.nix
Normal file
6
depot/profiles/hardware/wifi/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
deploy.profile.hardware.wifi = true;
|
||||
networking.wireless.enable = true;
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./light.nix ];
|
||||
|
||||
deploy.profile.laptop = true;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue