{ pkgs, nixosConfig, ... } @ file_inputs: let # Requires secrets.{gitlab_archiver_token, restic_music_env} # expected to be in default locations # Incase home.apps.manualBackupApps is running in container which passes secrets in from host secrets = if file_inputs ? "hostSecrets" then file_inputs.hostSecrets else nixosConfig.services.secrets.secrets; in { home.packages = with pkgs; [ restic (pkgs.writeShellScriptBin "restic-music" '' env $(cat ${secrets.restic_music_env.path}) \ ${pkgs.restic}/bin/restic $@ '') gitlab_archiver ]; }