summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif')
-rw-r--r--accounts/gkleen@sif/default.nix26
1 files changed, 25 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix
index 64e1e6c0..4f4897f5 100644
--- a/accounts/gkleen@sif/default.nix
+++ b/accounts/gkleen@sif/default.nix
@@ -59,6 +59,30 @@ let
59 wrapProgram $out/bin/zulip \ 59 wrapProgram $out/bin/zulip \
60 --add-flags '--force-device-scale-factor=1.6' 60 --add-flags '--force-device-scale-factor=1.6'
61 ''; 61 '';
62 sshpassSecret = pkgs.writeScriptBin "sshpass-secret" ''
63 #!${pkgs.zsh}/bin/zsh -e
64
65 typeset -a cmd
66 cmd=()
67
68 while
69 if [[ "$#" -le 0 ]]; then
70 echo "Insufficient arguments" >&2
71 exit 2
72 fi
73 arg="''${1}"
74 shift
75 do
76 [[ "''${arg}" == '--' ]] && break
77 user=''${arg%@*}
78 host=''${arg#*@}
79 exec {fdnum}< <(${pkgs.gnome.libsecret}/bin/secret-tool lookup service sshpass host "''${host}" user "''${user}")
80 cmd+=(${pkgs.sshpass}/bin/sshpass -d ''${fdnum} -P "''${user}@''${host}'s password:")
81 done
82
83 cmd+=($@)
84 exec -a ''${cmd[1]} -- $cmd
85 '';
62in { 86in {
63 imports = with flake.nixosModules.userProfiles.${userName}; [ 87 imports = with flake.nixosModules.userProfiles.${userName}; [
64 mpv yt-dlp 88 mpv yt-dlp
@@ -279,7 +303,7 @@ in {
279 skype virt-manager rclone cached-nix-shell xournal discord 303 skype virt-manager rclone cached-nix-shell xournal discord
280 xmonad worktime fira-code-symbols emacsclientDesktopItem 304 xmonad worktime fira-code-symbols emacsclientDesktopItem
281 libreoffice xournalpp wrappedChrome nixos-shell virt-viewer 305 libreoffice xournalpp wrappedChrome nixos-shell virt-viewer
282 freerdp 306 freerdp gnome-icon-theme paper-icon-theme sshpassSecret
283 ]; 307 ];
284 308
285 file = { 309 file = {