nixpkgs deprecated lib.getExe on packages without a mainprogram

This commit is contained in:
Rouven Seifert 2023-08-03 13:30:40 +02:00
parent 816f6fc3bd
commit 741ebd293d
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
14 changed files with 34 additions and 33 deletions

View file

@ -4,7 +4,7 @@
## Specs ## Specs
- **Operating System:** [NixOS](https://nixos.org) - **Operating System:** [NixOS](https://nixos.org)
- **Window Manager:** [Sway](https://swaywm.org/) - **Window Manager:** [River](https://github.com/riverwm/river)
- **Overall Theme:** [Base16 Dracula](https://github.com/dracula/base16-dracula-scheme) - **Overall Theme:** [Base16 Dracula](https://github.com/dracula/base16-dracula-scheme)
- **Shell:** [Zsh](https://www.zsh.org/) - **Shell:** [Zsh](https://www.zsh.org/)
- **Terminal:** [Foot](https://codeberg.org/dnkl/foot) - **Terminal:** [Foot](https://codeberg.org/dnkl/foot)

View file

@ -171,11 +171,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690982105, "lastModified": 1691039228,
"narHash": "sha256-32AzoLuwhtxBItcULRiCnxRfJcbVXbPZSH9TDVg21mU=", "narHash": "sha256-iPNZJ1LvfUf1Y456ewC0DXgf99TNssG8OLObOyqxO6M=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b2ac1d2c32ac11b8d231d23622cdc4b2f28d07d2", "rev": "86dd48d70a2e2c17e84e747ba4faa92453e68d4a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -301,11 +301,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1690881714, "lastModified": 1691006197,
"narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=", "narHash": "sha256-DbtxVWPt+ZP5W0Usg7jAyTomIM//c3Jtfa59Ht7AV8s=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9e1960bc196baf6881340d53dccb203a951745a2", "rev": "66aedfd010204949cb225cf749be08cb13ce1813",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -23,8 +23,8 @@
description = "Crowdsec agent"; description = "Crowdsec agent";
serviceConfig = { serviceConfig = {
Type = "notify"; Type = "notify";
ExecStartPre = "${lib.getExe pkgs.crowdsec} -t -error"; ExecStartPre = "${pkgs.crowdsec}/bin/crowdsec -t -error";
ExecStart = "${lib.getExe pkgs.crowdsec}"; ExecStart = "${pkgs.crowdsec}/bin/crowdsec";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Restart = "always"; Restart = "always";
RestartSec = 60; RestartSec = 60;

View file

@ -27,7 +27,7 @@
]; ];
#loader.systemd-boot.editor = false; loader.systemd-boot.editor = false;
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
tmp.useTmpfs = true; tmp.useTmpfs = true;
@ -67,6 +67,7 @@
"/etc/ssh" "/etc/ssh"
"/etc/secureboot" "/etc/secureboot"
"/root/.ssh" "/root/.ssh"
"/root/.local/share/zsh"
]; ];
files = [ files = [
"/etc/machine-id" "/etc/machine-id"

View file

@ -4,7 +4,7 @@
enable = true; enable = true;
settings = { settings = {
default_session = { default_session = {
command = "${lib.getExe pkgs.greetd.tuigreet} --cmd river"; command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd river";
}; };
}; };
}; };

View file

@ -23,6 +23,7 @@ buildGoModule rec {
homepage = "https://github.com/abenz1267/pww"; homepage = "https://github.com/abenz1267/pww";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ therealr5 ]; maintainers = with maintainers; [ therealr5 ];
mainProgram = "pww";
platforms = platforms.all; platforms = platforms.all;
}; };
} }

View file

@ -7,7 +7,7 @@
clock24 = true; clock24 = true;
extraConfig = extraConfig =
'' ''
set -g default-shell ${lib.getExe pkgs.zsh} set -g default-shell ${pkgs.zsh}/bin/zsh
bind P display-popup bind P display-popup
set -sg escape-time 10 set -sg escape-time 10
set -g @dracula-plugins "git time" set -g @dracula-plugins "git time"

View file

@ -24,7 +24,7 @@
la = "ls -a"; la = "ls -a";
less = "bat"; less = "bat";
update = "cd /etc/nixos && nix flake update"; update = "cd /etc/nixos && nix flake update";
garbage = "${lib.getExe pkgs.home-manager} expire-generations \"-0 days\" && sudo nix-collect-garbage -d"; garbage = "${pkgs.home-manager}/bin/home-manager expire-generations \"-0 days\" && sudo nix-collect-garbage -d";
}; };
histSize = 100000; histSize = 100000;
histFile = "~/.local/share/zsh/history"; histFile = "~/.local/share/zsh/history";
@ -80,7 +80,7 @@
then then
cat ${../images/cat.sixel} cat ${../images/cat.sixel}
fi fi
eval "$(${lib.getExe pkgs.mcfly} init zsh)" eval "$(${pkgs.mcfly}/bin/mcfly init zsh)"
''; '';
}; };
} }

View file

@ -8,7 +8,7 @@
server.enable = true; server.enable = true;
settings = rec { settings = rec {
main = { main = {
shell = lib.getExe pkgs.zsh; shell = "${pkgs.zsh}/bin/zsh";
dpi-aware = "yes"; dpi-aware = "yes";
font = "monospace:family=Iosevka Nerd Font, size=8"; font = "monospace:family=Iosevka Nerd Font, size=8";
notify = "${lib.getExe pkgs.libnotify} -a \${app-id} -i \${app-id} \${title} \${body}"; notify = "${lib.getExe pkgs.libnotify} -a \${app-id} -i \${app-id} \${title} \${body}";

View file

@ -1,12 +1,12 @@
{ pkgs, lib, ... }: { pkgs, ... }:
{ {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Rouven Seifert"; userName = "Rouven Seifert";
userEmail = "rouven@rfive.de"; userEmail = "rouven@rfive.de";
extraConfig = { extraConfig = {
core.pager = lib.getExe pkgs.delta; core.pager = "${pkgs.delta}/bin/delta";
interactive.diffFilter = "${lib.getExe pkgs.delta} --color-only"; interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
delta = { delta = {
navigate = true; navigate = true;
light = false; light = false;

View file

@ -58,7 +58,7 @@
icon-theme=${config.gtk.iconTheme.name} icon-theme=${config.gtk.iconTheme.name}
show-actions=yes show-actions=yes
width=80 width=80
terminal=${lib.getExe pkgs.foot} terminal=${pkgs.foot}/bin/foot
[colors] [colors]
background=${config.colorScheme.colors.base00}ff background=${config.colorScheme.colors.base00}ff

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
river river
@ -25,7 +25,7 @@
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad drag enabled riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad drag enabled
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad middle-emulation enabled riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad middle-emulation enabled
riverctl spawn "${lib.getExe pkgs.swaybg} -i ${../../../../images/wallpaper.png}" riverctl spawn "${pkgs.swaybg}/bin/swaybg -i ${../../../../images/wallpaper.png}"
riverctl map normal Super Return spawn footclient riverctl map normal Super Return spawn footclient
riverctl map normal Super+Shift Return zoom riverctl map normal Super+Shift Return zoom
@ -48,7 +48,7 @@
riverctl map-pointer normal Super BTN_RIGHT resize-view riverctl map-pointer normal Super BTN_RIGHT resize-view
riverctl map normal Alt Space spawn ${lib.getExe pkgs.fuzzel} riverctl map normal Alt Space spawn ${pkgs.fuzzel}/bin/fuzzel
riverctl map normal Super Space toggle-float riverctl map normal Super Space toggle-float
for i in $(seq 1 9) for i in $(seq 1 9)
@ -68,10 +68,10 @@
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
done done
riverctl map normal None Print spawn "${lib.getExe pkgs.sway-contrib.grimshot} copy area" riverctl map normal None Print spawn "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"
riverctl map normal None XF86Launch2 spawn "${lib.getExe pkgs.sway-contrib.grimshot} save area - | ${lib.getExe pkgs.swappy} -f -" riverctl map normal None XF86Launch2 spawn "${pkgs.sway-contrib.grimshot}/bin/grimshot save area - | ${pkgs.swappy}/bin/swappy -f -"
riverctl map normal None XF86MonBrightnessUp spawn "${lib.getExe pkgs.light} -A 10" riverctl map normal None XF86MonBrightnessUp spawn "${pkgs.light}/bin/light -A 10"
riverctl map normal None XF86MonBrightnessDown spawn "${lib.getExe pkgs.light} -U 10" riverctl map normal None XF86MonBrightnessDown spawn "${pkgs.light}/bin/light -U 10"
riverctl map normal None XF86AudioMute spawn "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle" riverctl map normal None XF86AudioMute spawn "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"
riverctl map normal None XF86AudioMicMute spawn "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle" riverctl map normal None XF86AudioMicMute spawn "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"
riverctl map normal None XF86AudioRaiseVolume spawn "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%" riverctl map normal None XF86AudioRaiseVolume spawn "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"
@ -79,7 +79,6 @@
riverctl map normal Shift XF86AudioRaiseVolume spawn "${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ +5%" riverctl map normal Shift XF86AudioRaiseVolume spawn "${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ +5%"
riverctl map normal Shift XF86AudioLowerVolume spawn "${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%" riverctl map normal Shift XF86AudioLowerVolume spawn "${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%"
riverctl map normal None XF86Favorites spawn "${pkgs.systemd}/bin/loginctl lock-session" riverctl map normal None XF86Favorites spawn "${pkgs.systemd}/bin/loginctl lock-session"
# riverctl map normal None XF86PowerOff spawn "${lib.getExe pkgs.wlogout}"
riverctl map normal None XF86Messenger spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel" riverctl map normal None XF86Messenger spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel"
riverctl map normal None Cancel spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest" riverctl map normal None Cancel spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest"
riverctl map normal Shift Cancel spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --cloes-all" riverctl map normal Shift Cancel spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --cloes-all"

View file

@ -35,10 +35,10 @@
keybindings = keybindings =
lib.mkOptionDefault { lib.mkOptionDefault {
"Mod1+space" = "exec ${menu}"; "Mod1+space" = "exec ${menu}";
"Print" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} copy area"; "Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
"XF86Launch2" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} save area - | ${lib.getExe pkgs.swappy} -f -"; "XF86Launch2" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot save area - | ${lib.getExe pkgs.swappy} -f -";
"XF86MonBrightnessUp" = "exec ${lib.getExe pkgs.light} -A 10"; "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10";
"XF86MonBrightnessDown" = "exec ${lib.getExe pkgs.light} -U 10"; "XF86MonBrightnessDown" = "exec ${kgs.light}/bin/light -U 10";
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
@ -47,7 +47,7 @@
"Shift+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%"; "Shift+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%";
"XF86Favorites" = "exec ${pkgs.systemd}/bin/loginctl lock-session"; "XF86Favorites" = "exec ${pkgs.systemd}/bin/loginctl lock-session";
"XF86PowerOff" = "exec ${lib.getExe pkgs.wlogout}"; "XF86PowerOff" = "exec ${pkgs.wlogout}/bin/wlogout";
"XF86Messenger" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel"; "XF86Messenger" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel";
"Cancel" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest"; "Cancel" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest";

View file

@ -71,7 +71,7 @@ in
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
Service = { ExecStart = getExe cfg.package; }; Service = { ExecStart = "${cfg.package}/bin/shikane"; };
Install = { WantedBy = [ "graphical-session.target" ]; }; Install = { WantedBy = [ "graphical-session.target" ]; };
}; };