diff options
| author | adikro <adikro@disroot.org> | 2025-12-22 03:44:33 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2025-12-22 03:44:33 +0100 |
| commit | c2e7208de4e3e7d018560175808f838aa6861b68 (patch) | |
| tree | bd9cedd1bf524f3e907e6da664e5fe706e7913a1 /hosts/desktop | |
| parent | f0a94a72d7f191120682e97130f8277cd56f82d0 (diff) | |
disko config for desktop host for future reinstalls
Diffstat (limited to 'hosts/desktop')
| -rw-r--r-- | hosts/desktop/configuration.nix | 4 | ||||
| -rw-r--r-- | hosts/desktop/disko.nix | 76 | ||||
| -rw-r--r-- | hosts/desktop/hardware-configuration.nix | 3 |
3 files changed, 80 insertions, 3 deletions
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index b74efe5..6f9b000 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -1,8 +1,10 @@ -{ username, ... }: +{ inputs, username, ... }: { system.stateVersion = "25.05"; imports = [ + inputs.disko.nixosModules.disko + ./hardware-configuration.nix ../../sys/default.nix ]; diff --git a/hosts/desktop/disko.nix b/hosts/desktop/disko.nix new file mode 100644 index 0000000..8e93ef7 --- /dev/null +++ b/hosts/desktop/disko.nix @@ -0,0 +1,76 @@ +{ + 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" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "root" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" "autodefrag" ]; + }; + "llms" = { + mountpoint = "/llms"; + mountOptions = [ "compress=zstd" "noatime" "autodefrag"]; + }; + "vms" = { + mountpoint = "/vms"; + mountOptions = [ "noatime" "autodefrag" ]; + }; + "swap" = { + mountpoint = "/.swapvol"; + swap.swapfile.size = "32G"; + }; + }; + }; + }; + }; + }; + }; + media = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + media = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/media"; + # extraArgs = [ "-f" ]; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index cb96715..41eb3a1 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -30,7 +30,7 @@ }; fileSystems."/media" = - { device = "/dev/disk/by-uuid/eb13c515-5e4c-4a17-8f2e-1cf5d6e522e4"; + { device = "/dev/disk/by-uuid/c0dc7c4d-1800-4c84-a04c-5ea7f5e86c4b"; fsType = "ext4"; }; @@ -47,4 +47,3 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } - |
