scripts
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
"*.csv"
|
"*.csv"
|
||||||
"*.m4a"
|
"*.m4a"
|
||||||
];
|
];
|
||||||
schedule-permission = "system";
|
schedule-permission = "user";
|
||||||
schedule-priority = "background";
|
schedule-priority = "background";
|
||||||
check-after = true;
|
check-after = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,11 +39,29 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable (
|
||||||
home.packages = [ cfg.package ];
|
let
|
||||||
xdg.configFile."resticprofile/profiles.yaml".source = yamlFormat.generate "profiles" {
|
resticprofileCmd = ''
|
||||||
version = "2";
|
${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml"
|
||||||
profiles = profiles;
|
'';
|
||||||
};
|
in {
|
||||||
};
|
# Add a script to manually unschedule and reschedule all resticprofiles
|
||||||
|
home.packages = [
|
||||||
|
cfg.package
|
||||||
|
(pkgs.writeShellScriptBin "rp" ''
|
||||||
|
set -e
|
||||||
|
sudo ${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml" $@
|
||||||
|
'')
|
||||||
|
(pkgs.writeShellScriptBin "rps" ''
|
||||||
|
set -e
|
||||||
|
rp unschedule --all
|
||||||
|
rp schedule --all
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
xdg.configFile."resticprofile/profiles.yaml".source = yamlFormat.generate "profiles" {
|
||||||
|
version = "2";
|
||||||
|
profiles = profiles;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user