diff --git a/machines/hephaestus/configuration.nix b/machines/hephaestus/configuration.nix index a56b41d..7c8572d 100644 --- a/machines/hephaestus/configuration.nix +++ b/machines/hephaestus/configuration.nix @@ -1,4 +1,6 @@ { config +, lib +, modulesPath , pkgs , unstable , ... @@ -19,15 +21,87 @@ let ]; in { - imports = [ ./hardware.nix ]; - hardware.opengl.enable = true; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - nixpkgs.config = { - allowUnfree = true; - permittedInsecurePackages = [ - "nix-2.16.2" + boot = { + extraModulePackages = with config.boot.kernelPackages; [ + xpadneo ]; + kernelModules = [ "kvm-amd" ]; + kernelPackages = pkgs.linuxPackages; + + loader = { + efi.canTouchEfiVariables = true; + efi.efiSysMountPoint = "/boot/efi"; + grub = { + enable = true; + device = "nodev"; + efiSupport = true; + enableCryptodisk = true; + }; + }; + + supportedFilesystems = [ "ntfs" ]; + + initrd = { + availableKernelModules = [ + "ahci" + "nvme" + "sd_mod" + "usb_storage" + "usbhid" + "xhci_pci" + ]; + luks.devices."root" = { + allowDiscards = true; + device = "/dev/disk/by-uuid/21cd166c-1528-49a4-b31b-0d408d48aa80"; + preLVM = true; + keyFile = "./keyfile0.bin"; + }; + secrets = { + "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin"; + }; + }; + }; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/a6723178-6f18-428e-b541-9ac901861125"; + fsType = "ext4"; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-uuid/e3ab2e1a-bddf-4ae0-b00a-bf954c6c182b"; + fsType = "ext4"; + }; + + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/3CFD-D749"; + fsType = "vfat"; + }; + + fileSystems."/mnt/synology-2b/media" = { + device = "192.168.1.178:/volume1/Media"; + fsType = "nfs"; + }; + + fileSystems."/mnt/synology-2b/backups" = { + device = "192.168.1.178:/volume1/Backups"; + fsType = "nfs"; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/5d6d0388-2b15-4ff1-9f0f-391818a76090"; } + ]; + + nixpkgs = { + hostPlatform = "x86_64-linux"; + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "nix-2.16.2" + ]; + }; }; networking = { @@ -46,9 +120,6 @@ in systemd.services.NetworkManager-wait-online.enable = false; - boot.kernelPackages = pkgs.linuxPackages; - boot.supportedFilesystems = [ "ntfs" ]; - system = { autoUpgrade.enable = true; stateVersion = "23.11"; @@ -73,19 +144,21 @@ in time.timeZone = "America/Toronto"; - hardware.pulseaudio.enable = true; + hardware = { + opengl.enable = true; + cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + pulseaudio.enable = true; + # Vulkan + opengl.driSupport = true; + opengl.driSupport32Bit = true; + # Steam + opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ]; + pulseaudio.support32Bit = true; + }; - # Vulkan - hardware.opengl.driSupport = true; - hardware.opengl.driSupport32Bit = true; - - # Steam - hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ]; - hardware.pulseaudio.support32Bit = true; programs.steam = { enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + remotePlay.openFirewall = true; }; virtualisation = { diff --git a/machines/hephaestus/hardware.nix b/machines/hephaestus/hardware.nix deleted file mode 100644 index 62ac533..0000000 --- a/machines/hephaestus/hardware.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ config -, lib -, pkgs -, modulesPath -, ... -}: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - nixpkgs.hostPlatform = "x86_64-linux"; - - boot.initrd.availableKernelModules = [ - "ahci" - "nvme" - "sd_mod" - "usb_storage" - "usbhid" - "xhci_pci" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ - xpadneo - ]; - - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.efi.efiSysMountPoint = "/boot/efi"; - - boot.loader.grub = { - enable = true; - device = "nodev"; - efiSupport = true; - enableCryptodisk = true; - }; - - boot.initrd = { - luks.devices."root" = { - allowDiscards = true; - device = "/dev/disk/by-uuid/21cd166c-1528-49a4-b31b-0d408d48aa80"; - preLVM = true; - keyFile = "./keyfile0.bin"; - }; - secrets = { - "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin"; - }; - }; - - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/a6723178-6f18-428e-b541-9ac901861125"; - fsType = "ext4"; - }; - - fileSystems."/home" = { - device = "/dev/disk/by-uuid/e3ab2e1a-bddf-4ae0-b00a-bf954c6c182b"; - fsType = "ext4"; - }; - - fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/3CFD-D749"; - fsType = "vfat"; - }; - - fileSystems."/mnt/synology-2b/media" = { - device = "192.168.1.178:/volume1/Media"; - fsType = "nfs"; - }; - - fileSystems."/mnt/synology-2b/backups" = { - device = "192.168.1.178:/volume1/Backups"; - fsType = "nfs"; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/5d6d0388-2b15-4ff1-9f0f-391818a76090"; } - ]; -} diff --git a/outputs.nix b/outputs.nix index 601f2cb..a17379b 100644 --- a/outputs.nix +++ b/outputs.nix @@ -74,7 +74,6 @@ modules = [ ./machines/hephaestus/configuration.nix - ./machines/hephaestus/hardware.nix ./services/netdata/default.nix ] ++ defaultModules;