6 Commits

Author SHA1 Message Date
John Lancaster
e662bb181a janus root 2026-01-03 15:37:44 -06:00
John Lancaster
cbce55a4fa added janus ssh target 2026-01-03 15:32:26 -06:00
John Lancaster
2e5f045bb2 fix 2026-01-03 15:05:34 -06:00
John Lancaster
fcb50fb567 reworked resticprofile scripts 2026-01-03 14:50:28 -06:00
John Lancaster
247d87adae added another exclude for john-nas 2026-01-03 00:31:17 -06:00
John Lancaster
e83fdadf7d soteria target updates 2025-12-28 12:21:32 -06:00
3 changed files with 28 additions and 9 deletions

View File

@@ -37,6 +37,7 @@
"/home/*/Videos" "/home/*/Videos"
"/home/*/go" "/home/*/go"
"/home/*/snap" "/home/*/snap"
"/home/john/john-nas"
]; ];
schedule-permission = "user"; schedule-permission = "user";
schedule-priority = "background"; schedule-priority = "background";

View File

@@ -46,20 +46,27 @@ in {
resticprofileCmd = '' resticprofileCmd = ''
${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml" ${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml"
''; '';
# Define the rp script as a variable so we can reference it
rpScript = pkgs.writeShellScriptBin "rp" ''
set -e
sudo ${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml" $@
'';
rpbackupScript = pkgs.writeShellScriptBin "rp-backup" ''
${rpScript}/bin/rp run-schedule backup@default
'';
in { in {
# Add a script to manually unschedule and reschedule all resticprofiles # Add a script to manually unschedule and reschedule all resticprofiles
home.packages = [ home.packages = [
cfg.package cfg.package
(pkgs.writeShellScriptBin "rp" '' rpScript
set -e rpbackupScript
sudo ${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml" $@
'')
(pkgs.writeShellScriptBin "rps" '' (pkgs.writeShellScriptBin "rps" ''
set -e set -e
rp unschedule --all ${rpScript}/bin/rp unschedule --all
rp schedule --all ${rpScript}/bin/rp schedule --all
'') '')
(pkgs.writeShellScriptBin "rp-test" "rp run-schedule backup@default --dry-run") (pkgs.writeShellScriptBin "rp-test" "${rpbackupScript}/bin/rp-backup --dry-run")
]; ];
xdg.configFile."resticprofile/profiles.yaml".source = yamlFormat.generate "profiles" { xdg.configFile."resticprofile/profiles.yaml".source = yamlFormat.generate "profiles" {
version = "2"; version = "2";

View File

@@ -70,8 +70,19 @@
hostname = "192.168.1.129"; hostname = "192.168.1.129";
user = "root"; user = "root";
}; };
"soteria.john-stream.com" = { "janus" = {
hostname = "192.168.1.142"; hostname = "janus.john-stream.com";
user = "root";
identitiesOnly = true;
identityFile = "~/.ssh/id_ed25519";
certificateFile = "~/.ssh/id_ed25519-cert.pub";
};
"soteria" = {
hostname = "soteria.john-stream.com";
user = "john";
identitiesOnly = true;
identityFile = "~/.ssh/id_ed25519";
certificateFile = "~/.ssh/id_ed25519-cert.pub";
}; };
"*.john-stream.com" = { "*.john-stream.com" = {
user = "john"; user = "john";