modules/users: remove unused requiredBy
service option
This commit is contained in:
parent
4fd2db4e51
commit
787e6af646
|
@ -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 = [];
|
||||||
|
|
|
@ -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
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user