linted
This commit is contained in:
atagen 2025-02-02 16:57:31 +11:00
parent 4e99a0e323
commit 7485de646a
95 changed files with 2743 additions and 2282 deletions

View file

@ -2,30 +2,35 @@
config,
lib,
...
}: {
}:
{
options = {
ezServices = with lib;
ezServices =
with lib;
mkOption {
type = with types; attrsOf str;
default = {};
default = { };
};
ezOneShots = with lib;
ezOneShots =
with lib;
mkOption {
type = with types; attrsOf str;
default = {};
default = { };
};
ezConf = with lib;
ezConf =
with lib;
mkOption {
type = with types; attrsOf path;
default = {};
default = { };
};
# for specifying an additional systemd target
extraTarget = with lib;
extraTarget =
with lib;
mkOption {
type = with types; listOf str;
default = [];
default = [ ];
};
};
@ -34,37 +39,33 @@
builtins.mapAttrs (name: cmd: {
Unit = {
Description = "${name}";
Requires = ["graphical-session.target"] ++ config.extraTarget;
After = ["graphical-session.target"] ++ config.extraTarget;
Requires = [ "graphical-session.target" ] ++ config.extraTarget;
After = [ "graphical-session.target" ] ++ config.extraTarget;
};
Service = {
ExecStart = cmd;
};
Install = {
WantedBy = ["graphical-session.target"] ++ config.extraTarget;
WantedBy = [ "graphical-session.target" ] ++ config.extraTarget;
};
})
config.ezServices
}) config.ezServices
// builtins.mapAttrs (name: cmd: {
Unit = {
Description = "${name}";
After = ["graphical-session.target"] ++ config.extraTarget;
After = [ "graphical-session.target" ] ++ config.extraTarget;
};
Service = {
ExecStart = cmd;
Type = "oneshot";
};
Install = {
WantedBy = ["graphical-session.target"] ++ config.extraTarget;
WantedBy = [ "graphical-session.target" ] ++ config.extraTarget;
};
})
config.ezOneShots;
}) config.ezOneShots;
xdg.configFile =
builtins.mapAttrs (name: value: {
enable = true;
source = value;
})
config.ezConf;
xdg.configFile = builtins.mapAttrs (_name: value: {
enable = true;
source = value;
}) config.ezConf;
};
}