nixos-config/profiles/workspace/simple-osd-daemons.nix

29 lines
871 B
Nix
Raw Normal View History

2020-09-18 22:31:26 +04:00
{ config, pkgs, lib, ... }:
let
simple-osd-daemon = name: {
Install.WantedBy = [ "default.target" ];
Service = {
ExecStart = "${pkgs.simple-osd.${name}}/bin/simple-osd-${name}";
2020-10-26 15:04:44 +04:00
Restart = "always";
2020-09-14 02:47:04 +04:00
};
2020-09-18 22:31:26 +04:00
};
2021-05-25 15:04:21 +04:00
inherit (pkgs.my-lib) genIni;
2020-09-18 22:31:26 +04:00
daemons = names:
2021-02-28 20:06:01 +04:00
builtins.listToAttrs (builtins.map (name: {
name = "simple-osd-${name}";
value = simple-osd-daemon name;
}) names);
2020-09-18 22:31:26 +04:00
in {
home-manager.users.balsoft = {
2021-02-28 20:06:01 +04:00
systemd.user.services = daemons [ "pulseaudio" "mpris" ]
2020-09-18 22:31:26 +04:00
// pkgs.lib.optionalAttrs (config.deviceSpecific.isLaptop)
(daemons [ "battery" "brightness" ]);
2021-08-07 16:12:25 +04:00
xdg.configFile = {
"simple-osd/common".text =
genIni { progressbar.length = 25; notification."default timeout" = 3; };
"simple-osd/mpris".text =
genIni { default."notification display time" = 3; };
};
2020-09-14 02:47:04 +04:00
};
}