obliterate home-manager, rename some elements

This commit is contained in:
atagen 2025-08-13 20:27:25 +10:00
parent 5575604452
commit 6d8e151af8
50 changed files with 1277 additions and 1401 deletions

View file

@ -4,56 +4,56 @@
...
}:
{
config.hm.options = {
quickServices =
with lib;
mkOption {
type = with types; attrsOf str;
default = { };
};
quickOneShots =
with lib;
mkOption {
type = with types; attrsOf str;
default = { };
};
# for specifying an additional systemd target
extraTarget =
with lib;
mkOption {
type = with types; listOf str;
default = [ ];
};
options = {
quick = {
services =
with lib;
mkOption {
type = with types; attrsOf str;
default = { };
};
oneShots =
with lib;
mkOption {
type = with types; attrsOf str;
default = { };
};
};
};
config.hm.config = {
config = {
systemd.user.services =
builtins.mapAttrs (name: cmd: {
Unit = {
unitConfig = {
Description = "${name}";
Requires = [ "graphical-session.target" ] ++ config.hm.extraTarget;
After = [ "graphical-session.target" ] ++ config.hm.extraTarget;
Requires = [
"graphical-session.target"
];
After = [
"graphical-session.target"
"niri.target"
];
PartOf = [ "graphical-session.target" ];
};
Service = {
serviceConfig = {
ExecStart = cmd;
};
Install = {
WantedBy = [ "graphical-session.target" ] ++ config.hm.extraTarget;
};
}) config.hm.quickServices
wantedBy = [ "graphical-session.target" ];
}) config.quick.services
// builtins.mapAttrs (name: cmd: {
Unit = {
unitConfig = {
Description = "${name}";
After = [ "graphical-session.target" ] ++ config.extraTarget;
Requires = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"niri.target"
];
};
Service = {
serviceConfig = {
ExecStart = cmd;
Type = "oneshot";
};
Install = {
WantedBy = [ "graphical-session.target" ] ++ config.extraTarget;
};
}) config.hm.quickOneShots;
wantedBy = [ "graphical-session.target" ];
}) config.quick.oneShots;
};
}