parent
0eb6953b0d
commit
d74a131529
14 changed files with 259 additions and 67 deletions
|
|
@ -21,24 +21,25 @@ in
|
|||
{
|
||||
options.xyno.impermanence = {
|
||||
enable = lib.mkEnableOption "erase all your darlings (they hate you anyways)";
|
||||
files = lib.mkOption { type = lib.types.listOf lib.types.str; };
|
||||
directories = lib.mkOption { type = lib.types.listOf lib.types.str; };
|
||||
files = lib.mkOption { type = lib.types.listOf lib.types.str; default = []; };
|
||||
directories = lib.mkOption { type = lib.types.listOf lib.types.anything; default = [];};
|
||||
user = {
|
||||
files = lib.mkOption { type = lib.types.listOf lib.types.str; };
|
||||
directories = lib.mkOption { type = lib.types.listOf lib.types.str; };
|
||||
files = lib.mkOption { type = lib.types.listOf lib.types.str; default = [];};
|
||||
directories = lib.mkOption { type = lib.types.listOf lib.types.anything; default = [];};
|
||||
};
|
||||
# have a seperate impermanence tree for "cache" files that can just be deleted if wanted
|
||||
cache = {
|
||||
files = lib.mkOption { type = lib.types.listOf lib.types.str; };
|
||||
directories = lib.mkOption { type = lib.types.listOf lib.types.str; };
|
||||
files = lib.mkOption { type = lib.types.listOf lib.types.str; default = [];};
|
||||
directories = lib.mkOption { type = lib.types.listOf lib.types.anything; default = [];};
|
||||
user = {
|
||||
files = lib.mkOption { type = lib.types.listOf lib.types.str; };
|
||||
directories = lib.mkOption { type = lib.types.listOf lib.types.str; };
|
||||
files = lib.mkOption { type = lib.types.listOf lib.types.str; default = [];};
|
||||
directories = lib.mkOption { type = lib.types.listOf lib.types.anything; default = [];};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.mutableUsers = false;
|
||||
xyno.impermanence.files = [
|
||||
"/etc/machine-id" # systemd/zfs unhappy otherwise
|
||||
];
|
||||
|
|
@ -47,6 +48,7 @@ in
|
|||
"/var/lib/systemd/coredump"
|
||||
"/etc/ssh" # host keys
|
||||
"/var/lib/sbctl" # lanzaboote
|
||||
"/var/lib/nixos"
|
||||
|
||||
];
|
||||
xyno.impermanence.user.directories = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue