refactor(nixos): centralize physical host defaults #29
@@ -13,19 +13,8 @@
|
||||
./disk.nix
|
||||
];
|
||||
|
||||
# systemd-boot on the EFI system partition.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
|
||||
# Redistributable firmware for the QCA6174 wifi (ath10k blobs).
|
||||
# Intel microcode updates follow from this, so none is declared here.
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# RAM-backed swap, no on-disk swap partition.
|
||||
zramSwap.enable = true;
|
||||
|
||||
# So wifi can be joined from the console.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
@@ -48,13 +37,6 @@
|
||||
vpn-off = ''sudo systemctl stop 'wireguard-wg-home*.service' wireguard-wg-home.target'';
|
||||
};
|
||||
|
||||
# So setup can be driven over the network.
|
||||
# The matching host public keys sit beside this file in plaintext, since
|
||||
# publishing them is their purpose.
|
||||
modules.network.ssh.enable = true;
|
||||
modules.network.ssh.hostKeys.sopsFile = ../../secrets/neogaia.yaml;
|
||||
modules.network.ssh.userKey.sopsFile = ../../secrets/neogaia.yaml;
|
||||
|
||||
modules.monorepo.enable = true;
|
||||
modules.shell.herdr.enable = true;
|
||||
modules.shell.gitea-axi.enable = true;
|
||||
|
||||
@@ -13,13 +13,7 @@
|
||||
./disk.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
@@ -72,10 +66,6 @@
|
||||
|
||||
registry.address.pikachu.self = "10.23.10.102";
|
||||
|
||||
modules.network.ssh.enable = true;
|
||||
modules.network.ssh.hostKeys.sopsFile = ../../secrets/pikachu.yaml;
|
||||
modules.network.ssh.userKey.sopsFile = ../../secrets/pikachu.yaml;
|
||||
|
||||
guests.actualbudget = {
|
||||
enable = true;
|
||||
vlan = 20;
|
||||
|
||||
@@ -12,29 +12,17 @@
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
# systemd-boot on the EFI system partition.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# RAM-backed swap, no on-disk swap partition.
|
||||
zramSwap.enable = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
registry.address.zeus.self = "10.23.50.221";
|
||||
|
||||
modules.network.ssh.enable = true;
|
||||
modules.network.ssh.hostKeys.sopsFile = ../../secrets/zeus.yaml;
|
||||
modules.network.ssh.userKey.sopsFile = ../../secrets/zeus.yaml;
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
let
|
||||
cfg = config.modules.host;
|
||||
user = config.user;
|
||||
hostSecrets = ../secrets + "/${config.networking.hostName}.yaml";
|
||||
passwordSecret = "${user.name}-password";
|
||||
in
|
||||
{
|
||||
@@ -24,7 +25,16 @@ in
|
||||
nix.optimise.automatic = true;
|
||||
nix.optimise.dates = [ "Thu 03:45" ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 15;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
zramSwap.enable = true;
|
||||
|
||||
modules.network.ssh.enable = true;
|
||||
modules.network.ssh.hostKeys.sopsFile = hostSecrets;
|
||||
modules.network.ssh.userKey.sopsFile = hostSecrets;
|
||||
|
||||
services.xserver.xkb.layout = "us";
|
||||
services.xserver.xkb.options = "caps:escape_shifted_capslock";
|
||||
|
||||
Reference in New Issue
Block a user