diff options
| author | Christian <[email protected]> | 2026-04-17 12:03:46 -0500 |
|---|---|---|
| committer | Christian <[email protected]> | 2026-04-17 12:03:46 -0500 |
| commit | b37bb85cd72dc3aca02aaa99d944f92ce75246f2 (patch) | |
| tree | bc185b306e5af248b866240dcc4771845811b760 /hosts | |
| parent | 0b77660443280e0dbfccf1b55785ea6db5ac2d62 (diff) | |
Formatting
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/desktop/configuration.nix | 20 | ||||
| -rw-r--r-- | hosts/desktop/hardware-configuration.nix | 58 | ||||
| -rw-r--r-- | hosts/hyper-v/configuration.nix | 22 | ||||
| -rw-r--r-- | hosts/hyper-v/hardware-configuration.nix | 40 | ||||
| -rw-r--r-- | hosts/laptop/configuration.nix | 20 | ||||
| -rw-r--r-- | hosts/laptop/hardware-configuration.nix | 36 |
6 files changed, 127 insertions, 69 deletions
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 810fa8b..e276b17 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: let unstable = import inputs.nixpkgs-unstable { @@ -8,11 +14,11 @@ let }; in { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../modules/common.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../modules/common.nix + ]; boot.loader.grub = { enable = true; @@ -25,7 +31,7 @@ in networking.hostName = "desktop"; networking.wireless.iwd.enable = true; networking.wireless.iwd.settings = { - General.EnableNetworkConfiguration = true; + General.EnableNetworkConfiguration = true; }; networking.nameservers = [ "1.1.1.1" diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index cc0c460..fb2980b 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -1,20 +1,33 @@ # 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, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; boot.kernelParams = [ - "amdgpu.noretry=0" # Allows the GPU to retry memory access instead of crashing - "amdgpu.gpureset=1" # Enables better recovery if a fault occurs + "amdgpu.noretry=0" # Allows the GPU to retry memory access instead of crashing + "amdgpu.gpureset=1" # Enables better recovery if a fault occurs "amdgpu.pcie_gen_cap=0x00040000" # Forces PCIe 4.0 if your board is being weird ]; @@ -27,16 +40,19 @@ ]; }; - fileSystems."/" = - { device = "/dev/disk/by-uuid/e09483ea-5fb4-472d-99ba-3d4dc9560400"; - fsType = "btrfs"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/e09483ea-5fb4-472d-99ba-3d4dc9560400"; + fsType = "btrfs"; + }; - fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/B29A-4911"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/B29A-4911"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; zramSwap = { enable = true; @@ -45,10 +61,12 @@ priority = 100; }; - swapDevices = [ { - device = "/swap/swapfile"; - size = 32 * 1024; - } ]; + swapDevices = [ + { + device = "/swap/swapfile"; + size = 32 * 1024; + } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/hosts/hyper-v/configuration.nix b/hosts/hyper-v/configuration.nix index 8da08c2..77da89b 100644 --- a/hosts/hyper-v/configuration.nix +++ b/hosts/hyper-v/configuration.nix @@ -1,18 +1,24 @@ -{config, lib, pkgs, inputs, ...}: +{ + config, + lib, + pkgs, + inputs, + ... +}: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../modules/common.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../modules/common.nix + ]; networking.hostName = "hyper-v"; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - + # Hyper-V setup virtualisation.hypervGuest.enable = true; services.xrdp.enable = true; @@ -29,7 +35,7 @@ --replace-fail "#vmconnect=true" "vmconnect=true" \ --replace-fail "security_layer=negotiate" "security_layer=rdp" \ --replace-fail "crypt_level=high" "crypt_level=none" \ - ''; + ''; services.xserver.displayManager.lightdm.enable = false; diff --git a/hosts/hyper-v/hardware-configuration.nix b/hosts/hyper-v/hardware-configuration.nix index 0417079..4a2d311 100644 --- a/hosts/hyper-v/hardware-configuration.nix +++ b/hosts/hyper-v/hardware-configuration.nix @@ -1,30 +1,42 @@ # 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, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ ]; - boot.initrd.availableKernelModules = [ "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ + "sd_mod" + "sr_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/11857814-2a7a-4aaa-82bd-7ecea40117d3"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/1FB1-AF5C"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/11857814-2a7a-4aaa-82bd-7ecea40117d3"; + fsType = "ext4"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/5cfd31ff-439c-4829-b575-92ea76bec3c4"; } + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/1FB1-AF5C"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/5cfd31ff-439c-4829-b575-92ea76bec3c4"; } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; virtualisation.hypervGuest.enable = true; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index edc7306..87cd2a3 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -1,11 +1,17 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../modules/common.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../modules/common.nix + ]; boot.loader.grub = { enable = true; @@ -18,7 +24,7 @@ networking.hostName = "laptop"; networking.wireless.iwd.enable = true; networking.wireless.iwd.settings = { - General.EnableNetworkConfiguration = true; + General.EnableNetworkConfiguration = true; }; networking.nameservers = [ "1.1.1.1" diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix index 291f635..6ad14c8 100644 --- a/hosts/laptop/hardware-configuration.nix +++ b/hosts/laptop/hardware-configuration.nix @@ -1,27 +1,37 @@ # 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, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "rtsx_pci_sdmmc" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/56ae0488-d952-41d8-8128-60a46e979d91"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/56ae0488-d952-41d8-8128-60a46e979d91"; + fsType = "ext4"; + }; - fileSystems."/boot/efi" = - { device = "/dev/disk/by-label/ESP"; - fsType = "vfat"; - }; + fileSystems."/boot/efi" = { + device = "/dev/disk/by-label/ESP"; + fsType = "vfat"; + }; swapDevices = [ ]; |
