programs: services: no need to fully-qualify paths anymore (s6 doesn't require)

This commit is contained in:
2024-03-21 05:23:38 +00:00
parent 1417497001
commit 9b793ef4b8
19 changed files with 25 additions and 37 deletions

View File

@@ -88,7 +88,7 @@ in
services.abaddon = { services.abaddon = {
description = "unofficial Discord chat client"; description = "unofficial Discord chat client";
wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ]; wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ];
serviceConfig.ExecStart = "${cfg.package}/bin/abaddon"; serviceConfig.ExecStart = "abaddon";
}; };
}; };
} }

View File

@@ -123,7 +123,7 @@ in
script = '' script = ''
${pkgs.coreutils}/bin/rm -f $XDG_RUNTIME_DIR/bonsai ${pkgs.coreutils}/bin/rm -f $XDG_RUNTIME_DIR/bonsai
exec ${cfg.package}/bin/bonsaid -t ${cfg.config.configFile} exec bonsaid -t ${cfg.config.configFile}
''; '';
}; };
}; };

View File

@@ -46,7 +46,7 @@ in
description = "gnome-calls daemon to monitor incoming SIP calls"; description = "gnome-calls daemon to monitor incoming SIP calls";
wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ]; wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ];
# add --verbose for more debugging # add --verbose for more debugging
serviceConfig.ExecStart = "env G_MESSAGES_DEBUG=all ${cfg.package}/bin/gnome-calls --daemon"; serviceConfig.ExecStart = "env G_MESSAGES_DEBUG=all gnome-calls --daemon";
}; };
}; };
programs.calls = lib.mkIf cfg.enabled { programs.calls = lib.mkIf cfg.enabled {

View File

@@ -80,7 +80,7 @@ in
# #
# note that debug logging during calls produces so much journal spam that it pegs the CPU and causes dropped audio # note that debug logging during calls produces so much journal spam that it pegs the CPU and causes dropped audio
# env G_MESSAGES_DEBUG = "all"; # env G_MESSAGES_DEBUG = "all";
serviceConfig.ExecStart = "env PULSE_LATENCY_MSEC=20 ${cfg.package}/bin/dino"; serviceConfig.ExecStart = "env PULSE_LATENCY_MSEC=20 dino";
}; };
}; };
} }

View File

@@ -60,7 +60,7 @@ in
after = [ "graphical-session.target" ]; after = [ "graphical-session.target" ];
wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ]; wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ];
serviceConfig.ExecStart = "${cfg.package}/bin/dissent"; serviceConfig.ExecStart = "dissent";
}; };
}; };
} }

View File

@@ -24,10 +24,7 @@
# - nixpkgs has a few themes: `fcitx5-{material-color,nord,rose-pine}` # - nixpkgs has a few themes: `fcitx5-{material-color,nord,rose-pine}`
# - NUR has a few themes # - NUR has a few themes
# - <https://github.com/catppuccin/fcitx5> # - <https://github.com/catppuccin/fcitx5>
{ config, lib, pkgs, ... }: { lib, pkgs, ... }:
let
cfg = config.sane.programs.fcitx5;
in
{ {
sane.programs.fcitx5 = { sane.programs.fcitx5 = {
packageUnwrapped = pkgs.fcitx5-with-addons.override { packageUnwrapped = pkgs.fcitx5-with-addons.override {
@@ -103,7 +100,7 @@ in
after = [ "graphical-session.target" ]; after = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ]; wantedBy = [ "graphical-session.target" ];
serviceConfig.ExecStart = "${cfg.package}/bin/fcitx5"; serviceConfig.ExecStart = "fcitx5";
}; };
env.XMODIFIERS = "@im=fcitx"; env.XMODIFIERS = "@im=fcitx";

View File

@@ -73,7 +73,7 @@ in
wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ]; wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ];
# env "G_MESSAGES_DEBUG=all" # env "G_MESSAGES_DEBUG=all"
serviceConfig.ExecStart = "${cfg.package}/bin/fractal"; serviceConfig.ExecStart = "fractal";
}; };
}; };
} }

View File

@@ -91,7 +91,7 @@ in
# partOf = [ "graphical-session.target" ]; # partOf = [ "graphical-session.target" ];
wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ]; wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ];
serviceConfig.ExecStart = "${cfg.package}/bin/geary"; serviceConfig.ExecStart = "geary";
}; };
}; };

View File

@@ -1,7 +1,4 @@
{ config, lib, pkgs, ... }: { lib, pkgs, ... }:
let
cfg = config.sane.programs.gnome-keyring;
in
{ {
sane.programs.gnome-keyring = { sane.programs.gnome-keyring = {
packageUnwrapped = pkgs.rmDbusServices pkgs.gnome.gnome-keyring; packageUnwrapped = pkgs.rmDbusServices pkgs.gnome.gnome-keyring;
@@ -54,8 +51,8 @@ in
after = [ "graphical-session.target" ]; after = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ]; wantedBy = [ "graphical-session.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.package}/bin/gnome-keyring-daemon --start --foreground --components=secrets"; ExecStart = "gnome-keyring-daemon --start --foreground --components=secrets";
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -m 0700 -p %t/keyring"; ExecStartPre = "mkdir -m 0700 -p %t/keyring";
}; };
}; };
}; };

View File

@@ -35,7 +35,7 @@ in
serviceConfig = { serviceConfig = {
# env PIPEWIRE_LOG_SYSTEMD=false" # env PIPEWIRE_LOG_SYSTEMD=false"
# env PIPEWIRE_DEBUG"*:3,mod.raop*:5,pw.rtsp-client*:5" # env PIPEWIRE_DEBUG"*:3,mod.raop*:5,pw.rtsp-client*:5"
ExecStart = "${cfg.package}/bin/pipewire"; ExecStart = "pipewire";
ExecStartPost = pkgs.writeShellScript "pipewire-wait-started" '' ExecStartPost = pkgs.writeShellScript "pipewire-wait-started" ''
waitFor() { waitFor() {
while [ ! -e "$1" ]; do while [ ! -e "$1" ]; do
@@ -53,7 +53,7 @@ in
after = [ "pipewire.service" ]; after = [ "pipewire.service" ];
wantedBy = [ "pipewire.service" ]; wantedBy = [ "pipewire.service" ];
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.package}/bin/pipewire-pulse"; ExecStart = "pipewire-pulse";
ExecStartPost = pkgs.writeShellScript "pipewire-pulse-wait-started" '' ExecStartPost = pkgs.writeShellScript "pipewire-pulse-wait-started" ''
waitFor() { waitFor() {
while [ ! -e "$1" ]; do while [ ! -e "$1" ]; do

View File

@@ -51,7 +51,7 @@ in
wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ]; wantedBy = lib.mkIf cfg.config.autostart [ "graphical-session.target" ];
# for some reason the --ozone-platform-hint=auto flag fails when signal-desktop is launched from a service # for some reason the --ozone-platform-hint=auto flag fails when signal-desktop is launched from a service
serviceConfig.ExecStart = "env NIXOS_OZONE_WL=1 ${cfg.package}/bin/signal-desktop"; serviceConfig.ExecStart = "env NIXOS_OZONE_WL=1 signal-desktop";
}; };
}; };
} }

View File

@@ -35,7 +35,7 @@ in
serviceConfig.ExecStart = lib.escapeShellArgs [ serviceConfig.ExecStart = lib.escapeShellArgs [
"env" "env"
"SWAY_DEFAULT_SCALE=${builtins.toString cfg.config.defaultScale}" "SWAY_DEFAULT_SCALE=${builtins.toString cfg.config.defaultScale}"
"${cfg.package}/bin/sway-autoscaler" "sway-autoscaler"
"--loop-sec" "--loop-sec"
(builtins.toString cfg.config.interval) (builtins.toString cfg.config.interval)
]; ];

View File

