Add wsudo command
This commit is contained in:
parent
82136c3045
commit
5976b79b5e
1 changed files with 13 additions and 1 deletions
|
@ -59,7 +59,19 @@ let
|
||||||
echo "Starting '$COMMAND' in env '$ENV_FILE'"
|
echo "Starting '$COMMAND' in env '$ENV_FILE'"
|
||||||
${pkgs.nix}/bin/nix-shell ''${ENV_FILE} --run "$COMMAND"
|
${pkgs.nix}/bin/nix-shell ''${ENV_FILE} --run "$COMMAND"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
wsudo = with pkgs.xorg; pkgs.writeScriptBin "wsudo" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#small script to enable root access to x-windows system
|
||||||
|
${xhost}/bin/xhost +SI:localuser:root
|
||||||
|
sudo $1
|
||||||
|
#disable root access after application terminates
|
||||||
|
${xhost}/bin/xhost -SI:localuser:root
|
||||||
|
#print access status to allow verification that root access was remov
|
||||||
|
ed
|
||||||
|
${xhost}/bin/xhost
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
home-manager.users.fhauser.home.packages =
|
home-manager.users.fhauser.home.packages =
|
||||||
[ passbemenu threema-vpn threema-env ];
|
[ passbemenu threema-vpn threema-env wsudo ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue