1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-28 02:27:44 +00:00

Add some parts of the nine host

This commit is contained in:
RGBCube 2025-01-24 23:50:51 +03:00
parent 6c108c7caa
commit fa80a17f59
12 changed files with 124 additions and 21 deletions

View file

@ -1,11 +1,11 @@
{ config, lib, ... }: let
inherit (lib) genAttrs merge mkConst mkIf remove;
in merge <| mkIf config.isServer {
in{
options.resticHosts = mkConst <| remove config.networking.hostName [ "cube" "disk" "nine" ];
config.secrets.resticPassword.file = ./password.age;
config.secrets.resticPassword.file = mkIf config.isServer ./password.age;
config.services.restic.backups = genAttrs config.resticHosts (host: {
config.services.restic.backups = mkIf config.isServer <| genAttrs config.resticHosts (host: {
repository = "sftp:backup@${host}:${config.networking.hostName}-backup";
passwordFile = config.secrets.resticPassword.path;
initialize = true;