nix: use store paths for user binaries
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
ef7763bfbc
commit
0b0b1bd8ea
4 changed files with 17 additions and 12 deletions
|
@ -16,9 +16,9 @@ with lib; let
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
jq = "${pkgs.jq}/bin/jq";
|
||||||
kill = "${pkgs.procps}/bin/kill";
|
kill = "${pkgs.procps}/bin/kill";
|
||||||
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
||||||
left = "~/.local/bin/left";
|
left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source;
|
||||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||||
menu = "~/.local/bin/menu";
|
menu = config.home-manager.users.${config.custom.username}.home.file.".local/bin/menu".source;
|
||||||
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
||||||
networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
|
networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
|
||||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
||||||
|
|
|
@ -9,7 +9,7 @@ with lib; let
|
||||||
firefox-esr = "${
|
firefox-esr = "${
|
||||||
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
|
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
|
||||||
}/bin/firefox-esr";
|
}/bin/firefox-esr";
|
||||||
left = "~/.local/bin/left";
|
left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source;
|
||||||
pkill = "${pkgs.procps}/bin/pkill";
|
pkill = "${pkgs.procps}/bin/pkill";
|
||||||
rm = "${pkgs.coreutils}/bin/rm";
|
rm = "${pkgs.coreutils}/bin/rm";
|
||||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
|
menu = config.home-manager.users.${config.custom.username}.home.file.".local/bin/menu".source;
|
||||||
|
|
||||||
cfg = config.custom.programs.networkmanager-dmenu;
|
cfg = config.custom.programs.networkmanager-dmenu;
|
||||||
in {
|
in {
|
||||||
options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;};
|
options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;};
|
||||||
|
@ -13,11 +15,9 @@ in {
|
||||||
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
||||||
#!! Option not available, files written directly
|
#!! Option not available, files written directly
|
||||||
# FIXME: active_chars does not take effect
|
# FIXME: active_chars does not take effect
|
||||||
home.file.".config/networkmanager-dmenu/config.ini".text = let
|
home.file.".config/networkmanager-dmenu/config.ini".text = ''
|
||||||
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
|
|
||||||
in ''
|
|
||||||
[dmenu]
|
[dmenu]
|
||||||
dmenu_command = ${wofi} --dmenu --lines 11
|
dmenu_command = ${menu} --input
|
||||||
active_chars = >
|
active_chars = >
|
||||||
wifi_icons =
|
wifi_icons =
|
||||||
format = {icon} {name}
|
format = {icon} {name}
|
||||||
|
|
|
@ -13,13 +13,16 @@ with lib; let
|
||||||
hyprctl = "${
|
hyprctl = "${
|
||||||
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage
|
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage
|
||||||
}/bin/hyprctl";
|
}/bin/hyprctl";
|
||||||
|
inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source;
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
jq = "${pkgs.jq}/bin/jq";
|
||||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||||
|
network = config.home-manager.users.${config.custom.username}.home.file.".local/bin/network".source;
|
||||||
nm-connection-editor = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
nm-connection-editor = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
||||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||||
ping = "${pkgs.iputils}/bin/ping";
|
ping = "${pkgs.iputils}/bin/ping";
|
||||||
pkill = "${pkgs.procps}/bin/pkill";
|
pkill = "${pkgs.procps}/bin/pkill";
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
|
power = config.home-manager.users.${config.custom.username}.home.file.".local/bin/power".source;
|
||||||
rfkill = "${pkgs.util-linux}/bin/rfkill";
|
rfkill = "${pkgs.util-linux}/bin/rfkill";
|
||||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||||
swaync-client = "${
|
swaync-client = "${
|
||||||
|
@ -29,6 +32,8 @@ with lib; let
|
||||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||||
systemd-inhibit = "${pkgs.systemd}/bin/systemd-inhibit";
|
systemd-inhibit = "${pkgs.systemd}/bin/systemd-inhibit";
|
||||||
tailscale = "${pkgs.tailscale}/bin/tailscale";
|
tailscale = "${pkgs.tailscale}/bin/tailscale";
|
||||||
|
vm = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vm".source;
|
||||||
|
vpn = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vpn".source;
|
||||||
wttrbar = "${pkgs.wttrbar}/bin/wttrbar";
|
wttrbar = "${pkgs.wttrbar}/bin/wttrbar";
|
||||||
|
|
||||||
cfg = config.custom.programs.waybar;
|
cfg = config.custom.programs.waybar;
|
||||||
|
@ -126,13 +131,13 @@ in {
|
||||||
"custom/inhibitor" = {
|
"custom/inhibitor" = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
exec = "~/.config/waybar/scripts/inhibitor.sh";
|
exec = "~/.config/waybar/scripts/inhibitor.sh";
|
||||||
on-click = "~/.local/bin/inhibit";
|
on-click = inhibit;
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/vm" = {
|
"custom/vm" = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
exec = "~/.config/waybar/scripts/vm.sh";
|
exec = "~/.config/waybar/scripts/vm.sh";
|
||||||
on-click = "~/.local/bin/vm -x ${
|
on-click = "${vm} -x ${
|
||||||
if config.custom.hidpi
|
if config.custom.hidpi
|
||||||
then "/scale:140"
|
then "/scale:140"
|
||||||
else ""
|
else ""
|
||||||
|
@ -142,7 +147,7 @@ in {
|
||||||
"custom/vpn" = {
|
"custom/vpn" = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
exec = "~/.config/waybar/scripts/vpn.sh";
|
exec = "~/.config/waybar/scripts/vpn.sh";
|
||||||
on-click = "~/.local/bin/vpn mypi3";
|
on-click = "${vpn} mypi3";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor
|
# https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor
|
||||||
|
@ -281,7 +286,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
on-click = nm-connection-editor;
|
on-click = nm-connection-editor;
|
||||||
on-click-right = "~/.local/bin/network"; # Toggle networking on/off
|
on-click-right = network; # Toggle networking on/off
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Battery
|
# https://github.com/Alexays/Waybar/wiki/Module:-Battery
|
||||||
|
@ -306,7 +311,7 @@ in {
|
||||||
warning = 30;
|
warning = 30;
|
||||||
};
|
};
|
||||||
|
|
||||||
on-click = "~/.local/bin/power"; # Toggle power-saver mode
|
on-click = power; # Toggle power-saver mode
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue