flakes/hosts/sugarcane/filesystem.nix

30 lines
632 B
Nix
Raw Normal View History

2022-02-02 16:05:17 +07:00
{ config, ... }:
let
bind = src: {
depends = [ "/nix" ];
device = src;
fsType = "none";
neededForBoot = true;
options = [ "bind" ];
};
in {
fileSystems = {
"/" = {
device = "rootfs";
fsType = "tmpfs";
options = [ "defaults" "size=1G" "mode=755" ];
2022-02-02 16:05:17 +07:00
};
"/nix" = {
2022-02-02 16:05:17 +07:00
device = "/dev/disk/by-uuid/19d572a8-1cf6-4b9c-94c6-3ce6be54f719";
fsType = "ext4";
options = [ "defaults" "noatime" ];
neededForBoot = true;
};
2022-08-09 15:17:30 +07:00
"/persist" = bind "/nix/persist";
2022-02-02 16:05:17 +07:00
"/var/log/journal" = bind "/nix/persist/journal";
"/boot" = bind "/nix/persist/boot";
};
}