feat(nixos): add zeus desktop host #8

Merged
alexion merged 3 commits from zeus-minimal-nixos into main 2026-09-03 21:00:41 -04:00
3 changed files with 120 additions and 0 deletions
Showing only changes of commit 5f23518f81 - Show all commits

View File

@@ -0,0 +1,41 @@
{ pkgs, ... }:
# zeus — Ryzen desktop with AMD graphics.
# Disk layout is in ./disk.nix.
# `fileSystems` are derived from it, none declared here.
{
imports = [
./hardware-configuration.nix
./disk.nix
];
system.stateVersion = "26.05";
# systemd-boot on the EFI system partition.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Keep the desktop on a recent kernel for new AMD GPU support.
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.enableRedistributableFirmware = true;
hardware.graphics = {
enable = true;
enable32Bit = true;
};
# RAM-backed swap, no on-disk swap partition.
zramSwap.enable = true;
networking.networkmanager.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
modules.desktop.enable = true;
modules.desktop.apps.steam.enable = true;
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_GB.UTF-8";
}

View File

@@ -0,0 +1,61 @@
{ ... }:
# zeus's disk layout for disko: one NVMe disk, GPT, with an EFI system
# partition and a LUKS container holding btrfs subvolumes.
# No swap partition, since swap is zram.
# disko derives `fileSystems` and `boot.initrd.luks.devices` from this.
{
disko.devices.disk.main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
settings.allowDiscards = true;
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"@root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@home" = {
mountpoint = "/home";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
};
};
}

View File

@@ -0,0 +1,18 @@
{ lib, modulesPath, ... }:
# Hardware inferred from the CachyOS inventory for this desktop.
# disko derives `fileSystems` and the LUKS device, none declared here.
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"xhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}