Infini-FRAMEWORK: refactor filesystems using filesystems lib
This commit is contained in:
parent
036c94a2b1
commit
feac7d06b2
1 changed files with 11 additions and 49 deletions
|
@ -1,60 +1,22 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
with lib.our.filesystems;
|
||||||
let
|
let
|
||||||
uuid = uuid: "/dev/disk/by-uuid/${uuid}";
|
main = mkBtrfs "a44af0ff-5667-465d-b80a-1934d1aab8d9";
|
||||||
main = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9";
|
|
||||||
commonOptions = [ "autodefrag" "noatime" "ssd" "compress=zstd:1" ];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = {
|
"/" = mkTmpfs "root" "16G";
|
||||||
device = "none";
|
"/boot/efi" = mkEFI "3FC9-0182";
|
||||||
fsType = "tmpfs";
|
|
||||||
options = [ "defaults" "size=16G" "mode=755" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/media/main" = {
|
"/media/main" = main [ ];
|
||||||
device = main;
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = commonOptions;
|
|
||||||
};
|
|
||||||
|
|
||||||
"/persist" = {
|
"/persist" = neededForBoot main [ "subvol=root" ];
|
||||||
device = main;
|
"/etc/ssh" = neededForBoot main [ "subvolid=628" ];
|
||||||
fsType = "btrfs";
|
"/nix" = neededForBoot main [ "subvol=nix" ];
|
||||||
options = [ "subvol=root" ] ++ commonOptions;
|
"/boot" = neededForBoot main [ "subvol=boot" ];
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"/etc/ssh" = {
|
|
||||||
device = main;
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvolid=628" ] ++ 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" = {
|
|
||||||
device = uuid "3FC9-0182";
|
|
||||||
fsType = "vfat";
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = uuid "28672ffb-9f1c-462b-b49d-8a14b3dd72b3"; }
|
(mkSwap "28672ffb-9f1c-462b-b49d-8a14b3dd72b3")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue