diff options
| author | Dominik Kaiser | 2026-06-13 12:43:45 +0200 |
|---|---|---|
| committer | Dominik Kaiser | 2026-06-13 12:43:45 +0200 |
| commit | d6dc581b9c8e5caff8e9f05879c59ad59e176644 (patch) | |
| tree | 2586f613080bf6a3b4f9519981fd98b1a67fbe2a /modules/hosts/sol/disko.nix | |
| parent | 2df5bc584899f427495cc20927170de2a2c84b32 (diff) | |
| download | nixos-d6dc581b9c8e5caff8e9f05879c59ad59e176644.tar.gz nixos-d6dc581b9c8e5caff8e9f05879c59ad59e176644.zip | |
Add sol
Diffstat (limited to 'modules/hosts/sol/disko.nix')
| -rw-r--r-- | modules/hosts/sol/disko.nix | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/modules/hosts/sol/disko.nix b/modules/hosts/sol/disko.nix new file mode 100644 index 0000000..e110cdd --- /dev/null +++ b/modules/hosts/sol/disko.nix @@ -0,0 +1,88 @@ +{ self, inputs, ...}: { + +flake.nixosModules.solDisko = { pkgs, lib, ... }: { + fileSystems."/nix".neededForBoot = true; + fileSystems."/persistent".neededForBoot = true; + disko.devices.nodev = { + "/" = { + fsType = "tmpfs"; + mountOptions = [ + "size=50%" + "mode=755" + ]; + }; + }; + + disko.devices.disk.hdd = { + device = ""; + type = "disk"; + + content.type = "gpt"; + content.partitions.data = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/hdd"; + }; + }; + }; + + disko.devices.disk.main = { + device = "/dev/nvme0n1"; + type = "disk"; + + content.type = "gpt"; + + content.partitions.boot = { + name = "boot"; + size = "1M"; + type = "EF02"; + }; + + content.partitions.esp = { + name = "ESP"; + size = "1G"; + type = "EF00"; + + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + + content.partitions.swap = { + size = "8G"; + + content = { + type = "swap"; + resumeDevice = true; + }; + }; + + content.partitions.root = { + name = "root"; + size = "100%"; + + content = { + type = "btrfs"; + extraArgs = ["-f"]; + + subvolumes = { + "/persistent" = { + mountOptions = ["subvol=persistent" "noatime"]; + mountpoint = "/persistent"; + }; + + "/nix" = { + mountOptions = ["subvol=nix" "noatime"]; + mountpoint = "/nix"; + }; + }; + }; + }; + }; +}; + +} |
