1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

remove specialArgs niveum and niveumLib, add overlay

This commit is contained in:
2025-12-25 14:00:03 +01:00
parent c490c81a32
commit 82b7ffd39f
59 changed files with 535 additions and 616 deletions

View File

@@ -1,13 +1,13 @@
{
pkgs,
config,
lib,
...
}: let
inherit (import ../lib) restic;
in {
}:
{
services.restic.backups.niveum = {
initialize = true;
inherit (restic) repository;
repository = pkgs.lib.niveum.restic.repository;
timerConfig = {
OnCalendar = "8:00";
RandomizedDelaySec = "1h";
@@ -38,7 +38,7 @@ in {
environment.systemPackages = [
(pkgs.writers.writeDashBin "restic-niveum" ''
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} "$@"
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} "$@"
'')
(pkgs.writers.writeDashBin "restic-mount" ''
mountdir=$(mktemp -d)
@@ -46,7 +46,7 @@ in {
clean() {
rm -r "$mountdir"
}
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
'')
];
}