fmt: better formatting of the backup server file
This commit is contained in:
parent
3d6a1ba696
commit
e94683c3d5
1 changed files with 12 additions and 8 deletions
|
@ -144,14 +144,15 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
config = mkMerge [
|
||||||
{
|
{
|
||||||
# these values are anabled for every client
|
# these values are anabled for every client
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
restic
|
restic
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
// mkIf cfg.server.enable {
|
|
||||||
|
(mkIf cfg.server.enable {
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
cfg.server.port
|
cfg.server.port
|
||||||
];
|
];
|
||||||
|
@ -171,8 +172,9 @@ in {
|
||||||
appendOnly = cfg.server.appendOnly;
|
appendOnly = cfg.server.appendOnly;
|
||||||
privateRepos = true;
|
privateRepos = true;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
// mkIf enable_client {
|
|
||||||
|
(mkIf enable_client {
|
||||||
# client stuff here
|
# client stuff here
|
||||||
|
|
||||||
# A list of all login accounts. To create the password hashes, use
|
# A list of all login accounts. To create the password hashes, use
|
||||||
|
@ -181,15 +183,17 @@ in {
|
||||||
|
|
||||||
age.secrets.restic.file = ../secrets/backup/restic.age;
|
age.secrets.restic.file = ../secrets/backup/restic.age;
|
||||||
|
|
||||||
services.restic.backups =
|
services.restic.backups = mkMerge [
|
||||||
ownServers
|
ownServers
|
||||||
// {
|
{
|
||||||
# merge teh two configs together
|
# merge teh two configs together
|
||||||
# backblaze = base // {
|
# backblaze = base // {
|
||||||
# # backupos for each server are stored in a folder under their name
|
# # backupos for each server are stored in a folder under their name
|
||||||
# repository = "b2:NixOS-Main2:/${config.services.skynet.host.name}";
|
# repository = "b2:NixOS-Main2:/${config.services.skynet.host.name}";
|
||||||
# #environmentFile = config.age.secrets.backblaze.path;
|
# #environmentFile = config.age.secrets.backblaze.path;
|
||||||
# };
|
# };
|
||||||
};
|
}
|
||||||
};
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue