meow
Some checks failed
ci/woodpecker/push/build-cache Pipeline failed

This commit is contained in:
Lucy Hochkamp 2025-11-26 11:11:49 +01:00
parent 0eb6953b0d
commit d74a131529
No known key found for this signature in database
14 changed files with 259 additions and 67 deletions

View file

@ -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 = [

View file

@ -1,6 +1,6 @@
{lib,...}: with lib;{
options.xyno.meta = {
sopsKey = mkOption { type = types.text; };
sopsKey = mkOption { type = types.str; };
};
config = {
sops.defaultSopsFile = ../../secrets/common.yaml;