@@ -254,7 +254,7 @@ in
services.sway = { services.sway = {
description = "sway: tiling wayland desktop environment"; description = "sway: tiling wayland desktop environment";
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
serviceConfig.ExecStart = "${cfg.package}/bin/sway"; serviceConfig.ExecStart = "sway";
}; };
}; };

View File

@@ -59,7 +59,7 @@ in
serviceConfig.ExecStart = lib.escapeShellArgs ( serviceConfig.ExecStart = lib.escapeShellArgs (
[ [
"${cfg.package}/bin/swayidle" "swayidle"
"-w" "-w"
] ++ lib.flatten ( ] ++ lib.flatten (
lib.mapAttrsToList lib.mapAttrsToList

View File

@@ -478,7 +478,7 @@ in
# partOf = [ "graphical-session.target" ]; # partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ]; wantedBy = [ "graphical-session.target" ];
serviceConfig.ExecStart = "env G_MESSAGES_DEBUG=all ${cfg.package}/bin/swaync"; serviceConfig.ExecStart = "env G_MESSAGES_DEBUG=all swaync";
# serviceConfig.BusName = "org.freedesktop.Notifications"; # serviceConfig.BusName = "org.freedesktop.Notifications";
}; };
}; };

View File

@@ -76,7 +76,7 @@ in
# -{H,W} N to set the height/width of the notifier, in px. # -{H,W} N to set the height/width of the notifier, in px.
# -i N to set the size of the volume icon # -i N to set the size of the volume icon
# -P to hide percentage text # -P to hide percentage text
serviceConfig.ExecStart = "${cfg.package}/bin/sysvol -p 0 -t 1 -m 22 -H 39 -W 256 -i 32 -P"; serviceConfig.ExecStart = "sysvol -p 0 -t 1 -m 22 -H 39 -W 256 -i 32 -P";
}; };
}; };
} }

View File

@@ -120,7 +120,7 @@ in
wantedBy = [ "graphical-session.target" ]; wantedBy = [ "graphical-session.target" ];
# env G_MESSAGES_DEBUG=all # env G_MESSAGES_DEBUG=all
serviceConfig.ExecStart = "${cfg.package}/bin/waybar"; serviceConfig.ExecStart = "waybar";
}; };
}; };
} }

View File

@@ -1,7 +1,4 @@
{ config, ... }: { ... }:
let
cfg = config.sane.programs.wireplumber;
in
{ {
sane.programs.wireplumber = { sane.programs.wireplumber = {
sandbox.method = "bwrap"; sandbox.method = "bwrap";
@@ -37,7 +34,7 @@ in
after = [ "pipewire.service" ]; after = [ "pipewire.service" ];
bindsTo = [ "pipewire.service" ]; bindsTo = [ "pipewire.service" ];
wantedBy = [ "pipewire.service" ]; wantedBy = [ "pipewire.service" ];
serviceConfig.ExecStart = "${cfg.package}/bin/wireplumber"; serviceConfig.ExecStart = "wireplumber";
}; };
}; };
} }

View File

@@ -1,7 +1,4 @@
{ config, lib, pkgs, ... }: { lib, pkgs, ... }:
let
cfg = config.sane.programs.wvkbd;
in
{ {
sane.programs.wvkbd = { sane.programs.wvkbd = {
packageUnwrapped = pkgs.wvkbd.overrideAttrs (base: { packageUnwrapped = pkgs.wvkbd.overrideAttrs (base: {
@@ -43,7 +40,7 @@ in
# "WVKBD_LANDSCAPE_HEIGHT=??" #< default: 120 (pixels) # "WVKBD_LANDSCAPE_HEIGHT=??" #< default: 120 (pixels)
# more settings tunable inside config.h when compiling: # more settings tunable inside config.h when compiling:
# - KBD_KEY_BORDER = 2 # - KBD_KEY_BORDER = 2
"${cfg.package}/bin/wvkbd-mobintl" "wvkbd-mobintl"
"--hidden" "--hidden"
]; ];
}; };