33 lines
671 B
Nix
33 lines
671 B
Nix
{
|
|
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" ];
|
|
};
|
|
};
|
|
}
|