From 741ebd293d51d19675d38ddf47fc516de818f346 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Thu, 3 Aug 2023 13:30:40 +0200 Subject: [PATCH] nixpkgs deprecated lib.getExe on packages without a mainprogram --- README.md | 2 +- flake.lock | 12 ++++++------ hosts/falkenstein-1/modules/crowdsec/default.nix | 4 ++-- hosts/thinkpad/default.nix | 3 ++- hosts/thinkpad/modules/greetd/default.nix | 2 +- pkgs/pww/default.nix | 1 + shared/tmux.nix | 2 +- shared/zsh.nix | 4 ++-- users/rouven/modules/foot/default.nix | 2 +- users/rouven/modules/git/default.nix | 6 +++--- users/rouven/modules/wayland/default.nix | 2 +- users/rouven/modules/wayland/river.nix | 15 +++++++-------- users/rouven/modules/wayland/sway.nix | 10 +++++----- users/rouven/options/shikane.nix | 2 +- 14 files changed, 34 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 6f7fb03..eafd39f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Specs - **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) - **Shell:** [Zsh](https://www.zsh.org/) - **Terminal:** [Foot](https://codeberg.org/dnkl/foot) diff --git a/flake.lock b/flake.lock index 93d514f..9474a5e 100644 --- a/flake.lock +++ b/flake.lock @@ -171,11 +171,11 @@ ] }, "locked": { - "lastModified": 1690982105, - "narHash": "sha256-32AzoLuwhtxBItcULRiCnxRfJcbVXbPZSH9TDVg21mU=", + "lastModified": 1691039228, + "narHash": "sha256-iPNZJ1LvfUf1Y456ewC0DXgf99TNssG8OLObOyqxO6M=", "owner": "nix-community", "repo": "home-manager", - "rev": "b2ac1d2c32ac11b8d231d23622cdc4b2f28d07d2", + "rev": "86dd48d70a2e2c17e84e747ba4faa92453e68d4a", "type": "github" }, "original": { @@ -301,11 +301,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1690881714, - "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=", + "lastModified": 1691006197, + "narHash": "sha256-DbtxVWPt+ZP5W0Usg7jAyTomIM//c3Jtfa59Ht7AV8s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9e1960bc196baf6881340d53dccb203a951745a2", + "rev": "66aedfd010204949cb225cf749be08cb13ce1813", "type": "github" }, "original": { diff --git a/hosts/falkenstein-1/modules/crowdsec/default.nix b/hosts/falkenstein-1/modules/crowdsec/default.nix index e19846f..3b1ca76 100644 --- a/hosts/falkenstein-1/modules/crowdsec/default.nix +++ b/hosts/falkenstein-1/modules/crowdsec/default.nix @@ -23,8 +23,8 @@ description = "Crowdsec agent"; serviceConfig = { Type = "notify"; - ExecStartPre = "${lib.getExe pkgs.crowdsec} -t -error"; - ExecStart = "${lib.getExe pkgs.crowdsec}"; + ExecStartPre = "${pkgs.crowdsec}/bin/crowdsec -t -error"; + ExecStart = "${pkgs.crowdsec}/bin/crowdsec"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; Restart = "always"; RestartSec = 60; diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index 44ca38a..df3a61c 100755 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -27,7 +27,7 @@ ]; - #loader.systemd-boot.editor = false; + loader.systemd-boot.editor = false; loader.efi.canTouchEfiVariables = true; kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; tmp.useTmpfs = true; @@ -67,6 +67,7 @@ "/etc/ssh" "/etc/secureboot" "/root/.ssh" + "/root/.local/share/zsh" ]; files = [ "/etc/machine-id" diff --git a/hosts/thinkpad/modules/greetd/default.nix b/hosts/thinkpad/modules/greetd/default.nix index 12969fe..76f09bb 100644 --- a/hosts/thinkpad/modules/greetd/default.nix +++ b/hosts/thinkpad/modules/greetd/default.nix @@ -4,7 +4,7 @@ enable = true; settings = { default_session = { - command = "${lib.getExe pkgs.greetd.tuigreet} --cmd river"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd river"; }; }; }; diff --git a/pkgs/pww/default.nix b/pkgs/pww/default.nix index 7d4f39c..9e9f80d 100644 --- a/pkgs/pww/default.nix +++ b/pkgs/pww/default.nix @@ -23,6 +23,7 @@ buildGoModule rec { homepage = "https://github.com/abenz1267/pww"; license = licenses.mit; maintainers = with maintainers; [ therealr5 ]; + mainProgram = "pww"; platforms = platforms.all; }; } diff --git a/shared/tmux.nix b/shared/tmux.nix index 291d859..b4de263 100644 --- a/shared/tmux.nix +++ b/shared/tmux.nix @@ -7,7 +7,7 @@ clock24 = true; extraConfig = '' - set -g default-shell ${lib.getExe pkgs.zsh} + set -g default-shell ${pkgs.zsh}/bin/zsh bind P display-popup set -sg escape-time 10 set -g @dracula-plugins "git time" diff --git a/shared/zsh.nix b/shared/zsh.nix index 4a7d9cd..1c1d732 100644 --- a/shared/zsh.nix +++ b/shared/zsh.nix @@ -24,7 +24,7 @@ la = "ls -a"; less = "bat"; 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; histFile = "~/.local/share/zsh/history"; @@ -80,7 +80,7 @@ then cat ${../images/cat.sixel} fi - eval "$(${lib.getExe pkgs.mcfly} init zsh)" + eval "$(${pkgs.mcfly}/bin/mcfly init zsh)" ''; }; } diff --git a/users/rouven/modules/foot/default.nix b/users/rouven/modules/foot/default.nix index bf0a9d5..766766b 100644 --- a/users/rouven/modules/foot/default.nix +++ b/users/rouven/modules/foot/default.nix @@ -8,7 +8,7 @@ server.enable = true; settings = rec { main = { - shell = lib.getExe pkgs.zsh; + shell = "${pkgs.zsh}/bin/zsh"; dpi-aware = "yes"; font = "monospace:family=Iosevka Nerd Font, size=8"; notify = "${lib.getExe pkgs.libnotify} -a \${app-id} -i \${app-id} \${title} \${body}"; diff --git a/users/rouven/modules/git/default.nix b/users/rouven/modules/git/default.nix index 39fb502..36aef60 100644 --- a/users/rouven/modules/git/default.nix +++ b/users/rouven/modules/git/default.nix @@ -1,12 +1,12 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: { programs.git = { enable = true; userName = "Rouven Seifert"; userEmail = "rouven@rfive.de"; extraConfig = { - core.pager = lib.getExe pkgs.delta; - interactive.diffFilter = "${lib.getExe pkgs.delta} --color-only"; + core.pager = "${pkgs.delta}/bin/delta"; + interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only"; delta = { navigate = true; light = false; diff --git a/users/rouven/modules/wayland/default.nix b/users/rouven/modules/wayland/default.nix index 10247ab..9b14034 100644 --- a/users/rouven/modules/wayland/default.nix +++ b/users/rouven/modules/wayland/default.nix @@ -58,7 +58,7 @@ icon-theme=${config.gtk.iconTheme.name} show-actions=yes width=80 - terminal=${lib.getExe pkgs.foot} + terminal=${pkgs.foot}/bin/foot [colors] background=${config.colorScheme.colors.base00}ff diff --git a/users/rouven/modules/wayland/river.nix b/users/rouven/modules/wayland/river.nix index 7f4fcba..58af2f5 100644 --- a/users/rouven/modules/wayland/river.nix +++ b/users/rouven/modules/wayland/river.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: { home.packages = with pkgs; [ 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 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+Shift Return zoom @@ -48,7 +48,7 @@ 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 for i in $(seq 1 9) @@ -68,10 +68,10 @@ riverctl map normal Super+Shift+Control $i toggle-view-tags $tags done - riverctl map normal None Print spawn "${lib.getExe pkgs.sway-contrib.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 XF86MonBrightnessUp spawn "${lib.getExe pkgs.light} -A 10" - riverctl map normal None XF86MonBrightnessDown spawn "${lib.getExe pkgs.light} -U 10" + riverctl map normal None Print spawn "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area" + 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 "${pkgs.light}/bin/light -A 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 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%" @@ -79,7 +79,6 @@ 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 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 Cancel spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest" riverctl map normal Shift Cancel spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --cloes-all" diff --git a/users/rouven/modules/wayland/sway.nix b/users/rouven/modules/wayland/sway.nix index ade5f10..934bd91 100644 --- a/users/rouven/modules/wayland/sway.nix +++ b/users/rouven/modules/wayland/sway.nix @@ -35,10 +35,10 @@ keybindings = lib.mkOptionDefault { "Mod1+space" = "exec ${menu}"; - "Print" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} copy area"; - "XF86Launch2" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} save area - | ${lib.getExe pkgs.swappy} -f -"; - "XF86MonBrightnessUp" = "exec ${lib.getExe pkgs.light} -A 10"; - "XF86MonBrightnessDown" = "exec ${lib.getExe pkgs.light} -U 10"; + "Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; + "XF86Launch2" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot save area - | ${lib.getExe pkgs.swappy} -f -"; + "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10"; + "XF86MonBrightnessDown" = "exec ${kgs.light}/bin/light -U 10"; "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ 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%"; @@ -47,7 +47,7 @@ "Shift+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%"; "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"; "Cancel" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest"; diff --git a/users/rouven/options/shikane.nix b/users/rouven/options/shikane.nix index f21cfa6..44be663 100644 --- a/users/rouven/options/shikane.nix +++ b/users/rouven/options/shikane.nix @@ -71,7 +71,7 @@ in PartOf = [ "graphical-session.target" ]; }; - Service = { ExecStart = getExe cfg.package; }; + Service = { ExecStart = "${cfg.package}/bin/shikane"; }; Install = { WantedBy = [ "graphical-session.target" ]; }; };