modules/users: remove unused requiredBy service option

This commit is contained in:
Colin 2024-03-17 03:28:59 +00:00
parent 4fd2db4e51
commit 787e6af646
2 changed files with 2 additions and 13 deletions

View File

@ -29,10 +29,6 @@ let
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
}; };
requiredBy = mkOption {
type = types.listOf types.str;
default = [];
};
wantedBy = mkOption { wantedBy = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];

View File

@ -4,7 +4,6 @@ let
# see: <repo:nix-community/home-manager:modules/systemd.nix> # see: <repo:nix-community/home-manager:modules/systemd.nix>
mkUnit = serviceName: value: utils.systemdUtils.lib.serviceToUnit serviceName { mkUnit = serviceName: value: utils.systemdUtils.lib.serviceToUnit serviceName {
inherit (value) inherit (value)
requiredBy
script script
wantedBy wantedBy
; ;
@ -60,14 +59,8 @@ in
wants = builtins.map (wantedBy: { wants = builtins.map (wantedBy: {
".config/systemd/user/${wantedBy}.wants/${serviceName}.service".symlink = symlinkData; ".config/systemd/user/${wantedBy}.wants/${serviceName}.service".symlink = symlinkData;
}) generatedUnit.wantedBy; }) generatedUnit.wantedBy;
requires = builtins.map (requiredBy: { in
".config/systemd/user/${requiredBy}.requires/${serviceName}.service".symlink = symlinkData; lib.mergeAttrsList ([ serviceEntry ] ++ wants)
}) generatedUnit.requiredBy;
in lib.mergeAttrsList
([ serviceEntry ]
++ wants
++ requires
)
) )
config.services config.services
; ;