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}";
|
uuid = uuid: "/dev/disk/by-uuid/${uuid}";
|
||||||
main = uuid "9d4bf2d8-f139-42e7-937a-541a7870d806";
|
main = uuid "9d4bf2d8-f139-42e7-937a-541a7870d806";
|
||||||
commonOptions = [ "autodefrag" "noatime" "ssd" "compress=zstd:1" ];
|
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
|
in
|
||||||
{
|
{
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
|
@ -12,39 +20,11 @@ in
|
||||||
options = [ "defaults" "size=16G" "mode=755" ];
|
options = [ "defaults" "size=16G" "mode=755" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/media/main" = {
|
"/media/main" = mkMain' [ ];
|
||||||
device = main;
|
"/persist" = mkMain "root";
|
||||||
fsType = "btrfs";
|
"/etc/ssh" = mkMain "root/etc/ssh";
|
||||||
options = commonOptions;
|
"/nix" = mkMain "nix";
|
||||||
};
|
"/boot" = mkMain "boot";
|
||||||
|
|
||||||
"/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;
|
|
||||||
};
|
|
||||||
|
|
||||||
"/boot/efi" = {
|
"/boot/efi" = {
|
||||||
device = uuid "23B2-DCD2";
|
device = uuid "23B2-DCD2";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue