1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-10 08:53:57 +00:00
ultima/jetpure/host/parts/disko.nix

62 lines
1.6 KiB
Nix
Raw Normal View History

2024-11-21 09:24:15 +00:00
{ device ? throw, ... }: {
# sudo nix run nixpkgs#disko -- --mode disko ./disko.nix --arg device '"/dev/sdX"'
disko.devices.disk.main = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
esp = {
name = "esp";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" "fmask=0077" "dmask=0077" ];
};
};
root = {
name = "nixos";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/rootfs".mountpoint = "/";
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd:5" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd:5" "noatime" ];
};
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd:5" "noatime" ];
};
};
};
};
};
};
};
fileSystems = let
fsType = "ext4";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
in {
"/mnt/HDD" = {
label = "BIG_BUCK";
device = "/dev/disk/by-uuid/9290bc08-17fe-47db-a535-d4044b8c8dfb";
inherit fsType options;
};
"/mnt/SSD" = {
label = "FAST_BITCH";
device = "/dev/disk/by-uuid/e6bc9034-95a4-43bd-b5f5-c7c1743e9f7c";
inherit fsType options;
};
};
}