lots of stuff:
Moved syncthing to system service Restic actually works now removed some old system configs. formatting.
This commit is contained in:
parent
c42e33770e
commit
f9632c8fc3
18 changed files with 99 additions and 291 deletions
|
@ -12,6 +12,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.disko.nixosModules.disko
|
||||
./disk-config.nix
|
||||
./restic.nix
|
||||
../../roles/nixos/vm.nix
|
||||
../../configs/nixos/common.nix
|
||||
../../configs/nixos/tailscale.nix
|
||||
|
|
38
hosts/cirrus/restic.nix
Normal file
38
hosts/cirrus/restic.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
restic
|
||||
];
|
||||
|
||||
sops = lib.mkIf (inputs ? nix-secrets) {
|
||||
secrets.restic-url = {
|
||||
sopsFile = "${inputs.nix-secrets}/restic-client.yaml";
|
||||
owner = config.host.user;
|
||||
};
|
||||
secrets.restic-password = {
|
||||
sopsFile = "${inputs.nix-secrets}/restic-client.yaml";
|
||||
owner = config.host.user;
|
||||
};
|
||||
};
|
||||
|
||||
services.restic.backups = lib.mkIf (inputs ? nix-secrets) {
|
||||
remote = {
|
||||
repositoryFile = config.sops.secrets.restic-url.path;
|
||||
passwordFile = config.sops.secrets.restic-password.path;
|
||||
initialize = true;
|
||||
paths = [
|
||||
"/var/lib/radicale"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "4h";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue