mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-18 04:18:07 -06:00
feat: configured syncthing and photoprism
This commit is contained in:
parent
77dcbe3c33
commit
8eb9ed31fc
8 changed files with 161 additions and 92 deletions
64
modules/nixos/homelab/restic/resticCeres/default.nix
Executable file
64
modules/nixos/homelab/restic/resticCeres/default.nix
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
config,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.services) instances;
|
||||
inherit (flake.config.machines.devices) ceres;
|
||||
inherit (flake.config.people) user0;
|
||||
envFile = "backblaze/${ceres.name}-env";
|
||||
repoFile = "backblaze/${ceres.name}-repo";
|
||||
passFile = "restic/${ceres.name}-pass";
|
||||
in
|
||||
{
|
||||
services.restic = {
|
||||
backups = {
|
||||
remote = {
|
||||
initialize = true;
|
||||
environmentFile = config.sops.secrets.${envFile}.path;
|
||||
passwordFile = config.sops.secrets.${passFile}.path;
|
||||
repositoryFile = config.sops.secrets.${repoFile}.path;
|
||||
timerConfig = {
|
||||
OnCalendar = "0/4:00";
|
||||
Persistent = true;
|
||||
};
|
||||
paths =
|
||||
let
|
||||
inst = instance: interface: instances.${instance}.interfaces.${interface}.paths.mntPaths.path0;
|
||||
in
|
||||
[
|
||||
"/home/${user0}/.ssh"
|
||||
(inst "forgejo" "interface0")
|
||||
(inst "mastodon" "interface0")
|
||||
(inst "opencloud" "interface1")
|
||||
(inst "minecraft" "interface0")
|
||||
(inst "minecraft" "interface1")
|
||||
((inst "jellyfin" "interface0") + "/cache")
|
||||
((inst "jellyfin" "interface0") + "/data")
|
||||
((inst "jellyfin" "interface0") + "/media/music")
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
secrets = builtins.listToAttrs (
|
||||
map
|
||||
(secret: {
|
||||
name = secret;
|
||||
value = {
|
||||
path = "/run/secrets/${secret}";
|
||||
owner = "root";
|
||||
group = "root";
|
||||
mode = "0600";
|
||||
};
|
||||
})
|
||||
[
|
||||
envFile
|
||||
repoFile
|
||||
passFile
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue