From 2a216838ecc562532344884566fdfa33935b2b7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?=
-This file has 62553 words spanning 16386 lines and was last revised on 2025-05-24 17:27:46 +0200.
+This file has 62656 words spanning 16427 lines and was last revised on 2025-05-24 18:24:21 +0200.
@@ -763,7 +763,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
-My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2025-05-24 17:27:46 +0200)
+My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2025-05-24 18:24:21 +0200)
@@ -379,7 +379,7 @@
-
@@ -710,7 +710,7 @@
WLR_RENDERER_ALLOW_SOFTWARE=1 to allow this configuration to run in a virtualized environment. I also enable qemuGuest for a smoother experience when testing on QEMU.
{ self, inputs, config, pkgs, lib, primaryUser, ... }:
@@ -2880,8 +2880,8 @@ in
_: @@ -2891,8 +2891,8 @@ in
_:
@@ -4049,6 +4049,7 @@ if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
rm modules/home/common/git.nix
rm modules/home/common/mail.nix
rm modules/home/common/yubikey.nix
+ rm modules/nixos/server/restic.nix
rm modules/nixos/common/home-manager-extra.nix
nix flake update vbc-nix
git add .
@@ -4187,6 +4188,7 @@ if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
rm modules/home/common/git.nix
rm modules/home/common/mail.nix
rm modules/home/common/yubikey.nix
+ rm modules/nixos/server/restic.nix
rm modules/nixos/common/home-manager-extra.nix
rm -rf modules/nixos/server
rm -rf modules/home/server
@@ -4667,8 +4669,8 @@ appimageTools.wrapType2 {
This programs simply runs ssh-keygen on the last host that I tried to ssh into. I need this frequently when working with cloud-init usually. @@ -4817,8 +4819,8 @@ in
{ lib, config, ... }:
@@ -4885,8 +4887,8 @@ in
{ lib, config, ... }:
@@ -4950,8 +4952,8 @@ in
{ lib, config, ... }:
@@ -4983,8 +4985,8 @@ in
{ lib, config, ... }:
@@ -5005,8 +5007,8 @@ in
{ lib, config, ... }:
@@ -5027,8 +5029,8 @@ in
{ lib, config, ... }:
@@ -5049,8 +5051,8 @@ in
{ lib, config, ... }:
@@ -5071,8 +5073,8 @@ in
{ lib, config, ... }:
@@ -5093,8 +5095,8 @@ in
{ lib, config, ... }:
@@ -5115,8 +5117,8 @@ in
{ lib, config, ... }:
@@ -5142,6 +5144,7 @@ in
nginx = lib.mkDefault true;
ssh = lib.mkDefault true;
kavita = lib.mkDefault true;
+ restic = lib.mkDefault true;
jellyfin = lib.mkDefault true;
navidrome = lib.mkDefault true;
spotifyd = lib.mkDefault true;
@@ -5166,8 +5169,8 @@ in
{ lib, config, ... }:
@@ -5224,8 +5227,8 @@ in
{ lib, config, ... }:
@@ -5282,8 +5285,8 @@ in
{ lib, config, ... }:
@@ -5335,8 +5338,8 @@ in
{ lib, config, ... }:
@@ -5356,8 +5359,8 @@ in
{ lib, config, ... }:
@@ -5377,8 +5380,8 @@ in
{ lib, config, ... }:
@@ -5399,8 +5402,8 @@ in
{ lib, config, ... }:
@@ -5418,8 +5421,8 @@ in
{ lib, config, ... }:
@@ -6952,8 +6955,8 @@ Most of the time I am using power-saver, however, it is good to be
{ lib, pkgs, config, ... }:
@@ -9027,12 +9030,50 @@ Once this is finished, it will house a restic client that manages automatic back
-{ lib, config, ... }:
+{ lib, config, inputs, ... }:
+let
+ secretsDirectory = builtins.toString inputs.nix-secrets;
+ resticRepo = lib.swarselsystems.getSecret "${secretsDirectory}/restic/wintersRepo";
+in
{
options.swarselsystems.modules.server.restic = lib.mkEnableOption "enable restic backups on server";
config = lib.mkIf config.swarselsystems.modules.server.restic {
- # TODO
+ sops = {
+ secrets = {
+ resticpw = { };
+ resticaccesskey = { };
+ resticsecretaccesskey = { };
+ };
+ templates = {
+ "restic-env".content = ''
+ AWS_ACCESS_KEY_ID=${config.sops.placeholder.resticaccesskey}
+ AWS_SECRET_ACCESS_KEY=${config.sops.placeholder.resicsecretaccesskey}
+ '';
+ };
+ };
+
+ services.restic = {
+ backups = {
+ SwarselWinters = {
+ environmentFile = config.sops.templates."restic-env".path;
+ passwordFile = config.sops.secrets.resticpw.path;
+ paths = [
+ "/Vault/data/paperless"
+ "/Vault/Eternor/Paperless"
+ "/Vault/data/paperless"
+ "/Vault/Eternor/Bilder"
+ "/Vault/Eternor/Immich"
+ ];
+ repository = "${resticRepo}";
+ initialize = true;
+ timerConfig = {
+ OnCalendar = "19:00";
+ };
+ };
+
+ };
+ };
};
}
@@ -9665,8 +9706,8 @@ This smashes Atmosphere 1.3.2 on the switch, which is what I am currenty using.
This holds configuration that is specific to framework laptops. @@ -9704,8 +9745,8 @@ This holds configuration that is specific to framework laptops.
{ lib, config, ... }:
@@ -9721,8 +9762,8 @@ This holds configuration that is specific to framework laptops.
{ lib, config, ... }:
@@ -9744,8 +9785,8 @@ This holds configuration that is specific to framework laptops.
{ lib, config, ... }:
@@ -9776,8 +9817,8 @@ This holds configuration that is specific to framework laptops.
{ lib, config, ... }:
@@ -12693,8 +12734,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
{ lib, config, ... }:
@@ -13943,8 +13984,8 @@ in
This holds configuration that is specific to framework laptops. @@ -17784,8 +17825,8 @@ autocmd DocStart vc-impimba-1.m.imp.ac.at/ui/webconsole mode ignore
@@ -18282,7 +18323,7 @@ sync USER HOST: