mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
Follow best practice for getting package executables
This commit is contained in:
parent
88f6309cd4
commit
a90b2ed9fd
4 changed files with 9 additions and 8 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -70,11 +71,11 @@
|
||||||
before = ["fancontrol.service"];
|
before = ["fancontrol.service"];
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
/run/current-system/sw/bin/touch /tmp/nvidia-gpu-temp
|
${lib.getExe' pkgs.coreutils "touch"} /tmp/nvidia-gpu-temp
|
||||||
while :; do
|
while :; do
|
||||||
temp="$(/run/current-system/sw/bin/nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits)"
|
temp="$(${lib.getExe' config.hardware.nvidia.package "nvidia-smi"} --query-gpu=temperature.gpu --format=csv,noheader,nounits)"
|
||||||
/run/current-system/sw/bin/echo "$((temp * 1000))" > /tmp/nvidia-gpu-temp
|
${lib.getExe' pkgs.coreutils "echo"} "$((temp * 1000))" > /tmp/nvidia-gpu-temp
|
||||||
/run/current-system/sw/bin/sleep 2
|
${lib.getExe' pkgs.coreutils "sleep"} 2
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ in {
|
||||||
PartOf = ["graphical-session.target"];
|
PartOf = ["graphical-session.target"];
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${pkgs.syncthingtray-minimal}/bin/syncthingtray --wait";
|
ExecStart = "${lib.getExe' pkgs.syncthingtray-minimal "syncthingtray"} --wait";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = ["graphical-session.target"];
|
WantedBy = ["graphical-session.target"];
|
||||||
|
|
@ -103,7 +103,7 @@ in {
|
||||||
PartOf = ["graphical-session.target"];
|
PartOf = ["graphical-session.target"];
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet";
|
ExecStart = "${lib.getExe pkgs.networkmanagerapplet}";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = ["graphical-session.target"];
|
WantedBy = ["graphical-session.target"];
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ in {
|
||||||
|
|
||||||
# Launch programs
|
# Launch programs
|
||||||
"$mod, RETURN, exec, $terminal"
|
"$mod, RETURN, exec, $terminal"
|
||||||
"$mod, V, exec, ${pkgs.cliphist}/bin/cliphist list | rofi -dmenu | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy"
|
"$mod, V, exec, ${lib.getExe pkgs.cliphist} list | rofi -dmenu | ${lib.getExe pkgs.cliphist} decode | ${lib.getExe' pkgs.wl-clipboard "wl-copy"}"
|
||||||
"$mod, B, exec, $browser"
|
"$mod, B, exec, $browser"
|
||||||
"$mod, F, exec, $fileManager"
|
"$mod, F, exec, $fileManager"
|
||||||
"$mod, C, exec, $editor"
|
"$mod, C, exec, $editor"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ in {
|
||||||
default_session = let
|
default_session = let
|
||||||
base = config.services.xserver.displayManager.sessionData.desktops;
|
base = config.services.xserver.displayManager.sessionData.desktops;
|
||||||
in {
|
in {
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --asterisks --remember --remember-user-session --sessions ${base}/share/wayland-sessions:${base}/share/xsessions";
|
command = "${lib.getExe pkgs.greetd.tuigreet} --time --asterisks --remember --remember-user-session --sessions ${base}/share/wayland-sessions:${base}/share/xsessions";
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue