Remove obsolete stuff

This commit is contained in:
Malte Tammena 2022-01-21 17:57:52 +01:00
parent 60f2d8f038
commit da182e4945
3 changed files with 1 additions and 82 deletions

View file

@ -191,7 +191,7 @@
./hardware/intel-nuc.nix
./modules/local-build-service.nix
./modules/nginx-reverse-proxy.nix
./modules/binary-cache.nix
#./modules/binary-cache.nix
./modules/ccqcraft-backups.nix
./modules/restic.nix
];

View file

@ -42,22 +42,6 @@
sops.defaultSopsFile = ../secrets/hosts/elysia-clarki/secrets.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
services.ddclient = {
enable = true;
protocol = "dyndns2";
server = "dynv6.com";
username = "none";
# Fixup using secret scheme
passwordFile = "/root/ddclient-password";
zone = "home.dyn.tammena.rocks";
domains = [
"bak.home.dyn.tammena.rocks"
"cache.home.dyn.tammena.rocks"
"elysia-clarki.home.dyn.tammena.rocks"
];
ipv6 = true;
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View file

@ -1,65 +0,0 @@
{ pkgs, ... }:
let
resticCmd = "${pkgs.restic}/bin/restic";
repository = "rest:http://elysia-clarki.home.dyn.tammena.rocks:8000/malte";
passCmd = "${pkgs.pass}/bin/pass Server/ResticServer/malte";
backupPaths = [
"/home/malte/Documents"
"/home/malte/Lieder"
"/home/malte/Pictures"
"/home/malte/Tasks"
"/home/malte/Uni"
"/home/malte/helden"
"/home/malte/ledger"
"/home/malte/timewarrior"
"/home/malte/vimwiki"
];
pruneOpts = [
"--keep-hourly 5"
"--keep-daily 5"
"--keep-weekly 5"
"--keep-monthly 5"
"--keep-yearly 5"
];
in {
home.packages = [ pkgs.restic ];
home.sessionVariables = {
RESTIC_REPOSITORY = repository;
RESTIC_PASSWORD_COMMAND = passCmd;
};
systemd.user.services.restic-backups-to-elysia-clarki = {
Unit = {
Description = "Backup to elysia-clarki using restic";
After = [ "network.target" "dev-yubikey.device" ];
Requisite = "dev-yubikey.device";
};
Service = {
Type = "oneshot";
ExecStart = [
"${resticCmd} backup --cache-dir=%C/restic-backups-to-elysia-clarki ${
toString backupPaths
}"
"${resticCmd} forget --prune ${toString pruneOpts}"
];
RuntimeDirectory = "restic-backups-to-elysia-clarki";
CacheDirectory = "restic-backups-to-elysia-clarki";
CacheDirectoryMode = "0700";
Environment = [
"RESTIC_REPOSITORY=${repository}"
''RESTIC_PASSWORD_COMMAND="${passCmd}"''
"PASSWORD_STORE_DIR=/home/malte/.local/share/password-store"
];
};
};
systemd.user.timers.restic-backups-to-elysia-clarki = {
Unit = { Description = "Run restic backups every hour"; };
Install = { WantedBy = [ "timers.target" ]; };
Timer = { OnCalendar = "hourly"; };
};
}