summary refs log tree commit diff
path: root/nixos/modules/system/boot/systemd-unit-options.nix
Commit message (Collapse)AuthorAge
* Refactor unit option declarationsEelco Dolstra2014-04-17
| | | | This gets rid of some duplication.
* Allow upstream systemd units to be extendedEelco Dolstra2014-04-17
| | | | | | | | | | | | If you define a unit, and either systemd or a package in systemd.packages already provides that unit, then we now generate a file /etc/systemd/system/<unit>.d/overrides.conf. This makes it possible to use upstream units, while allowing them to be customised from the NixOS configuration. For instance, the module nix-daemon.nix now uses the units provided by the Nix package. And all unit definitions that duplicated upstream systemd units are finally gone. This makes the baseUnit option unnecessary, so I've removed it.
* Rewrite ‘with pkgs.lib’ -> ‘with lib’Eelco Dolstra2014-04-14
| | | | | | | | Using pkgs.lib on the spine of module evaluation is problematic because the pkgs argument depends on the result of module evaluation. To prevent an infinite recursion, pkgs and some of the modules are evaluated twice, which is inefficient. Using ‘with lib’ prevents this problem.
* Merge branch 'containers'Eelco Dolstra2014-04-10
|\ | | | | | | Fixes #2105.
| * Add an option to reload rather than restart changed unitsEelco Dolstra2014-03-17
| |
* | systemd: Add support for path units.aszlig2014-03-31
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to define systemd.path(5) units, for example like this: { systemd = let description = "Set Key Permissions for xyz.key"; in { paths.set-key-perms = { inherit description; before = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; pathConfig.PathChanged = "/run/keys/xyz.key"; }; services.set-key-perms = { inherit description; serviceConfig.Type = "oneshot"; script = "chown myspecialkeyuser /run/keys/xyz.key"; }; }; } The example here is actually useful in order to set permissions for the NixOps keys target to ensure those permisisons aren't reset whenever the key file is reuploaded. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* Don't include superfluous lines in generated unitsEelco Dolstra2014-03-12
|
* systemd: Allow customisation of upstream unitsEelco Dolstra2014-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | You can now say: systemd.services.foo.baseUnit = "${pkgs.foo}/.../foo.service"; This will cause NixOS' generated foo.service file to include foo.service from the foo package. You can then apply local customization in the usual way: systemd.services.foo.serviceConfig.MemoryLimit = "512M"; Note however that overriding options in the original unit may not work. For instance, you cannot override ExecStart. It's also possible to customize instances of template units: systemd.services."getty@tty4" = { baseUnit = "/etc/systemd/system/getty@.service"; serviceConfig.MemoryLimit = "512M"; }; This replaces the unit options linkTarget (which didn't allow customisation) and extraConfig (which did allow customisation, but in a non-standard way).
* Allow services to specify a pre-stop scriptEelco Dolstra2013-11-26
|
* Allow overrides to work for unit optionsEelco Dolstra2013-11-18
|
* Use types.lines for script/preStart/postStart/postStopEelco Dolstra2013-11-18
|
* Apply better type checking to unitConfig/serviceConfig/...Eelco Dolstra2013-11-18
| | | | In particular, complain if two modules define the same systemd option.
* Strictly check the arguments to mkOptionEelco Dolstra2013-10-30
| | | | And fix various instances of bad arguments.
* Substitute "types.uniq types.string" -> "types.str"Eelco Dolstra2013-10-30
|
* Remove uses of the "merge" option attributeEelco Dolstra2013-10-28
| | | | | It's redundant because you can (and should) specify an option type, or an apply function.
* Fix bogus mkOption typesEelco Dolstra2013-10-28
| | | | | Among others, systemd unit options were not being type-checked because of this. mkOption should really check its arguments better...
* Move all of NixOS to nixos/ in preparation of the repository mergeEelco Dolstra2013-10-10