Personal Nix setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Delete cola

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