Files
Chickadee/hosts/backup.nix
T

103 lines
2.7 KiB
Nix
Raw Normal View History

2026-09-23 17:39:36 -04:00
{ config, lib, pkgs, modulesPath, ... }:
2026-09-12 17:11:21 -04:00
{
2026-09-21 10:58:46 -04:00
imports = [
2026-09-23 17:39:36 -04:00
(modulesPath + "/installer/scan/not-detected.nix")
2026-09-21 10:58:46 -04:00
2026-09-23 17:39:36 -04:00
../modules/backup-server.nix
../modules/ssh.nix
../lilac.nix
2026-09-21 10:58:46 -04:00
];
2026-09-12 17:11:21 -04:00
2026-09-23 17:39:36 -04:00
networking.hostName = "backup";
2026-09-12 17:11:21 -04:00
2026-09-23 17:39:36 -04:00
time.timeZone = "America/Winnipeg";
2026-09-12 17:11:21 -04:00
2026-09-23 17:39:36 -04:00
systemd.sleep.settings.Sleep = {
AllowSuspend = "no";
AllowHibernation = "no";
AllowHybridSleep = "no";
AllowSuspendThenHibernate = "no";
};
2026-09-12 17:11:21 -04:00
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
2026-09-23 17:39:36 -04:00
networking.wireless.enable = true;
networking.networkmanager.enable = true;
2026-09-12 17:11:21 -04:00
networking = {
firewall = {
enable = true;
allowedUDPPorts = [ 51820 ];
trustedInterfaces = [ "wg0" ];
};
wireguard.interfaces."wg0" = {
2026-09-23 17:39:36 -04:00
ips = [ "10.0.0.4/32" ];
2026-09-12 17:11:21 -04:00
generatePrivateKeyFile = true;
privateKeyFile = "/var/lib/wireguard/wg0.key";
peers = [{
publicKey = "Tst6SiqoGLSoOAF9l5vT2vvR2RGJ/mFcoBL3BL5n90k=";
allowedIPs = [ "10.0.0.0/24" ];
endpoint = "216.128.177.13:51820";
persistentKeepalive = 25;
}];
};
};
nixpkgs.config.allowUnfree = true;
2026-09-23 17:39:36 -04:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2026-09-12 17:11:21 -04:00
system.stateVersion = "26.05";
2026-09-23 17:39:36 -04:00
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
fileSystems."/" = {
device = "/dev/disk/by-uuid/61b493e0-8c91-b7d1-4e336da06ff0";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E157-E223";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2026-09-12 17:11:21 -04:00
}