infra/nixos/hosts/silver/mounts.nix

49 lines
1.1 KiB
Nix

_: {
environment.persistence."/persist" = {
# it doesn't make a difference if mounts
# are hidden from GNOME because we aren't
# using that
hideMounts = false;
directories = [
"/etc/ssh"
"/etc/secrets"
"/var/log"
"/var/lib/systemd/coredump"
"/var/lib/nixos"
"/var/lib/containers"
"/var/db/sudo"
"/var/lib/acme"
"/var/lib/prometheus2"
"/var/lib/grafana"
"/var/lib/bitwarden_rs"
"/srv"
];
files = [
"/etc/machine-id"
];
};
fileSystems = {
"/".neededForBoot = true;
# this only works on older versions
# of impermanence (which i'm pinned to)
# it's better to use `RequiresMountsFor`, maybe
"/etc/ssh" = {
depends = ["/persist"];
neededForBoot = true;
};
# this fixed "var-lib-containers.mount" reload failure
# when i was upgrading 25.05->25.11. i am not sure
# if it is a good idea or necessary or not
"/var/lib/containers" = {
depends = ["/persist"];
neededForBoot = true;
};
"/persist".neededForBoot = true; # no further config is needed, disko handles the rest
};
}