Compare commits

...

3 Commits

Author SHA1 Message Date
Amanda Graven b43a55bb9f
Configure borg for grondahl 2023-10-26 17:12:27 +02:00
Amanda Graven 8d718be321 Update nixpkgs 2023-10-22 14:18:29 +02:00
Amanda Graven dac10cfe1a Remove grocy 2023-10-22 14:17:15 +02:00
8 changed files with 37 additions and 49 deletions

View File

@ -10,9 +10,9 @@
../../common/services/tailscale.nix
../../common/users.nix
./services/acme.nix
./services/borg.nix
./services/coturn.nix
./services/nginx.nix
./services/restic.nix
./services/synapse.nix
./services/postgres.nix
#./services/mail.nix

Binary file not shown.

View File

@ -0,0 +1,26 @@
{ config, ... }:
{
services.borgbackup.jobs = {
postgres = {
paths = "/var/lib/postgresql/backup";
repo = "ssh://borg@despondos.nao.sh//mnt/slab/backup/grondahl/postgres";
encryption.mode = "repokey";
encryption.passCommand = "cat ${config.secrets.files.borg_pass_postgres.file}";
environment.BORG_RSH = "ssh -i ${config.secrets.files.ssh_key_postgres.file}";
compression = "auto,zstd";
startAt = "*-*-* 03:15:00";
user = "postgres";
};
synapse = {
paths = "/var/lib/matrix-synapse";
repo = "ssh://borg@despondos.nao.sh//mnt/slab/backup/grondahl/synapse";
encryption.mode = "repokey";
encryption.passCommand = "cat ${config.secrets.files.borg_pass_synapse.file}";
environment.BORG_RSH = "ssh -i ${config.secrets.files.ssh_key_synapse.file}";
compression = "auto,zstd";
startAt = "*-*-* 03:45:00";
user = "matrix-synapse";
};
};
}

View File

@ -1,26 +0,0 @@
{ config, ... }:
{
services.restic.backups = {
"postgres" = {
paths = [ "/var/lib/postgresql/backup" ];
repository = "sftp:restic@despondos.nao.sh:/etheria/backup/grondahl/postgres";
initialize = true;
pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" "--keep-yearly 75" ];
timerConfig = { "OnCalendar" = "03:15"; };
extraOptions = [ "sftp.command='ssh restic@despondos.nao.sh -i ${config.secrets.files.ssh_key.file} -s sftp'" ];
passwordFile = builtins.toString config.secrets.files.restic_pass.file;
user = "postgres";
};
"synapse" = {
paths = [ "/var/lib/matrix-synapse" ];
repository = "sftp:restic@despondos.nao.sh:/etheria/backup/grondahl/synapse";
initialize = true;
pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" "--keep-yearly 75" ];
timerConfig = { "OnCalendar" = "03:45"; };
extraOptions = [ "sftp.command='ssh restic@despondos.nao.sh -i ${config.secrets.files.ssh_key.file} -s sftp'" ];
passwordFile = builtins.toString config.secrets.files.restic_pass.file;
user = "matrix-synapse";
};
};
}

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, ... }:
{
imports = [
@ -16,7 +16,6 @@
./services/synapse.nix
./services/ttrss.nix
./services/gitea.nix
./services/grocy.nix
./services/restic.nix
./services/vaultwarden.nix
./services/wireguard.nix

View File

@ -1,11 +0,0 @@
{ config, ... }:
{
services.grocy = {
enable = true;
hostName = "grocy.graven.dev";
settings = {
currency = "DKK";
calendar.firstDayOfWeek = 1;
};
};
}

View File

@ -5,10 +5,10 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "9341b1027da2c2f95f8e808a3cb4b403e0a62c77",
"sha256": "1l996s518iv7bcfzzhxlsn35ahbslpbvhl3ds1zpnama7la23y9b",
"rev": "723f0eeb969a730db3c30f977c2b66b9dce9fe4a",
"sha256": "0016l7230gd2kdh0g2w573r9a2krqb7x4ifcjhhsn4h1bwap7qr0",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/9341b1027da2c2f95f8e808a3cb4b403e0a62c77.tar.gz",
"url": "https://github.com/nmattia/niv/archive/723f0eeb969a730db3c30f977c2b66b9dce9fe4a.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixos-hardware": {
@ -17,10 +17,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "bb2db418b616fea536b1be7f6ee72fb45c11afe0",
"sha256": "0cv2aivvw83j1x0wafhjcnpwcnglrrz3z726i9nvs2nkxs29h34w",
"rev": "72d53d51704295f1645d20384cd13aecc182f624",
"sha256": "0amvmkxp2x3sf1ya066wrsjn57q8vdhqi6fbsmyyvz04fpmq2m75",
"type": "tarball",
"url": "https://github.com/NixOS/nixos-hardware/archive/bb2db418b616fea536b1be7f6ee72fb45c11afe0.tar.gz",
"url": "https://github.com/NixOS/nixos-hardware/archive/72d53d51704295f1645d20384cd13aecc182f624.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
@ -29,10 +29,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5a237aecb57296f67276ac9ab296a41c23981f56",
"sha256": "166yxg4ff2jxvl9mbngd90dr1k3rdj6xmiccga41xynhh2zr0vmb",
"rev": "679cadfdfed2b90311a247b2d6ef6dfd3d6cab73",
"sha256": "05iybhlry8sg6qdgf7qx1d8rvq43ph32qgpar53g8yja300x0swz",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5a237aecb57296f67276ac9ab296a41c23981f56.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/679cadfdfed2b90311a247b2d6ef6dfd3d6cab73.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixus": {