mirror of
https://gitlab.com/ahoneybun/nix-configs.git
synced 2025-05-12 11:14:02 -06:00
Upload New File
This commit is contained in:
parent
8413f77bcd
commit
54c8bafaa1
1 changed files with 26 additions and 0 deletions
26
software/backrest/backrest.nix
Normal file
26
software/backrest/backrest.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, config, lib, cfg, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
backrest = pkgs.callPackage ./package.nix { inherit pkgs lib; };
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
environment.systemPackages = [
|
||||||
|
backrest
|
||||||
|
];
|
||||||
|
|
||||||
|
# Install systemd service
|
||||||
|
systemd.services."backrest" = {
|
||||||
|
enable = true;
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
after = [ "syslog.target" "network-online.target" ];
|
||||||
|
description = "Start the Backrest backup service and web UI";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = ''${backrest/backrest'';
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSrc = 10;
|
||||||
|
KillMode = "process";
|
||||||
|
Environment = "HOME=${config.users.users.aaronh.home}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue