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:
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user