Make unitConfig/serviceConfig attribute sets

So instead of:

  boot.systemd.services."foo".serviceConfig =
    ''
      StartLimitInterval=10
      CPUShare=500
    '';

you can say:

  boot.systemd.services."foo".serviceConfig.StartLimitInterval = 10;
  boot.systemd.services."foo".serviceConfig.CPUShare = 500;

This way all unit options are available and users can set/override
options in configuration.nix.
This commit is contained in:
Eelco Dolstra
2012-10-01 16:27:42 -04:00
parent 440b793a5b
commit 891be375b5
9 changed files with 100 additions and 105 deletions

View File

@@ -194,15 +194,14 @@ in
'';
serviceConfig =
''
# Shut down Postgres using SIGINT ("Fast Shutdown mode"). See
{ # Shut down Postgres using SIGINT ("Fast Shutdown mode"). See
# http://www.postgresql.org/docs/current/static/server-shutdown.html
KillSignal=SIGINT
KillSignal = "SIGINT";
# Give Postgres a decent amount of time to clean up after
# receiving systemd's SIGINT.
TimeoutSec=60
'';
TimeoutSec = 60;
};
};
};