disk config via options on ellaca

This commit is contained in:
twoneis 2024-07-21 02:06:38 +02:00
parent 2306229a63
commit 64d3b83c76
2 changed files with 12 additions and 4 deletions

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }: { { config, pkgs, ... }: {
imports = [ imports = [
./options.nix ./options.nix
./disks.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
@ -30,21 +31,21 @@
fileSystems = { fileSystems = {
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/12CE-A600"; device = "/dev/disk/by-uuid/${config.disks.boot}";
fsType = "vfat"; fsType = "vfat";
}; };
"/" = { "/" = {
device = "/dev/disk/by-uuid/b4a61b48-017f-4d16-ab05-d5c867f2ca6f"; device = "/dev/disk/by-uuid/${config.disks.root}";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" "noatime" ]; options = [ "subvol=root" "compress=zstd" "noatime" ];
}; };
"/nix" = { "/nix" = {
device = "/dev/disk/by-uuid/b4a61b48-017f-4d16-ab05-d5c867f2ca6f"; device = "/dev/disk/by-uuid/${config.disks.root}";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ]; options = [ "subvol=nix" "compress=zstd" "noatime" ];
}; };
"/ext" = { "/ext" = {
device = "/dev/disk/by-uuid/3ed92a26-775a-4e39-ac1c-84b2822cd3dd"; device = "/dev/disk/by-uuid/${config.disks.ext}";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=ext" "compress=zstd" "noatime" ]; options = [ "subvol=ext" "compress=zstd" "noatime" ];
}; };

7
devices/ellaca/disks.nix Normal file
View file

@ -0,0 +1,7 @@
{ ... }: {
disks = {
boot = "12CE-A600";
root = "b4a61b48-017f-4d16-ab05-d5c867f2ca6f";
ext = "3ed92a26-775a-4e39-ac1c-84b2822cd3dd";
};
}