use lib.getExe where possible

This commit is contained in:
Rouven Seifert 2023-06-19 13:22:15 +02:00
parent 20dd0ece6c
commit 1169e53c76
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
11 changed files with 40 additions and 43 deletions

View file

@ -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": {

View file

@ -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";
};
};
};

View file

@ -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"

View file

@ -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

View file

@ -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";
};

View file

@ -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;

View file

@ -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 =

View file

@ -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

View file

@ -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 = {

View file

@ -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}% ";

View file

@ -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" ]; };
};