diff --git a/flake.nix b/flake.nix index 90cc37c..d47c138 100644 --- a/flake.nix +++ b/flake.nix @@ -131,7 +131,7 @@ }) ([ "hl-bigbox1" - ]); + ]); in { lib = lib; @@ -202,6 +202,18 @@ ]; }; }; + # NIXOS Framework Homelab + # ------------- + hl-fws1 = makeHLService { + hostName = "hl-fws1"; + configuration = { ... }: { + imports = [ + nixos-hardware.nixosModules.framework-11th-gen-intel + (import (./hosts/hl-fws1.nix) { user = user; }) + ]; + }; + systemStateVersion = "24.05"; + }; } // (builtins.listToAttrs homeLabModulesUsingStable) // (builtins.listToAttrs homeLabModulesUsingUnStable); }; } diff --git a/hosts/hl-fws1.hardware-configuration.nix b/hosts/hl-fws1.hardware-configuration.nix new file mode 100644 index 0000000..b69bba4 --- /dev/null +++ b/hosts/hl-fws1.hardware-configuration.nix @@ -0,0 +1,59 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/2d96049a-938b-4f08-b73a-5baae8eaef2a"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/0B62-BBC0"; + fsType = "vfat"; + }; + + fileSystems."/var/lib/docker/overlay2/0bc719adc0cba6bb20f7a41e6284358ae241ce12b5061bc41a91a9cd90af4b09/merged" = + { + device = "overlay"; + fsType = "overlay"; + }; + + fileSystems."/mnt/EightTerra/NVR" = + { + device = "tnas1.lab.internal:/mnt/EightTerra/NVR"; + fsType = "nfs4"; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/cf34dac4-3757-44a8-9458-14943c60d418"; }]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.br-47d44751bed1.useDHCP = lib.mkDefault true; + # networking.interfaces.br-91bbed946990.useDHCP = lib.mkDefault true; + # networking.interfaces.docker0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s13f0u4.useDHCP = lib.mkDefault true; + # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; + # networking.interfaces.veth767cf6c.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/hl-fws1.nix b/hosts/hl-fws1.nix new file mode 100644 index 0000000..0aff934 --- /dev/null +++ b/hosts/hl-fws1.nix @@ -0,0 +1,15 @@ +{ user }: +{ pkgs, lib, config, ... }: { + imports = [ ./hl-minipc1.hardware-configuration.nix ]; + + # firmware updater + services.fwupd.enable = true; + hardware.framework.enableKmod = true; + homelab.nix.remote-builder.enable = true; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.tmp.useTmpfs = true; +} +