home: use lib.getExe where applicable
This commit is contained in:
parent
097357e838
commit
3576d4081a
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
|
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
|
||||||
firejail -- ${pkgs.qutebrowser}/bin/qutebrowser "$@"
|
${pkgs.firejail}/bin/firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix];
|
imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix];
|
||||||
@ -29,7 +30,7 @@ in {
|
|||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
home.sessionVariables = rec {
|
home.sessionVariables = rec {
|
||||||
BROWSER = "${qutebrowser_firejail}/bin/qutebrowser";
|
BROWSER = lib.getExe qutebrowser_firejail;
|
||||||
DEFAULT_BROWSER = "${BROWSER}";
|
DEFAULT_BROWSER = "${BROWSER}";
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
@ -220,8 +221,8 @@ in {
|
|||||||
swayidle = let
|
swayidle = let
|
||||||
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
|
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
|
||||||
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
|
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
|
||||||
${pkgs.grim}/bin/grim -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
|
${lib.getExe pkgs.grim} -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
|
||||||
${pkgs.swaylock}/bin/swaylock -f -i "$TMP_FILE"
|
${lib.getExe pkgs.swaylock} -f -i "$TMP_FILE"
|
||||||
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
|
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
|
||||||
${pkgs.chromium}/bin/chromium --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
|
${lib.getExe pkgs.chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
|
||||||
'';
|
'';
|
||||||
chromium_discord = pkgs.writeShellScriptBin "chromium_discord" ''
|
chromium_discord = pkgs.writeShellScriptBin "chromium_discord" ''
|
||||||
${pkgs.chromium}/bin/chromium --socket=wayland org.chromium.Chromium --app=https://discordapp.com/channels/@me
|
${lib.getExe pkgs.chromium} --socket=wayland org.chromium.Chromium --app=https://discordapp.com/channels/@me
|
||||||
'';
|
'';
|
||||||
chromium_stackfield = pkgs.writeShellScriptBin "chromium_stackfield" ''
|
chromium_stackfield = pkgs.writeShellScriptBin "chromium_stackfield" ''
|
||||||
${pkgs.chromium}/bin/chromium --socket=wayland org.chromium.Chromium --app=https://stackfield.com/
|
${lib.getExe pkgs.chromium} --socket=wayland org.chromium.Chromium --app=https://stackfield.com/
|
||||||
'';
|
'';
|
||||||
ssh_proxy = pkgs.writeShellScriptBin "ssh_proxy" ''
|
ssh_proxy = pkgs.writeShellScriptBin "ssh_proxy" ''
|
||||||
if ${pkgs.coreutils}/bin/test $# -ne 1; then
|
if ${pkgs.coreutils}/bin/test $# -ne 1; then
|
||||||
@ -19,7 +20,7 @@
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
PROXY_PORT="1337"
|
PROXY_PORT="1337"
|
||||||
${pkgs.openssh}/bin/ssh -D "$PROXY_PORT" -q -N "$@"
|
${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@"
|
||||||
'';
|
'';
|
||||||
wrap_sh = let
|
wrap_sh = let
|
||||||
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix {};
|
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix {};
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user