diff --git a/nixos/workstation/designare/default.nix b/nixos/workstation/designare/default.nix deleted file mode 100644 index 31c15391..00000000 --- a/nixos/workstation/designare/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -# Motherboard: Gigabye Z390 Designare -# CPU: Intel i9 9900K -# GPU: Radeon RX6800 -# GPU: NVIDIA T600 -# CAP: Magewell Pro Capture Dual HDMI 11080 -# RAM: 128GB DDR4 -# NVME: 512GB Samsung 960 Pro -# NVME: 2TB Samsung 960 Pro -# Storage: Sedna PCIe Dual 2.5 Inch SATA III (6G) SSD Adapter -# SATA: 1TB SanDisk SSD Plus -# SATA: 1TB SanDisk SSD Plus - -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.common-cpu-intel - inputs.nixos-hardware.nixosModules.common-gpu-amd - inputs.nixos-hardware.nixosModules.common-gpu-nvidia - inputs.nixos-hardware.nixosModules.common-pc - inputs.nixos-hardware.nixosModules.common-pc-ssd - (import ./disks.nix { }) - ../_mixins/hardware/systemd-boot.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/maestral.nix - ../_mixins/services/openrazer.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/tailscale.nix - ../_mixins/services/zerotier.nix - ../_mixins/virt - ]; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - blacklistedKernelModules = lib.mkDefault [ "nouveau" ]; - initrd.availableKernelModules = [ "ahci" "nvme" "uas" "usbhid" "sd_mod" "xhci_pci" ]; - kernelModules = [ "amdgpu" "kvm-intel" "nvidia" ]; - kernelPackages = pkgs.linuxPackages_6_3; - }; - - environment.systemPackages = with pkgs; [ - nvtop - ]; - - hardware = { - mwProCapture.enable = true; - nvidia = { - prime = { - amdgpuBusId = "PCI:3:0:0"; - nvidiaBusId = "PCI:4:0:0"; - # Make the Radeon RX6800 default. The NVIDIA T600 is for CUDA/NVENC - reverseSync.enable = true; - }; - nvidiaSettings = false; - }; - }; - - services = { - hardware.openrgb = { - enable = true; - motherboard = "intel"; - package = pkgs.openrgb-with-all-plugins; - }; - xserver.videoDrivers = [ "amdgpu" "nvidia" ]; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/designare/disks.nix b/nixos/workstation/designare/disks.nix deleted file mode 100644 index 160f9f6d..00000000 --- a/nixos/workstation/designare/disks.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ disks ? [ "/dev/nvme0n1" "/dev/nvme1n1" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme0 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "ESP"; - start = "0%"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - nvme1 = { - type = "disk"; - device = builtins.elemAt disks 1; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "home"; - start = "0%"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/home"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -} diff --git a/nixos/workstation/glass/default.nix b/nixos/workstation/glass/default.nix index fa302732..972d6617 100644 --- a/nixos/workstation/glass/default.nix +++ b/nixos/workstation/glass/default.nix @@ -25,7 +25,7 @@ in ../../_mixins/desktop/steam.nix ../../_mixins/hardware/systemd-boot.nix ../../_mixins/services/pipewire.nix - ../../_mixins/services/tailscale.nix + ../../_mixins/services/tailscale-autoconnect.nix ../../_mixins/virt ]; diff --git a/nixos/workstation/kuroi/default.nix b/nixos/workstation/kuroi/default.nix index 3c014873..29761f5f 100644 --- a/nixos/workstation/kuroi/default.nix +++ b/nixos/workstation/kuroi/default.nix @@ -15,11 +15,14 @@ inputs.nixos-hardware.nixosModules.common-pc inputs.nixos-hardware.nixosModules.common-pc-ssd + # fix for nixos-rebuild hangups on certain hardware + ../../_mixins/hardware/disable-nm-wait.nix + ../../_mixins/hardware/systemd-boot.nix ../../_mixins/services/pipewire.nix ../../_mixins/services/tailscale.nix ../../_mixins/services/yubikey.nix - ../../_mixins/virt + ../../_mixins/virt/podman.nix ]; boot = { @@ -47,7 +50,7 @@ # communication discord - signal-desktop + element-desktop slack zoom-us diff --git a/nixos/workstation/micropc/default.nix b/nixos/workstation/micropc/default.nix deleted file mode 100644 index d3b4e807..00000000 --- a/nixos/workstation/micropc/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.common-cpu-intel - inputs.nixos-hardware.nixosModules.common-gpu-intel - inputs.nixos-hardware.nixosModules.gpd-micropc - (import ./disks.nix { }) - ../_mixins/hardware/systemd-boot.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/zerotier.nix - ../_mixins/virt - ]; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - initrd.availableKernelModules = [ - "ahci" - "nvme" - "rtsx_pci_sdmmc" - "sd_mod" - "sdhci_pci" - "uas" - "usbhid" - "usb_storage" - "xhci_pci" - ]; - kernelModules = [ "kvm-intel" ]; - kernelPackages = pkgs.linuxPackages_latest; - }; - - # My GPD MicroPC has a US keyboard layout - console.keyMap = lib.mkForce "us"; - services.kmscon.extraConfig = lib.mkForce '' - font-size=14 - xkb-layout=us - ''; - services.xserver.layout = lib.mkForce "us"; - - environment.systemPackages = with pkgs; [ - nvtop-amd - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/micropc/disks.nix b/nixos/workstation/micropc/disks.nix deleted file mode 100644 index d8718bd7..00000000 --- a/nixos/workstation/micropc/disks.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ disks ? [ "/dev/sda" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme0 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "ESP"; - start = "0%"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -} diff --git a/nixos/workstation/p1/default.nix b/nixos/workstation/p1/default.nix deleted file mode 100644 index 8d37cf1d..00000000 --- a/nixos/workstation/p1/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -# Lenovo ThinkPad P1 Gen 1 - -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 - inputs.nixos-hardware.nixosModules.common-gpu-intel - inputs.nixos-hardware.nixosModules.common-gpu-nvidia - inputs.nixos-hardware.nixosModules.common-hidpi - (import ./disks.nix { }) - ../_mixins/hardware/systemd-boot.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/maestral.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/tailscale.nix - ../_mixins/services/zerotier.nix - ../_mixins/virt - ]; - - # disko does manage mounting of / /boot /home, but I want to mount by-partlabel - fileSystems."/" = lib.mkForce { - device = "/dev/disk/by-partlabel/root"; - fsType = "xfs"; - options = [ "defaults" "relatime" "nodiratime" ]; - }; - - fileSystems."/boot" = lib.mkForce { - device = "/dev/disk/by-partlabel/ESP"; - fsType = "vfat"; - }; - - fileSystems."/home" = lib.mkForce { - device = "/dev/disk/by-partlabel/home"; - fsType = "xfs"; - options = [ "defaults" "relatime" "nodiratime" ]; - }; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - blacklistedKernelModules = lib.mkDefault [ "nouveau" ]; - initrd.availableKernelModules = [ "xhci_pci" "nvme" "uas" "usb_storage" "sd_mod" ]; - kernelModules = [ "i915" "kvm-intel" "nvidia" ]; - kernelPackages = pkgs.linuxPackages_latest; - loader.systemd-boot.consoleMode = "max"; - }; - - environment.systemPackages = with pkgs; [ - nvtop - ]; - - hardware = { - nvidia = { - prime = { - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - # Make the Intel iGPP default. The NVIDIA Quadro is for CUDA/NVENC - reverseSync.enable = true; - }; - nvidiaSettings = false; - }; - }; - - # libfprint-2-tod1-vfs0090 in nixpkgs is from https://gitlab.freedesktop.org/3v1n0/libfprint-tod-vfs0090 - # - Supports Validity Sensor 138a:0090 and 138a:0097 - # The ThinkPad P1 Gen 1 has a Synaptics Sensor 06cb:009a; the project below supports it - # - https://gitlab.com/bingch/libfprint-tod-vfs0090 - # - https://github.com/uunicorn/python-validity - # - https://github.com/tester1969/pam-validity - # TODO: Package the above project as libfprint-2-tod1-vfs009a - services.fprintd = { - enable = lib.mkDefault false; - #tod.enable = true; - #tod.driver = pkgs.libfprint-2-tod1-vfs0090; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/p1/disks.nix b/nixos/workstation/p1/disks.nix deleted file mode 100644 index 1baf2a42..00000000 --- a/nixos/workstation/p1/disks.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ disks ? [ "/dev/nvme1n1" "/dev/nvme0n1" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme1 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "ESP"; - start = "0%"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - nvme0 = { - type = "disk"; - device = builtins.elemAt disks 1; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "home"; - start = "0%"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/home"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -} diff --git a/nixos/workstation/p2-max/default.nix b/nixos/workstation/p2-max/default.nix deleted file mode 100644 index f298969b..00000000 --- a/nixos/workstation/p2-max/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.gpd-p2-max - (import ./disks.nix { }) - ../_mixins/hardware/systemd-boot.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/zerotier.nix - ../_mixins/virt - ]; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "uas" "sd_mod" ]; - kernelModules = [ "kvm-intel" ]; - kernelPackages = pkgs.linuxPackages_latest; - }; - - # My GPD P2 Max has a US keyboard layout - console.keyMap = lib.mkForce "us"; - services.kmscon.extraConfig = lib.mkForce '' - font-size=18 - xkb-layout=us - ''; - services.xserver.layout = lib.mkForce "us"; - - environment.systemPackages = with pkgs; [ - nvtop-amd - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/p2-max/disks.nix b/nixos/workstation/p2-max/disks.nix deleted file mode 100644 index 48517fc4..00000000 --- a/nixos/workstation/p2-max/disks.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ disks ? [ "/dev/nvme0n1" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme0 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "ESP"; - start = "0%"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -} diff --git a/nixos/workstation/ripper/default.nix b/nixos/workstation/ripper/default.nix deleted file mode 100644 index 301fe9c2..00000000 --- a/nixos/workstation/ripper/default.nix +++ /dev/null @@ -1,104 +0,0 @@ -# Motherboard: Gigabye TRX40 DESIGNARE -# CPU: AMD Ryzen Threadripper 3970X -# GPU: Radeon RX 6700 -# GPU: NVIDIA T1000 -# CAP: Magewell Pro Capture Quad HDMI -# RAM: 256GB DDR4 -# NVME: 500GB Corsair MP600 -# NVME: 1TB Corsair MP600 -# NVME: 4TB Corsair MP510 -# NVME: 4TB Corsair MP510 -# SATA: 12TB -# SATA: 12TB -# Storage: AORUS Gen4 AIC Adaptor -# NVME: AORUS NVMe Gen4 SSD 2TB -# NVME: AORUS NVMe Gen4 SSD 2TB -# NVME: AORUS NVMe Gen4 SSD 2TB -# NVME: AORUS NVMe Gen4 SSD 2TB - -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.common-cpu-amd - inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate - inputs.nixos-hardware.nixosModules.common-gpu-amd - inputs.nixos-hardware.nixosModules.common-gpu-nvidia - inputs.nixos-hardware.nixosModules.common-pc - inputs.nixos-hardware.nixosModules.common-pc-ssd - (import ./disks.nix { }) - ../_mixins/hardware/systemd-boot.nix - ../_mixins/hardware/streamdeck.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/maestral.nix - ../_mixins/services/openrazer.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/tailscale.nix - ../_mixins/services/zerotier.nix - ../_mixins/virt - ]; - - # disko does manage mounting / and /boot, but I want to mount by-partlabel - fileSystems."/" = lib.mkForce { - device = "/dev/disk/by-partlabel/root"; - fsType = "xfs"; - options = [ "defaults" "relatime" "nodiratime" ]; - }; - - fileSystems."/boot" = lib.mkForce { - device = "/dev/disk/by-partlabel/ESP"; - fsType = "vfat"; - }; - - fileSystems."/mnt/archive" = { - device = "/dev/disk/by-label/archive"; - fsType = "xfs"; - options = [ "defaults" "relatime" "nodiratime" ]; - }; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - blacklistedKernelModules = lib.mkDefault [ "nouveau" ]; - initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - kernelModules = [ "amdgpu" "kvm-amd" "nvidia" ]; - kernelPackages = lib.mkDefault pkgs.linuxPackages_6_1; - }; - - environment.systemPackages = with pkgs; [ - nvtop - ]; - - hardware = { - mwProCapture.enable = true; - nvidia = { - prime = { - amdgpuBusId = "PCI:23:0:0"; - nvidiaBusId = "PCI:3:0:0"; - # Make the Radeon RX6700 default. The NVIDIA T1000 is on for CUDA/NVENC - reverseSync.enable = true; - }; - nvidiaSettings = false; - }; - }; - - services = { - cron = { - enable = true; - systemCronJobs = [ - "*/30 * * * * martin /home/martin/Scripts/backup/sync-legoworlds.sh >> /home/martin/Games/Steam_Backups/legoworlds.log" - "42 * * * * martin /home/martin/Scripts/backup/sync-hotshotracing.sh >> /home/martin/Games/Steam_Backups/hotshotracing.log" - ]; - }; - hardware.openrgb = { - enable = true; - motherboard = "amd"; - package = pkgs.openrgb-with-all-plugins; - }; - xserver.videoDrivers = [ "amdgpu" "nvidia" ]; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/ripper/disks.nix b/nixos/workstation/ripper/disks.nix deleted file mode 100644 index 640b360b..00000000 --- a/nixos/workstation/ripper/disks.nix +++ /dev/null @@ -1,202 +0,0 @@ -# nvme0n1 500GB: Windows 11 -# nvme1n1 1TB: NixOS -# nvme2n1 4TB: Snapshot RAID-0 -# nvme3n1 4TB: Snapshot RAID-0 -# nvme4n1 2TB: Home RAID-5 -# nvme5n1 2TB: Home RAID-5 -# nvme6n1 2TB: Home RAID-5 -# nvme7n1 2TB: Home RAID-5 -# sda 12TB: Archive -# sdb 12TB: Archive -{ disks ? [ "/dev/nvme1n1" "/dev/nvme2n1" "/dev/nvme3n1" "/dev/nvme4n1" "/dev/nvme5n1" "/dev/nvme6n1" "/dev/nvme7n1" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme1 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "ESP"; - start = "0%"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - # Snapshot RAID-0 - nvme2 = { - type = "disk"; - device = builtins.elemAt disks 1; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "snapshot-nvme2"; - start = "0%"; - end = "100%"; - content = { - type = "mdraid"; - name = "snapshot"; - }; - }]; - }; - }; - nvme3 = { - type = "disk"; - device = builtins.elemAt disks 2; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "snapshot-nvme3"; - start = "0%"; - end = "100%"; - content = { - type = "mdraid"; - name = "snapshot"; - }; - }]; - }; - }; - # Home RAID-5 - nvme4 = { - type = "disk"; - device = builtins.elemAt disks 3; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "home-nvme4"; - start = "0%"; - end = "100%"; - content = { - type = "mdraid"; - name = "home"; - }; - }]; - }; - }; - nvme5 = { - type = "disk"; - device = builtins.elemAt disks 4; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "home-nvme5"; - start = "0%"; - end = "100%"; - content = { - type = "mdraid"; - name = "home"; - }; - }]; - }; - }; - nvme6 = { - type = "disk"; - device = builtins.elemAt disks 5; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "home-nvme6"; - start = "0%"; - end = "100%"; - content = { - type = "mdraid"; - name = "home"; - }; - }]; - }; - }; - nvme7 = { - type = "disk"; - device = builtins.elemAt disks 6; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "home-nvme7"; - start = "0%"; - end = "100%"; - content = { - type = "mdraid"; - name = "home"; - }; - }]; - }; - }; - }; - mdadm = { - snapshot = { - type = "mdadm"; - level = 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "primary"; - start = "0%"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/mnt/snapshot"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - home = { - type = "mdadm"; - level = 5; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "primary"; - start = "0%"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/home"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -} diff --git a/nixos/workstation/trooper/default.nix b/nixos/workstation/trooper/default.nix deleted file mode 100644 index ed6367b0..00000000 --- a/nixos/workstation/trooper/default.nix +++ /dev/null @@ -1,87 +0,0 @@ -# Motherboard: ROG Crosshair VIII Impact -# CPU: AMD Ryzen 9 5950X -# GPU: NVIDIA RTX 3080Ti -# RAM: 64GB DDR4 -# NVME: 2TB Corsair MP600 -# NVME: 4TB Corsair MP600 -# SATA: 4TB Samsung 870 QVO -# SATA: 4TB Samsung 870 QVO - -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.common-cpu-amd - inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate - inputs.nixos-hardware.nixosModules.common-gpu-nvidia - inputs.nixos-hardware.nixosModules.common-pc - inputs.nixos-hardware.nixosModules.common-pc-ssd - (import ./disks.nix { }) - ../_mixins/hardware/systemd-boot.nix - ../_mixins/hardware/streamdeck.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/maestral.nix - ../_mixins/services/openrazer.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/tailscale.nix - ../_mixins/services/zerotier.nix - ../_mixins/virt - ]; - - # disko does manage mounting of / /boot /home, but I want to mount by-partlabel - fileSystems."/" = lib.mkForce { - device = "/dev/disk/by-partlabel/root"; - fsType = "xfs"; - options = [ "defaults" "relatime" "nodiratime" ]; - }; - - fileSystems."/boot" = lib.mkForce { - device = "/dev/disk/by-partlabel/ESP"; - fsType = "vfat"; - }; - - fileSystems."/home" = lib.mkForce { - device = "/dev/disk/by-partlabel/home"; - fsType = "xfs"; - options = [ "defaults" "relatime" "nodiratime" ]; - }; - - # UUID=ac6a2f42-bf5b-42bf-bbb2-2bb83a6af615 /mnt/snapshot auto defaults,x-parent=0f904a98:9d3109df:867172aa:c68c98f0 0 0 - fileSystems."/mnt/snapshot" = { - device = "/dev/disk/by-label/snapshot"; - fsType = "xfs"; - options = [ "defaults" "relatime" "nodiratime" ]; - }; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - blacklistedKernelModules = lib.mkDefault [ "nouveau" ]; - initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ]; - initrd.kernelModules = [ "nvidia" ]; - kernelModules = [ "kvm-amd" "nvidia" ]; - kernelPackages = pkgs.linuxPackages_latest; - }; - - environment.systemPackages = with pkgs; [ - gwe - nvtop-nvidia - ]; - - hardware = { - nvidia.prime.offload.enable = false; - xone.enable = true; - }; - - services = { - hardware.openrgb = { - enable = true; - motherboard = "amd"; - package = pkgs.openrgb-with-all-plugins; - }; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/trooper/disks.nix b/nixos/workstation/trooper/disks.nix deleted file mode 100644 index 077f2b9f..00000000 --- a/nixos/workstation/trooper/disks.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ disks ? [ "/dev/nvme0n1" "/dev/nvme1n1" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme1 = { - type = "disk"; - device = builtins.elemAt disks 1; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "boot"; - start = "0%"; - end = "1M"; - flags = [ "bios_grub" ]; - } - { - name = "ESP"; - start = "1M"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - nvme0 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "home"; - start = "0%"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/home"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -} diff --git a/nixos/workstation/win-max/default.nix b/nixos/workstation/win-max/default.nix deleted file mode 100644 index 5b75fcd5..00000000 --- a/nixos/workstation/win-max/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.common-cpu-intel - inputs.nixos-hardware.nixosModules.common-gpu-intel - inputs.nixos-hardware.nixosModules.common-pc-laptop - inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd - (import ./disks.nix { }) - ../_mixins/hardware/gpd-win-max.nix - ../_mixins/hardware/systemd-boot.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/zerotier.nix - ../_mixins/desktop/steam.nix - ]; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" "sdhci_pci" ]; - kernelModules = [ "kvm-intel" ]; - kernelPackages = pkgs.linuxPackages_latest; - }; - - environment.systemPackages = with pkgs; [ - nvtop-amd - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/win-max/disks.nix b/nixos/workstation/win-max/disks.nix deleted file mode 100644 index 48517fc4..00000000 --- a/nixos/workstation/win-max/disks.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ disks ? [ "/dev/nvme0n1" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme0 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "ESP"; - start = "0%"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -} diff --git a/nixos/workstation/win2/default.nix b/nixos/workstation/win2/default.nix deleted file mode 100644 index c8c539c7..00000000 --- a/nixos/workstation/win2/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.common-cpu-intel - inputs.nixos-hardware.nixosModules.common-gpu-intel - inputs.nixos-hardware.nixosModules.gpd-win-2 - (import ./disks.nix { }) - ../_mixins/hardware/systemd-boot.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/zerotier.nix - ../_mixins/desktop/steam.nix - ]; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" "sdhci_pci" ]; - kernelModules = [ "kvm-intel" ]; - kernelPackages = pkgs.linuxPackages_latest; - }; - - # My GPD Win2 has a US keyboard layout - console.keyMap = lib.mkForce "us"; - services.kmscon.extraConfig = lib.mkForce '' - font-size=14 - xkb-layout=us - ''; - services.xserver.layout = lib.mkForce "us"; - - environment.systemPackages = with pkgs; [ - nvtop-amd - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/win2/disks.nix b/nixos/workstation/win2/disks.nix deleted file mode 100644 index d8718bd7..00000000 --- a/nixos/workstation/win2/disks.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ disks ? [ "/dev/sda" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme0 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "ESP"; - start = "0%"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -} diff --git a/nixos/workstation/zed/default.nix b/nixos/workstation/zed/default.nix deleted file mode 100644 index 693cbbc3..00000000 --- a/nixos/workstation/zed/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ inputs, lib, pkgs, ... }: -{ - imports = [ - inputs.nixos-hardware.nixosModules.lenovo-thinkpad-z13 - (import ./disks.nix { }) - ../_mixins/hardware/systemd-boot.nix - ../_mixins/services/bluetooth.nix - ../_mixins/services/maestral.nix - ../_mixins/services/pipewire.nix - ../_mixins/services/tailscale.nix - ../_mixins/services/zerotier.nix - ../_mixins/virt - ]; - - swapDevices = [{ - device = "/swap"; - size = 2048; - }]; - - boot = { - initrd = { - availableKernelModules = [ - "ahci" - "nvme" - "rtsx_pci_sdmmc" - "sd_mod" - "sdhci_pci" - "uas" - "usbhid" - "usb_storage" - "xhci_pci" - ]; - }; - kernelModules = [ "amdgpu" "kvm-amd" ]; - kernelPackages = pkgs.linuxPackages_latest; - }; - - services.kmscon.extraConfig = lib.mkForce '' - font-size=18 - xkb-layout=gb - ''; - - environment.systemPackages = with pkgs; [ - nvtop-amd - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/nixos/workstation/zed/disks.nix b/nixos/workstation/zed/disks.nix deleted file mode 100644 index 48517fc4..00000000 --- a/nixos/workstation/zed/disks.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ disks ? [ "/dev/nvme0n1" ], ... }: -let - defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ]; -in -{ - disko.devices = { - disk = { - nvme0 = { - type = "disk"; - device = builtins.elemAt disks 0; - content = { - type = "table"; - format = "gpt"; - partitions = [{ - name = "ESP"; - start = "0%"; - end = "550MiB"; - bootable = true; - flags = [ "esp" ]; - fs-type = "fat32"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "550MiB"; - end = "100%"; - content = { - type = "filesystem"; - # Overwirte the existing filesystem - extraArgs = [ "-f" ]; - format = "xfs"; - mountpoint = "/"; - mountOptions = defaultXfsOpts; - }; - }]; - }; - }; - }; - }; -}