configures backrest
This commit is contained in:
parent
623e2372a0
commit
5ff17e3a90
2 changed files with 34 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
||||||
../../modules/actual-server
|
../../modules/actual-server
|
||||||
../../modules/immich
|
../../modules/immich
|
||||||
../../modules/cockpit
|
../../modules/cockpit
|
||||||
|
../../modules/backrest
|
||||||
];
|
];
|
||||||
|
|
||||||
# General
|
# General
|
||||||
|
|
|
||||||
33
modules/backrest/default.nix
Normal file
33
modules/backrest/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
environment.systemPackages = lib.mkAfter (
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
backrest
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
systemd.user.services.backrest = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Restic GUI";
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Environment = [
|
||||||
|
"BACKREST_PORT=127.0.0.1:9004"
|
||||||
|
"BACKREST_RESTIC_COMMAND=${pkgs.restic}/bin/restic"
|
||||||
|
"BACKREST_CONFIG=${config.home.homeDirectory}/.backrest/config"
|
||||||
|
"BACKREST_DATA=${config.home.homeDirectory}/.backrest/data"
|
||||||
|
];
|
||||||
|
ExecStart = "${pkgs.backrest}/bin/backrest";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "5s";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue