Compare commits

..

45 commits

Author SHA1 Message Date
Bruno BELANYI 5abcc66191 WIP: add note about 'iwd'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2024-11-29 22:27:15 +00:00
Bruno BELANYI c7fc4c2c67 WIP: even more directories? Maybe? 2024-11-29 22:27:15 +00:00
Bruno BELANYI 489802efbe WIP: add notes for missing persistence/backup
TODO:
* Do home-manager
* Look at for more inspiration github.com:nix-community/impermanence/pull/108
* Common files github.com:nix-community/impermanence/issues/10
* Useful config: github.com:chayleaf/dotfiles/blob/f77271b249e0c08368573c22a5c34f0737d3a766/system/modules/impermanence.nix
2024-11-29 22:27:15 +00:00
Bruno BELANYI ac9eeea26d nixos: services: vikunja: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI a0b91a5d18 nixos: services: transmission: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 6b78d89065 nixos: services: tandoor-recipes: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 4c12fc0094 nixos: services: sabnzbd: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 217c69cc9f nixos: services: rss-bridge: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 31c20c5b1b nixos: services: quassel: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 795026e918 nixos: services: pyload: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI b376366d7b nixos: services: postgresql-backup: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 1f6c40c3eb nixos: services: postgresql: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI aa6baa82e8 nixos: services: podgrab: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI f860452c1c nixos: services: servarr: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI a1bc64cf48 nixos: services: pdf-edit: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI b8325e8ea7 nixos: services: paperless: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 0dccde9edf nixos: services: nextcloud: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 260f1e9b5c nixos: services: nginx: persist SSL certificates 2024-11-29 22:27:15 +00:00
Bruno BELANYI 178f6825c0 nixos: services: navidrome: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 629e5d99f5 nixos: services: monitoring: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 370c8354da nixos: services: matrix: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI c7cc887322 nixos: services: lohr: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 6f27b15781 nixos: services: komga: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI e4916ddb88 nixos: services: jellyfin: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 4569fe8a29 nixos: services: indexers: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI b8f4dd33ee nixos: services: grocy: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI fc98fe2b3e nixos: services: gitea: persist repositories 2024-11-29 22:27:15 +00:00
Bruno BELANYI 82e56bf80c nixos: services: forgejo: persist repositories 2024-11-29 22:27:15 +00:00
Bruno BELANYI bdc008d0fc nixos: services: flood: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 5f607efee8 nixos: services: fail2ban: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 5c5738e1d8 nixos: services: calibre-web: persist library 2024-11-29 22:27:15 +00:00
Bruno BELANYI 7d8a18c968 nixos: services: blog: persist website data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 4fb2447648 nixos: services: audiobookshelf: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI ef88c7561b nixos: services: aria: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 4e2055da7f nixos: services: ssh-server: persist host keys 2024-11-29 22:27:15 +00:00
Bruno BELANYI 2f3b9950e1 nixos: hardware: networking persist connections 2024-11-29 22:27:15 +00:00
Bruno BELANYI 8607b3c577 nixos: hardware: bluetooth: persist connections 2024-11-29 22:27:15 +00:00
Bruno BELANYI 257c0675e2 nixos: system: podman: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 55fd694c69 nixos: system: docker: persist data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 2a20ecbd1e nixos: system: persist: filter unique entries
To make sure that different modules configuring the same values don't
run into any issues (e.g: download clients sharing a download
directory).
2024-11-29 22:27:15 +00:00
Bruno BELANYI fa732c88e4 WIP: nixos: system: add persist
This is the module that takes care of configuring impermanence at the
system level.

WIP:
    * address FIXMEs
    * activate home-manager persistence?
        * set `programs.fuse.userAllowOther = true;` ?
    * point `age` to persisted paths [1] ?
    * make sure all services and modules are persisted correctly...

[1]: b1d18d25b8
2024-11-29 22:27:15 +00:00
Bruno BELANYI 99a3bd2587 flake: add 'impermanence' 2024-11-29 22:27:15 +00:00
Bruno BELANYI e40247ed81 nixos: services: tandoor-recipes: backup data 2024-11-29 22:27:15 +00:00
Bruno BELANYI 1dcf5a1f1c nixos: services: mealie: backup data 2024-11-29 21:38:08 +00:00
Bruno BELANYI 7b21943693 nixos: services: grocy: backup data 2024-11-29 19:21:14 +00:00
17 changed files with 19 additions and 26 deletions

View file

@ -71,7 +71,7 @@ in
my.system.persist.directories = [
cfg.downloadDir
config.users.users.aria2.home
"/var/lib/aria2"
];
# NOTE: unfortunately aria2 does not log connection failures for fail2ban

View file

@ -35,7 +35,7 @@ in
};
my.system.persist.directories = [
"/var/lib/${config.systemd.services.fail2ban.serviceConfig.StateDirectory}"
"/var/lib/fail2ban"
];
};
}

View file

@ -29,7 +29,7 @@ in
};
my.system.persist.directories = [
"/var/lib/${config.systemd.services.flood.serviceConfig.StateDirectory}"
"/var/lib/flood"
];
# NOTE: unfortunately flood does not log connection failures for fail2ban

View file

@ -67,7 +67,7 @@ in
};
my.system.persist.directories = [
"/var/lib/${config.systemd.services.prowlarr.serviceConfig.StateDirectory}"
"/var/lib/prowlarr"
];
services.fail2ban.jails = {

View file

@ -39,7 +39,7 @@ in
};
my.system.persist.directories = [
"/var/lib/${config.systemd.services.jellyfin.serviceConfig.StateDirectory}"
"/var/lib/jellyfin"
];
services.fail2ban.jails = {

View file

@ -109,7 +109,7 @@ in
};
my.system.persist.directories = [
"/var/lib/${config.systemd.services.lohr.serviceConfig.StateDirectory}"
"/var/lib/lohr"
];
};
}

View file

@ -74,14 +74,10 @@ in
my.services.backup = {
paths = [
config.systemd.services.mealie.environment.DATA_DIR
"/var/lib/mealie"
];
};
my.system.persist.directories = [
config.systemd.services.mealie.environment.DATA_DIR
];
services.fail2ban.jails = {
mealie = ''
enabled = true

View file

@ -54,7 +54,7 @@ in
};
my.system.persist.directories = [
"/var/lib/${config.systemd.services.navidrome.serviceConfig.StateDirectory}"
"/var/lib/navidrome"
];
services.fail2ban.jails = {

View file

@ -94,7 +94,6 @@ in
my.system.persist.directories = [
config.services.nextcloud.home
config.services.nextcloud.datadir
];
services.fail2ban.jails = {

View file

@ -488,7 +488,7 @@ in
};
my.system.persist.directories = [
config.users.user.acme.home
"/var/lib/acme"
];
};
}

View file

@ -148,8 +148,8 @@ in
};
my.system.persist.directories = [
config.services.paperless-ng.dataDir
config.services.paperless-ng.mediaDir
config.services.paperless.dataDir
config.services.paperless.mediaDir
];
};
}

View file

@ -55,7 +55,7 @@ in
};
my.system.persist.directories = [
"/var/lib/${config.systemd.services.stirling-pdf.serviceConfig.StateDirectory}"
"/var/lib/stirling-pdf"
];
services.fail2ban.jails = {

View file

@ -55,7 +55,7 @@ in
my.system.persist.directories = [
cfg.downloadDirectory
"/var/lib/${config.systemd.services.pyload.StateDirectory}"
"/var/lib/pyload"
];
services.fail2ban.jails = {

View file

@ -26,7 +26,7 @@ let
dataDir =
if service != "bazarr"
then config.services.${service}.dataDir
else config.users.user.${service}.home;
else "/var/lib/bazarr";
in
[ dataDir ];
};

View file

@ -85,17 +85,14 @@ in
my.services.backup = {
paths = [
"/var/lib/${config.systemd.services.tandoor-recipes.StateDirectory}"
config.systemd.services.tandoor-recipes.environment.MEDIA_ROOT
"/var/lib/tandoor-recipes"
];
};
my.system.persist.directories = [
"/var/lib/${config.systemd.services.tandoor-recipes.StateDirectory}"
config.systemd.services.tandoor-recipes.environment.MEDIA_ROOT
"/var/lib/tandoor-recipes"
];
# NOTE: unfortunately tandoor-recipes does not log connection failures for fail2ban
};
}

View file

@ -92,6 +92,7 @@ in
};
my.system.persist.directories = [
cfg.downloadBase
config.services.transmission.home
];

View file

@ -50,7 +50,7 @@ in
"/etc/machine-id" # Machine-specific ID
"/etc/adjtime" # Clock drift factor and offsets
]
++ cfg.files
++ lib.unique cfg.files
;
directories = [
@ -63,7 +63,7 @@ in
"/var/spool" # FIXME: needed?
"/var/tmp" # FIXME: needed?
]
++ cfg.directories
++ lib.unique cfg.directories
;
};
};