Personal Nix setup

Delete cola

Changed files
-145
machines
-55
machines/cola/configuration.nix
···
-
{ user, ... }:
-
-
{
-
imports = [
-
./hardware.nix
-
./zfs.nix
-
];
-
-
users.users."${user}" = {
-
isNormalUser = true;
-
extraGroups = [ "wheel" ];
-
hashedPassword = "$6$DEmCOeiSFe6ymGox$WMWddbT9PkkfDT6JS4WuJsM3mQHI0e9kg0t42UowO79dWAcSU0K//KKlcebSosoMRz5mUEw5TFvbrv1aRHqYa/";
-
};
-
-
modules = {
-
router = {
-
enable = true;
-
interfaces = {
-
external = {
-
name = "extern0";
-
macAddress = "1c:1b:0d:eb:ab:15";
-
};
-
internal = {
-
name = "intern0";
-
macAddress = "1c:1b:0d:eb:ab:14";
-
cidr = "10.0.0.1/24";
-
};
-
};
-
dnsmasq.leases = [
-
{ macAddress = "98:ed:7e:c6:57:b2"; ipAddress = "10.0.0.102"; } # eero router
-
{ macAddress = "c4:f1:74:51:4c:f2"; ipAddress = "10.0.0.124"; } # eero router
-
{ macAddress = "5c:61:99:7a:16:40"; ipAddress = "10.0.0.103"; } # brother printer
-
{ macAddress = "24:e8:53:95:e4:02"; ipAddress = "10.0.0.96"; } # tv
-
{ macAddress = "34:7e:5c:31:4f:fa"; ipAddress = "10.0.0.56"; } # sonos
-
{ macAddress = "e8:9c:25:6c:40:6f"; ipAddress = "10.0.0.150"; } # pepper-pc
-
];
-
nftables.blockForward = [
-
"ec:e5:12:1d:23:40" # tado
-
];
-
};
-
-
server = {
-
enable = true;
-
caddy.exposeFolders.files = "/share/files";
-
hd-idle.enable = true;
-
home-assistant.enable = true;
-
jellyfin.enable = true;
-
tailscale.enable = true;
-
vaultwarden.enable = true;
-
};
-
};
-
-
system.stateVersion = "23.05";
-
}
-
···
-71
machines/cola/hardware.nix
···
-
{ config, lib, inputs, modulesPath, ... }:
-
-
{
-
imports = with inputs; [
-
nixos-hardware.nixosModules.common-cpu-intel
-
nixos-hardware.nixosModules.common-pc-ssd
-
nixos-hardware.nixosModules.common-pc
-
(modulesPath + "/installer/scan/not-detected.nix")
-
];
-
-
networking.hostId = "af93534a";
-
-
boot = {
-
initrd = {
-
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "uas" "sd_mod" ];
-
kernelModules = [ ];
-
};
-
kernelParams = [ "mitigations=off" "systemd.unified_cgroup_hierarchy=false" ];
-
kernelModules = [ "kvm-intel" ];
-
extraModulePackages = [ ];
-
supportedFilesystems = [ "btrfs" ];
-
-
loader = {
-
systemd-boot.enable = true;
-
efi.canTouchEfiVariables = true;
-
};
-
-
resumeDevice = "/dev/disk/by-label/NIXSWAP";
-
};
-
-
fileSystems."/" = {
-
device = "/dev/disk/by-label/NIXROOT";
-
fsType = "btrfs";
-
options = [ "subvol=@root" "noatime" ];
-
};
-
-
fileSystems."/boot" = {
-
device = "/dev/disk/by-label/NIXBOOT";
-
fsType = "vfat";
-
options = [ "defaults" "noatime" ];
-
};
-
-
fileSystems."/nix" = {
-
device = "/dev/disk/by-label/NIXROOT";
-
fsType = "btrfs";
-
options = [ "subvol=@nix" "noatime" "compress=zstd" ];
-
};
-
-
fileSystems."/home" = {
-
device = "/dev/disk/by-label/NIXROOT";
-
fsType = "btrfs";
-
options = [ "subvol=@home" "noatime" ];
-
};
-
-
fileSystems."/var/log" = {
-
device = "/dev/disk/by-label/NIXROOT";
-
fsType = "btrfs";
-
options = [ "subvol=@log" "noatime" ];
-
};
-
-
swapDevices = [
-
{ device = "/dev/disk/by-label/NIXSWAP"; }
-
];
-
-
# enable Intel microcode update and firmware
-
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-
hardware.enableAllFirmware = true;
-
-
# enable media acceleration
-
hardware.graphics.enable = true;
-
}
···
-1
machines/cola/home.nix
···
-
{ ... }: {}
···
-18
machines/cola/zfs.nix
···
-
{ config, ... }:
-
-
{
-
boot = {
-
supportedFilesystems = [ "zfs" ];
-
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
-
zfs.extraPools = [ "colapool" ];
-
};
-
-
services.zfs = {
-
expandOnBoot = [ "colapool" ];
-
autoScrub = {
-
pools = [ "colapool" ];
-
interval = "Sun, 05:00";
-
enable = true;
-
};
-
};
-
}
···