Compare commits

..

42 commits

Author SHA1 Message Date
Bruno BELANYI 376a622549 WIP: add note about 'iwd'
Some checks failed
ci/woodpecker/push/check Pipeline failed
2024-11-28 23:41:27 +00:00
Bruno BELANYI 5d56a8ddf0 WIP: even more directories? Maybe? 2024-11-28 23:41:27 +00:00
Bruno BELANYI 11bd7b30c1 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-28 23:41:27 +00:00
Bruno BELANYI 4eb7d0cd38 nixos: services: vikunja: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 9b0c8c1910 nixos: services: transmission: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 0ccc4b576b nixos: services: tandoor-recipes: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 9b9f55081e nixos: services: sabnzbd: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI f4c15a1e3b nixos: services: rss-bridge: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 7bdf6ce35e nixos: services: quassel: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 6450545bd9 nixos: services: pyload: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI f0d0c06276 nixos: services: postgresql-backup: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI df809a24f8 nixos: services: postgresql: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI e68aa49f29 nixos: services: podgrab: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI df917ad9f0 nixos: services: pirate: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 3068850c5c nixos: services: pdf-edit: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 0842666f67 nixos: services: paperless: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 420ea0dbbf nixos: services: nextcloud: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI 18b078ae09 nixos: services: nginx: persist SSL certificates 2024-11-28 23:41:27 +00:00
Bruno BELANYI 2854952f0b nixos: services: navidrome: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI f09db97960 nixos: services: monitoring: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI fce6fd6e79 nixos: services: mealie: persist data 2024-11-28 23:41:27 +00:00
Bruno BELANYI dbc919e3d8 nixos: services: matrix: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI 19c4586073 nixos: services: lohr: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI c07d3f4c0b nixos: services: komga: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI 79274dac40 nixos: services: jellyfin: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI dc0d753625 nixos: services: indexers: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI 72ffc1c25a nixos: services: grocy: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI 88f8f8a6cd nixos: services: gitea: persist repositories 2024-11-28 22:05:27 +00:00
Bruno BELANYI 8c5ada0d6d nixos: services: forgejo: persist repositories 2024-11-28 22:05:27 +00:00
Bruno BELANYI 0ac6fef308 nixos: services: flood: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI 34592cfd52 nixos: services: fail2ban: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI 075a52f8db nixos: services: calibre-web: persist library 2024-11-28 22:05:27 +00:00
Bruno BELANYI f2b5290df7 nixos: services: blog: persist website data 2024-11-28 22:05:27 +00:00
Bruno BELANYI e74aceee24 nixos: services: audiobookshelf: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI 110aef16e4 nixos: services: aria: persist data 2024-11-28 22:05:27 +00:00
Bruno BELANYI 5efdd891db nixos: services: ssh-server: persist host keys 2024-11-28 22:05:27 +00:00
Bruno BELANYI 4be4f5e3cd nixos: hardware: networking persist connections 2024-11-28 20:29:14 +00:00
Bruno BELANYI 7e568c29ce nixos: hardware: bluetooth: persist connections 2024-11-28 20:19:49 +00:00
Bruno BELANYI d0a7ec4d81 nixos: system: podman: persist data 2024-11-28 20:19:49 +00:00
Bruno BELANYI 828621041a nixos: system: docker: persist data 2024-11-28 20:19:49 +00:00
Bruno BELANYI 0f2109c4b0 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-28 20:19:22 +00:00
Bruno BELANYI 05fdbcdb76 flake: add 'impermanence' 2024-11-28 19:59:41 +00:00
17 changed files with 26 additions and 19 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -74,10 +74,14 @@ in
my.services.backup = {
paths = [
"/var/lib/mealie"
config.systemd.services.mealie.environment.DATA_DIR
];
};
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/navidrome"
"/var/lib/${config.systemd.services.navidrome.serviceConfig.StateDirectory}"
];
services.fail2ban.jails = {

View file

@ -94,6 +94,7 @@ 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 = [
"/var/lib/acme"
config.users.user.acme.home
];
};
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -92,7 +92,6 @@ 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
]
++ lib.unique cfg.files
++ cfg.files
;
directories = [
@ -63,7 +63,7 @@ in
"/var/spool" # FIXME: needed?
"/var/tmp" # FIXME: needed?
]
++ lib.unique cfg.directories
++ cfg.directories
;
};
};