forked from Fachschaft/nixConfig
Create backuphost Bragi
This commit is contained in:
parent
45d0ef262f
commit
3b4272bba9
4 changed files with 92 additions and 0 deletions
31
nixos/modules/borgbackup.nix
Normal file
31
nixos/modules/borgbackup.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkIf
|
||||
mkEnableOption
|
||||
;
|
||||
cfg = config.services.mathebau-borgbackup;
|
||||
in {
|
||||
imports = [];
|
||||
|
||||
options.services.mathebau-borgbackup = {
|
||||
enable = mkEnableOption "mathebau borgbackup service";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.borgbackup = {
|
||||
repos = {
|
||||
cthulhu = {
|
||||
authorizedKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMSJl1MvabUADTdOCgufsBzn1tIIpxMq4iDcYZsaW1lV Cthulhu Backup"
|
||||
];
|
||||
path = "/var/lib/cthulhu";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue