diff --git a/flake.lock b/flake.lock index 603118f..0b48064 100644 --- a/flake.lock +++ b/flake.lock @@ -170,11 +170,11 @@ ] }, "locked": { - "lastModified": 1687098182, - "narHash": "sha256-kBys+Cwmcxzh7UNVWTrunOgaR02zl2XN3feA8fSlqVo=", + "lastModified": 1687167448, + "narHash": "sha256-p4/h9h6Inj34uwf0ncww8Ufub6Vpk+5vHGVTwUT4z1E=", "owner": "nix-community", "repo": "home-manager", - "rev": "0480dabc99e1b669ebe909949180fa2786e733cd", + "rev": "a10aa82e8aaee11d8e8b8c5e7e19f758a7553bf0", "type": "github" }, "original": { diff --git a/hosts/thinkpad/modules/greetd/default.nix b/hosts/thinkpad/modules/greetd/default.nix index bf0616a..3c7df80 100644 --- a/hosts/thinkpad/modules/greetd/default.nix +++ b/hosts/thinkpad/modules/greetd/default.nix @@ -1,10 +1,10 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { services.greetd = { enable = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd sway"; + command = "${lib.getExe pkgs.greetd.tuigreet} --cmd sway"; }; }; }; diff --git a/shared/tmux.nix b/shared/tmux.nix index 66d7d92..291d859 100644 --- a/shared/tmux.nix +++ b/shared/tmux.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { programs.tmux = { enable = true; @@ -7,7 +7,7 @@ clock24 = true; extraConfig = '' - set -g default-shell ${pkgs.zsh}/bin/zsh + set -g default-shell ${lib.getExe pkgs.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 47f2331..8b40c9f 100644 --- a/shared/zsh.nix +++ b/shared/zsh.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: { programs.command-not-found.enable = false; environment.systemPackages = with pkgs; [ @@ -60,7 +60,7 @@ switch() { sudo true # ask the password so we can leave during the (sometimes quite long) build process OUT_PATH=/tmp/nixos-rebuild-nom-$(date +%s) - ${pkgs.nix-output-monitor}/bin/nom build /etc/nixos#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH + ${lib.getExe pkgs.nix-output-monitor} build /etc/nixos#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH sudo ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $OUT_PATH sudo $OUT_PATH/bin/switch-to-configuration switch unlink $OUT_PATH diff --git a/users/rouven/modules/foot/default.nix b/users/rouven/modules/foot/default.nix index e6b1be9..f1fd7c8 100644 --- a/users/rouven/modules/foot/default.nix +++ b/users/rouven/modules/foot/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { home.packages = with pkgs; [ libsixel @@ -8,7 +8,7 @@ server.enable = true; settings = rec { main = { - shell = "${pkgs.zsh}/bin/zsh"; + shell = lib.getExe pkgs.zsh; dpi-aware = "yes"; font = "monospace:family=Iosevka Nerd Font, size=8"; }; diff --git a/users/rouven/modules/git/default.nix b/users/rouven/modules/git/default.nix index 36aef60..39fb502 100644 --- a/users/rouven/modules/git/default.nix +++ b/users/rouven/modules/git/default.nix @@ -1,12 +1,12 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { programs.git = { enable = true; userName = "Rouven Seifert"; userEmail = "rouven@rfive.de"; extraConfig = { - core.pager = "${pkgs.delta}/bin/delta"; - interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only"; + core.pager = lib.getExe pkgs.delta; + interactive.diffFilter = "${lib.getExe pkgs.delta} --color-only"; delta = { navigate = true; light = false; diff --git a/users/rouven/modules/packages.nix b/users/rouven/modules/packages.nix index ee3b6f4..071187b 100644 --- a/users/rouven/modules/packages.nix +++ b/users/rouven/modules/packages.nix @@ -67,9 +67,6 @@ # libs libyubikey libfido2 - # (pkgs.texlive.combine { - # inherit (pkgs.texlive) scheme-medium; - # }) ]; services.kdeconnect = { @@ -77,6 +74,8 @@ indicator = true; }; + programs.texlive.enable = true; + xdg.mimeApps = { enable = true; defaultApplications = diff --git a/users/rouven/modules/sway/default.nix b/users/rouven/modules/sway/default.nix index 435e280..cbcb9d2 100644 --- a/users/rouven/modules/sway/default.nix +++ b/users/rouven/modules/sway/default.nix @@ -12,14 +12,14 @@ config = rec { startup = [ { - command = "${pkgs.swaybg}/bin/swaybg -i ${../../../../images/wallpaper.png}"; + command = "${lib.getExe pkgs.swaybg} -i ${../../../../images/wallpaper.png}"; } { - command = "${pkgs.autotiling-rs}/bin/autotiling-rs"; + command = lib.getExe pkgs.autotiling-rs; } ]; modifier = "Mod4"; - menu = "${pkgs.fuzzel}/bin/fuzzel"; + menu = lib.getExe pkgs.fuzzel; terminal = "${pkgs.foot}/bin/footclient"; bars = [ ]; gaps = { @@ -40,10 +40,10 @@ keybindings = lib.mkOptionDefault { "Mod1+space" = "exec ${menu}"; - "Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; - "XF86Launch2" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot save area - | ${pkgs.swappy}/bin/swappy -f -"; - "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10"; - "XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 10"; + "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"; # audio controls "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"; @@ -53,7 +53,7 @@ "Shift+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%"; "XF86Favorites" = "exec ${pkgs.systemd}/bin/loginctl lock-session"; - "XF86PowerOff" = "exec ${pkgs.wlogout}/bin/wlogout"; + "XF86PowerOff" = "exec ${lib.getExe pkgs.wlogout}"; "XF86Messenger" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel"; "Cancel" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest"; @@ -68,7 +68,7 @@ icon-theme=${config.gtk.iconTheme.name} show-actions=yes width=80 - terminal=${pkgs.foot}/bin/foot + terminal=${lib.getExe pkgs.foot} [colors] background=${config.colorScheme.colors.base00}ff diff --git a/users/rouven/modules/sway/session.nix b/users/rouven/modules/sway/session.nix index 1e4bdbc..516b9ef 100644 --- a/users/rouven/modules/sway/session.nix +++ b/users/rouven/modules/sway/session.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { home.packages = with pkgs; [ swaylock-effects @@ -10,11 +10,11 @@ services.swayidle = { enable = true; events = [ - { event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock"; } - { event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock"; } + { event = "before-sleep"; command = lib.getExe pkgs.swaylock-effects; } + { event = "lock"; command = lib.getExe pkgs.swaylock-effects; } ]; timeouts = [ - { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock"; } + { timeout = 300; command = lib.getExe pkgs.swaylock-effects; } ]; }; systemd.user.services.swaync = { diff --git a/users/rouven/modules/sway/waybar.nix b/users/rouven/modules/sway/waybar.nix index 89fc1b9..9b718f2 100644 --- a/users/rouven/modules/sway/waybar.nix +++ b/users/rouven/modules/sway/waybar.nix @@ -1,4 +1,4 @@ -{ self, config, pkgs, ... }: +{ self, config, pkgs, lib, ... }: { systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.swaynotificationcenter}/bin"; programs.waybar = { @@ -55,7 +55,7 @@ format = " {}"; max-length = 80; return-type = "json"; - exec = "${self.packages.x86_64-linux.pww}/bin/pww -w spotifyd:title -p None 2> /dev/null"; + exec = "${lib.getExe self.packages.x86_64-linux.pww} -w spotifyd:title -p None 2> /dev/null"; }; cpu = { format = "{usage}% "; diff --git a/users/rouven/options/shikane.nix b/users/rouven/options/shikane.nix index e5304d5..f21cfa6 100644 --- a/users/rouven/options/shikane.nix +++ b/users/rouven/options/shikane.nix @@ -7,16 +7,14 @@ let tomlFormat = pkgs.formats.toml { }; in { - meta.maintainers = [ hm.maintainers.therealr5 ]; + meta.maintainers = [ maintainers.therealr5 ]; options.services.shikane = { + enable = mkEnableOption "shikane, A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles."; - package = mkOption { - type = types.package; - default = pkgs.shikane; - defaultText = literalExpression "pkgs.shikane"; - description = "The package to use for shikane."; - }; + + package = mkPackageOption pkgs "shikane" { }; + settings = mkOption { type = tomlFormat.type; default = { }; @@ -63,17 +61,17 @@ in }; config = mkIf cfg.enable { - xdg.configFile."shikane/config.toml".source = tomlFormat.generate "shikane-config" cfg.settings; + xdg.configFile."shikane/config.toml".source = + tomlFormat.generate "shikane-config" cfg.settings; systemd.user.services.shikane = { Unit = { Description = "Dynamic output configuration tool"; Documentation = "man:shikane(1)"; + After = [ "graphical-session-pre.target" ]; PartOf = [ "graphical-session.target" ]; }; - Service = { - ExecStart = "${cfg.package}/bin/shikane"; - }; + Service = { ExecStart = getExe cfg.package; }; Install = { WantedBy = [ "graphical-session.target" ]; }; };