refactor(nixos): centralize physical host defaults
This commit was merged in pull request #29.
This commit is contained in:
@@ -13,19 +13,8 @@
|
|||||||
./disk.nix
|
./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;
|
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.
|
# So wifi can be joined from the console.
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
@@ -48,13 +37,6 @@
|
|||||||
vpn-off = ''sudo systemctl stop 'wireguard-wg-home*.service' wireguard-wg-home.target'';
|
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.monorepo.enable = true;
|
||||||
modules.shell.herdr.enable = true;
|
modules.shell.herdr.enable = true;
|
||||||
modules.shell.gitea-axi.enable = true;
|
modules.shell.gitea-axi.enable = true;
|
||||||
|
|||||||
@@ -13,13 +13,7 @@
|
|||||||
./disk.nix
|
./disk.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
|
|
||||||
zramSwap.enable = true;
|
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -72,10 +66,6 @@
|
|||||||
|
|
||||||
registry.address.pikachu.self = "10.23.10.102";
|
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 = {
|
guests.actualbudget = {
|
||||||
enable = true;
|
enable = true;
|
||||||
vlan = 20;
|
vlan = 20;
|
||||||
|
|||||||
@@ -12,29 +12,17 @@
|
|||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
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;
|
boot.kernelPackages = pkgs.linuxPackages_cachyos;
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# RAM-backed swap, no on-disk swap partition.
|
|
||||||
zramSwap.enable = true;
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
registry.address.zeus.self = "10.23.50.221";
|
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 = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
let
|
let
|
||||||
cfg = config.modules.host;
|
cfg = config.modules.host;
|
||||||
user = config.user;
|
user = config.user;
|
||||||
|
hostSecrets = ../secrets + "/${config.networking.hostName}.yaml";
|
||||||
passwordSecret = "${user.name}-password";
|
passwordSecret = "${user.name}-password";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -24,7 +25,16 @@ in
|
|||||||
nix.optimise.automatic = true;
|
nix.optimise.automatic = true;
|
||||||
nix.optimise.dates = [ "Thu 03:45" ];
|
nix.optimise.dates = [ "Thu 03:45" ];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.systemd-boot.configurationLimit = 15;
|
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.layout = "us";
|
||||||
services.xserver.xkb.options = "caps:escape_shifted_capslock";
|
services.xserver.xkb.options = "caps:escape_shifted_capslock";
|
||||||
|
|||||||
Reference in New Issue
Block a user