Infini-OPTIPLEX: refactor filesystems
This commit is contained in:
parent
2d1304bf29
commit
ba7580c2a2
1 changed files with 13 additions and 33 deletions
|
@ -3,6 +3,14 @@ let
|
|||
uuid = uuid: "/dev/disk/by-uuid/${uuid}";
|
||||
main = uuid "9d4bf2d8-f139-42e7-937a-541a7870d806";
|
||||
commonOptions = [ "autodefrag" "noatime" "ssd" "compress=zstd:1" ];
|
||||
|
||||
mkMain' = options: {
|
||||
device = main;
|
||||
fsType = "btrfs";
|
||||
options = commonOptions ++ options;
|
||||
};
|
||||
mkMainOpt = options: (mkMain' options) // { neededForBoot = true; };
|
||||
mkMain = subvol: mkMainOpt [ "subvol=${subvol}" ];
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
|
@ -12,39 +20,11 @@ in
|
|||
options = [ "defaults" "size=16G" "mode=755" ];
|
||||
};
|
||||
|
||||
"/media/main" = {
|
||||
device = main;
|
||||
fsType = "btrfs";
|
||||
options = commonOptions;
|
||||
};
|
||||
|
||||
"/persist" = {
|
||||
device = main;
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ] ++ commonOptions;
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/etc/ssh" = {
|
||||
device = main;
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root/etc/ssh" ] ++ commonOptions;
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = main;
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ] ++ commonOptions;
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = main;
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=boot" ] ++ commonOptions;
|
||||
neededForBoot = true;
|
||||
};
|
||||
"/media/main" = mkMain' [ ];
|
||||
"/persist" = mkMain "root";
|
||||
"/etc/ssh" = mkMain "root/etc/ssh";
|
||||
"/nix" = mkMain "nix";
|
||||
"/boot" = mkMain "boot";
|
||||
|
||||
"/boot/efi" = {
|
||||
device = uuid "23B2-DCD2";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue