summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/wayland/modules/sway/home.nix2
-rw-r--r--home/wayland/pkgs/wayland-scripts/default.nix3
-rwxr-xr-xhome/wayland/pkgs/wayland-scripts/src/bin/daskpass3
3 files changed, 8 insertions, 0 deletions
diff --git a/home/wayland/modules/sway/home.nix b/home/wayland/modules/sway/home.nix
index b1d5465..5c2fb47 100644
--- a/home/wayland/modules/sway/home.nix
+++ b/home/wayland/modules/sway/home.nix
@@ -8,6 +8,7 @@
background = "${config.xdg.dataHome}/wayland/desktop";
wayland-scripts = pkgs.callPackage ../../pkgs/wayland-scripts {};
cwall = "${wayland-scripts}/bin/cwall";
+ daskpass = "${wayland-scripts}/bin/daskpass";
bemenu = "${pkgs.bemenu}/bin/bemenu-run --prompt ' '";
foot = lib.getExe config.programs.foot.package;
@@ -51,6 +52,7 @@ in {
];
sessionVariables = {
+ SUDO_ASKPASS = daskpass;
XDG_CURRENT_DESKTOP = "sway";
GRIM_DEFAULT_DIR = config.xdg.userDirs.pictures + "/ss";
};
diff --git a/home/wayland/pkgs/wayland-scripts/default.nix b/home/wayland/pkgs/wayland-scripts/default.nix
index b43f4b7..c96ad22 100644
--- a/home/wayland/pkgs/wayland-scripts/default.nix
+++ b/home/wayland/pkgs/wayland-scripts/default.nix
@@ -10,6 +10,7 @@
imv,
grim,
slurp,
+ bemenu,
}:
stdenvNoCC.mkDerivation {
@@ -37,6 +38,8 @@ stdenvNoCC.mkDerivation {
postInstall = ''
wrapProgram $out/bin/cwall \
--prefix PATH : ${lib.makeBinPath [ ffmpeg libnotify sway ]}
+ wrapProgram $out/bin/daskpass \
+ --prefix PATH : ${lib.makeBinPath [ bemenu ]}
wrapProgram $out/bin/ttyasrt \
--prefix PATH : ${lib.makeBinPath [ libnotify ]}
wrapProgram $out/bin/freezshot \
diff --git a/home/wayland/pkgs/wayland-scripts/src/bin/daskpass b/home/wayland/pkgs/wayland-scripts/src/bin/daskpass
new file mode 100755
index 0000000..90cf135
--- /dev/null
+++ b/home/wayland/pkgs/wayland-scripts/src/bin/daskpass
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+printf "" | bemenu --password indicator --prompt " ${1:-"Authentication Required: "}"