mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 00:39:45 +01:00
systemd: allow creating slices
This commit is contained in:
parent
aaa5329d39
commit
275d1b5212
1 changed files with 12 additions and 1 deletions
|
@ -7,6 +7,7 @@ let
|
|||
cfg = config.systemd.user;
|
||||
|
||||
enabled = cfg.services != {}
|
||||
|| cfg.slices != {}
|
||||
|| cfg.sockets != {}
|
||||
|| cfg.targets != {}
|
||||
|| cfg.timers != {}
|
||||
|
@ -125,6 +126,13 @@ in
|
|||
example = unitExample "Service";
|
||||
};
|
||||
|
||||
slices = mkOption {
|
||||
default = {};
|
||||
type = unitType "slices";
|
||||
description = unitDescription "slices";
|
||||
example = unitExample "Slices";
|
||||
};
|
||||
|
||||
sockets = mkOption {
|
||||
default = {};
|
||||
type = unitType "socket";
|
||||
|
@ -197,7 +205,8 @@ in
|
|||
let
|
||||
names = concatStringsSep ", " (
|
||||
attrNames (
|
||||
cfg.services // cfg.sockets // cfg.targets // cfg.timers // cfg.paths // cfg.sessionVariables
|
||||
cfg.services // cfg.slices // cfg.sockets // cfg.targets
|
||||
// cfg.timers // cfg.paths // cfg.sessionVariables
|
||||
)
|
||||
);
|
||||
in
|
||||
|
@ -213,6 +222,8 @@ in
|
|||
(listToAttrs (
|
||||
(buildServices "service" cfg.services)
|
||||
++
|
||||
(buildServices "slices" cfg.slices)
|
||||
++
|
||||
(buildServices "socket" cfg.sockets)
|
||||
++
|
||||
(buildServices "target" cfg.targets)
|
||||
|
|
Loading…
Reference in a new issue