summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2025-07-18 15:43:17 -0500
committerTim Keller <tjk@tjkeller.xyz>2025-07-18 15:47:03 -0500
commitc27fa0a0f9e2ec85cbb7338a263ab1511c86e955 (patch)
tree9d424f30f6ce2346d3ae7a3af62d14738711adfe /modules
parent9fa7418f4120c35d614f219532c30896c4e164c3 (diff)
downloadnixos-c27fa0a0f9e2ec85cbb7338a263ab1511c86e955.tar.xz
nixos-c27fa0a0f9e2ec85cbb7338a263ab1511c86e955.zip
add hardware config and set password for flex-wg-routerHEADmaster
Diffstat (limited to 'modules')
-rw-r--r--modules/archetypes/headless/default.nix1
-rw-r--r--modules/hosts/flex-wg-router/configuration.nix3
-rw-r--r--modules/hosts/flex-wg-router/hardware-configuration.nix45
3 files changed, 49 insertions, 0 deletions
diff --git a/modules/archetypes/headless/default.nix b/modules/archetypes/headless/default.nix
index 5ad4983..b0dfb71 100644
--- a/modules/archetypes/headless/default.nix
+++ b/modules/archetypes/headless/default.nix
@@ -10,4 +10,5 @@
suspend.enable = lib.mkOverride 101 false;
wifi.enable = lib.mkOverride 101 false;
xserver.enable = lib.mkOverride 101 false;
+ users.setPassword.enable = lib.mkOverride 101 false;
}
diff --git a/modules/hosts/flex-wg-router/configuration.nix b/modules/hosts/flex-wg-router/configuration.nix
index 3edb354..f21046d 100644
--- a/modules/hosts/flex-wg-router/configuration.nix
+++ b/modules/hosts/flex-wg-router/configuration.nix
@@ -10,5 +10,8 @@
docker.enable = true;
};
+ # Enable set root password
+ users.setPassword.enable = true;
+
system.stateVersion = "25.05";
}
diff --git a/modules/hosts/flex-wg-router/hardware-configuration.nix b/modules/hosts/flex-wg-router/hardware-configuration.nix
new file mode 100644
index 0000000..01cff6d
--- /dev/null
+++ b/modules/hosts/flex-wg-router/hardware-configuration.nix
@@ -0,0 +1,45 @@
+# Do not modify this file! It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations. Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+ imports =
+ [ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/01eae5fd-a46e-4a36-8a9d-247a0b16bcef";
+ fsType = "btrfs";
+ options = [ "subvol=@" ];
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/345A-436A";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/01eae5fd-a46e-4a36-8a9d-247a0b16bcef";
+ fsType = "btrfs";
+ options = [ "subvol=@home" ];
+ };
+
+ swapDevices = [ ];
+
+ # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+ # (the default) this is the recommended approach. When using systemd-networkd it's
+ # still possible to use this option, but it's recommended to use it in conjunction
+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}