git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #18573 from peterhoeg/systemd_user_cfg

systemd: support setting defaults for user instances

commit32d00f50ec86aa19c1974950c88abb5bd4ab0e73 authorEelco Dolstra <eelco.dolstra@logicblox.com> dateWed 14 Sep 2016, 13:39 (10 years ago) parent101027123b76b2
1 file changed+15
nixos/modules/system/boot/systemd.nix+15
nixos/modules/system/boot/systemd.nix+15
@@ -571,6 +571,16 @@ in
571571 '';
572572 };
573573
574+ systemd.user.extraConfig = mkOption {
575+ default = "";
576+ type = types.lines;
577+ example = "DefaultCPUAccounting=yes";
578+ description = ''
579+ Extra config options for systemd user instances. See man systemd-user.conf for
580+ available options.
581+ '';
582+ };
583+
574584 systemd.tmpfiles.rules = mkOption {
575585 type = types.listOf types.str;
576586 default = [];
@@ -665,6 +675,11 @@ in
665675 ${config.systemd.extraConfig}
666676 '';
667677
678+ "systemd/user.conf".text = ''
679+ [Manager]
680+ ${config.systemd.user.extraConfig}
681+ '';
682+
668683 "systemd/journald.conf".text = ''
669684 [Journal]
670685 RateLimitInterval=${config.services.journald.rateLimitInterval}