sxmo: bring wob service in-house
This commit is contained in:
parent
cb0d9e077b
commit
ac22e07388
|
@ -80,6 +80,7 @@
|
|||
./wike.nix
|
||||
./wine.nix
|
||||
./wireshark.nix
|
||||
./wob.nix
|
||||
./xarchiver.nix
|
||||
./zeal.nix
|
||||
./zsh
|
||||
|
|
40
hosts/common/programs/wob.nix
Normal file
40
hosts/common/programs/wob.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.sane.programs.wob;
|
||||
in
|
||||
{
|
||||
sane.programs.wob = {
|
||||
configOption = with lib; mkOption {
|
||||
default = {};
|
||||
type = types.submodule {
|
||||
options.autostart = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
options.sock = mkOption {
|
||||
type = types.str;
|
||||
default = "sxmo.wobsock";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.wob = {
|
||||
description = "Wayland Overlay Bar (renders volume/backlight levels)";
|
||||
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
|
||||
serviceConfig = {
|
||||
# ExecStart = "${cfg.package}/bin/wob";
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
RestartSec = "20s";
|
||||
};
|
||||
script = ''
|
||||
wobsock="$XDG_RUNTIME_DIR/${cfg.config.sock}"
|
||||
rm -f "$wobsock" || true
|
||||
mkfifo "$wobsock" && ${cfg.package}/bin/wob <> "$wobsock"
|
||||
|
||||
# TODO: cleanup should be done in a systemd OnFailure, or OnExit, or whatever
|
||||
rm -f "$wobsock"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -265,9 +265,10 @@ in
|
|||
suggestedPrograms = [
|
||||
"guiApps"
|
||||
"bemenu" # specifically to import its theming
|
||||
"sfeed" # want this here so that the user's ~/.sfeed/sfeedrc gets created
|
||||
# "superd" # make superctl (used by sxmo) be on PATH
|
||||
"sfeed" # want this here so that the user's ~/.sfeed/sfeedrc gets created
|
||||
# "superd" # make superctl (used by sxmo) be on PATH
|
||||
# "sway-autoscaler"
|
||||
"wob" # volume/brightness on-screen display
|
||||
];
|
||||
|
||||
persist.byStore.cryptClearOnBoot = [
|
||||
|
@ -645,7 +646,7 @@ in
|
|||
sxmo_networkmonitor = sxmoService "networkmonitor";
|
||||
sxmo_notificationmonitor = sxmoService "notificationmonitor";
|
||||
sxmo_soundmonitor = sxmoService "soundmonitor";
|
||||
sxmo_wob = sxmoService "wob";
|
||||
# sxmo_wob = sxmoService "wob";
|
||||
sxmo-x11-status = sxmoService "status_xsetroot";
|
||||
|
||||
bonsaid.path = sxmoPath;
|
||||
|
|
|
@ -18,7 +18,7 @@ sxmo_jobs.sh start daemon_manager
|
|||
# TODO: start these externally, via `wantedBy` in nix
|
||||
# don't: i don't use mako
|
||||
# superctl start mako
|
||||
systemctl --user start sxmo_wob
|
||||
# systemctl --user start sxmo_wob
|
||||
systemctl --user start sxmo_menumode_toggler
|
||||
systemctl --user start bonsaid
|
||||
# don't: sway background is managed externally
|
||||
|
|
Loading…
Reference in New Issue
Block a user