commit 6ff9cc03cfbd033fdab5e3281f0b8e2c89601d0c
parent 719fc3aec9dc6eea95f78f6527e96b694cb87c67
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 19 Nov 2024 11:20:22 +0100
parent 719fc3aec9dc6eea95f78f6527e96b694cb87c67
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 19 Nov 2024 11:20:22 +0100
machines/briefkasten: move syncthing to user `katja`
6 files changed, 41 insertions(+), 27 deletions(-)
diff --git a/configurations/common/programs/scripts.nix b/configurations/common/programs/scripts.nix @@ -22,7 +22,7 @@ let NIXFILES="`git rev-parse --show-toplevel`/" SSH_HOST="''${HOST:-briefkasten.ctu.cx}" - rsync -Pavh $NIXFILES $SSH_HOST:/home/leah/nixfiles/ + rsync -Pavh $NIXFILES $SSH_HOST:/home/katja/nixfiles/ ssh -A -S none $SSH_HOST nix shell nixpkgs#colmena --command colmena -f ./nixfiles/flake.nix "$@" ''; @@ -135,15 +135,15 @@ let copyResticRepos; #restic backups - resticBackupFolder audiobooks /nix/persist/home/leah/syncthing/Audiobooks; - resticBackupFolder bahn-richtlinien /nix/persist/home/leah/syncthing/Bahn-Richtlinien; - resticBackupFolder documents /nix/persist/home/leah/syncthing/Documents; - resticBackupFolder media-legacy /nix/persist/home/leah/syncthing/Media\ \(legacy\); - resticBackupFolder music /nix/persist/home/leah/syncthing/Music; - resticBackupFolder music-originals /nix/persist/home/leah/syncthing/Music\ \(Originals\); - resticBackupFolder pictures /nix/persist/home/leah/syncthing/Pictures; - resticBackupFolder videos /nix/persist/home/leah/syncthing/Videos; - resticBackupFolder wiki /nix/persist/home/leah/syncthing/Wiki; + resticBackupFolder audiobooks /nix/persist/home/katja/syncthing/Audiobooks; + resticBackupFolder bahn-richtlinien /nix/persist/home/katja/syncthing/Bahn-Richtlinien; + resticBackupFolder documents /nix/persist/home/katja/syncthing/Documents; + resticBackupFolder media-legacy /nix/persist/home/katja/syncthing/Media\ \(legacy\); + resticBackupFolder music /nix/persist/home/katja/syncthing/Music; + resticBackupFolder music-originals /nix/persist/home/katja/syncthing/Music\ \(Originals\); + resticBackupFolder pictures /nix/persist/home/katja/syncthing/Pictures; + resticBackupFolder videos /nix/persist/home/katja/syncthing/Videos; + resticBackupFolder wiki /nix/persist/home/katja/syncthing/Wiki; ''; in {
diff --git a/machines/briefkasten/impermanence.nix b/machines/briefkasten/impermanence.nix @@ -7,8 +7,8 @@ ]; services.syncthing = { - dataDir = "/nix/persist/home/leah/syncthing"; - configDir = "/nix/persist/home/leah/.config/syncthing"; + dataDir = "/nix/persist/home/katja/syncthing"; + configDir = "/nix/persist/home/katja/.config/syncthing"; }; age.identityPaths = [ @@ -38,6 +38,20 @@ home.persistence."/nix/persist/home/leah" = { allowOther = true; + files = [ + ".bash_history" + ".local/share/mcfly/history.db" + ]; + }; + }; + + home-manager.users.katja = { + imports = [ + inputs.impermanence.nixosModules.home-manager.impermanence + ]; + + home.persistence."/nix/persist/home/katja" = { + allowOther = true; directories = [ "syncthing" ];
diff --git a/machines/briefkasten/syncthing.nix b/machines/briefkasten/syncthing.nix @@ -2,17 +2,17 @@ let backups = { - audiobooks = "/nix/persist/home/leah/syncthing/Audiobooks"; - documents = "/nix/persist/home/leah/syncthing/Documents"; - music-orig = "/nix/persist/home/leah/syncthing/Music (Originals)"; - music = "/nix/persist/home/leah/syncthing/Music"; - pictures = "/nix/persist/home/leah/syncthing/Pictures"; - media = "/nix/persist/home/leah/syncthing/Media (legacy)"; - - bahn-richtlinien = "/nix/persist/home/leah/syncthing/Bahn-Richtlinien"; - blechelse = "/nix/persist/home/leah/syncthing/Bahn-Blechelse"; - cutieshare = "/nix/persist/home/leah/syncthing/Cutieshare"; - wiki = "/nix/persist/home/leah/syncthing/Wiki"; + audiobooks = "/nix/persist/home/katja/syncthing/Audiobooks"; + documents = "/nix/persist/home/katja/syncthing/Documents"; + music-orig = "/nix/persist/home/katja/syncthing/Music (Originals)"; + music = "/nix/persist/home/katja/syncthing/Music"; + pictures = "/nix/persist/home/katja/syncthing/Pictures"; + media = "/nix/persist/home/katja/syncthing/Media (legacy)"; + + bahn-richtlinien = "/nix/persist/home/katja/syncthing/Bahn-Richtlinien"; + blechelse = "/nix/persist/home/katja/syncthing/Bahn-Blechelse"; + cutieshare = "/nix/persist/home/katja/syncthing/Cutieshare"; + wiki = "/nix/persist/home/katja/syncthing/Wiki"; }; in { @@ -34,7 +34,7 @@ in { restic-backups = lib.mapAttrs' ( name: path: lib.nameValuePair "syncthing-${name}" { - user = "leah"; + user = "katja"; passwordFile = config.age.secrets."restic-syncthing-${name}".path; paths = [ path ]; targets = [ "wanderduene.ctu.cx" ];
diff --git a/machines/briefkasten/websites/audiobooks.home.ctu.cx.nix b/machines/briefkasten/websites/audiobooks.home.ctu.cx.nix @@ -6,7 +6,7 @@ services.dnsmasq.settings.cname = [ "audiobooks.home.ctu.cx, ${config.networking.fqdn}" ]; fileSystems."/mnt/audiobooks" = { - device = "/nix/persist/home/leah/syncthing/Audiobooks"; + device = "/nix/persist/home/katja/syncthing/Audiobooks"; options = [ "bind" "ro" ]; };
diff --git a/machines/briefkasten/websites/music.home.ctu.cx.nix b/machines/briefkasten/websites/music.home.ctu.cx.nix @@ -13,7 +13,7 @@ in { services.dnsmasq.settings.cname = [ "music.home.ctu.cx, ${config.networking.fqdn}" ]; fileSystems."/mnt/music_originals" = { - device = "/nix/persist/home/leah/syncthing/Music (Originals)"; + device = "/nix/persist/home/katja/syncthing/Music (Originals)"; options = [ "bind" "ro" ]; };
diff --git a/machines/briefkasten/websites/photos.ctu.cx.nix b/machines/briefkasten/websites/photos.ctu.cx.nix @@ -33,7 +33,7 @@ in { dns.zones."ctu.cx".subdomains.photos.CNAME = lib.mkIf config.networking.usePBBUplink [ "${config.networking.fqdn}." ]; fileSystems."/mnt/photos.ctu.cx" = { - device = "/nix/persist/home/leah/syncthing/Pictures/photos.ctu.cx"; + device = "/nix/persist/home/katja/syncthing/Pictures/photos.ctu.cx"; options = [ "bind" "ro" ]; };