summary refs log tree commit diff
path: root/nixos/modules/system/boot/systemd-unit-options.nix
Commit message (Collapse)AuthorAge
* Move systemd-lib.nix and systemd-unit-options.nix into utilsWill Fancher2021-11-20
|
* nixos/modules: fix systemd start rate-limitslf-2020-10-31
| | | | | | | | | | | | | | | | These were broken since 2016: https://github.com/systemd/systemd/commit/f0367da7d1a61ad698a55d17b5c28ddce0dc265a since StartLimitIntervalSec got moved into [Unit] from [Service]. StartLimitBurst has also been moved accordingly, so let's fix that one too. NixOS systems have been producing logs such as: /nix/store/wf98r55aszi1bkmln1lvdbp7znsfr70i-unit-caddy.service/caddy.service:31: Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring. I have also removed some unnecessary duplication in units disabling rate limiting since setting either interval or burst to zero disables it (https://github.com/systemd/systemd/blob/ad16158c10dfc3258831a9ff2f1a988214f51653/src/basic/ratelimit.c#L16)
* nixos/systemd: Don't use apply for $PATHJanne Heß2020-09-03
| | | | | When not using apply, other modules can use $PATH as a list instead of getting a colon-separated list to each /bin directory.
* nixos/systemd: Add support for `listenDatagrams`John Ericson2020-08-11
| | | | This works exactly analogously to the existing `listenStreams`.
* nixos/systemd: allow str in systemd.services.<name>.pathFlorian Klink2020-06-19
| | | | | | | Turns out, #75510 was too restrictive. We also need to allow str here, as some modules set this to "/run/wrappers" to bring `/run/wrappers/bin` into $PATH of a unit.
* nixos/systemd: Use a proper type for unit pathsJanne Heß2019-12-11
|
* nixos/systemd: Allow unit options to have multiple equal defs (#73024)Silvan Mosberger2019-11-08
| | | | | | E.g. this allows systemd.services.<name?>.serviceConfig.DynamicUser = mkMerge [ true true ];
* nixos/modules: Replace all nested types.either's with types.oneOf'sSilvan Mosberger2019-08-08
|
* nixos/systemd: 242 supports Type = execPeter Hoeg2019-07-15
|
* nixos/systemd: add StartLimitIntervalSec to unit configCraig Younkins2019-01-28
|
* Fix systemd timer unit documentationMárton Boros2018-10-03
| | | Fixes #36210
* nixos: systemd.services.*.environment: fix typeJan Malakhovski2018-05-13
|
* nixos/systemd: Fix environment type -> allows overridingSilvan Mosberger2018-04-03
|
* systemd: better document enabled, wantedBy, and requiredBy (#29453)Matt McHenry2017-09-16
| | | | | | the systemd.unit(5) discussion of wantedBy and requiredBy is in the [Install] section, and thus focused on stateful 'systemctl enable'. so, clarify that in NixOS, wantedBy & requiredBy are still what most users want, and not to be confused with enabled.
* nixos/treewide: systemd.time is in manvolume 7Franz Pletz2017-03-21
| | | | cc #23396
* systemd service: add aliases optionNikolay Amiantov2017-02-02
|
* systemd: add slice supportMarkov Dmitry2016-12-20
|
* systemd.timers.startOn: automatically convert string to listAlexander Ried2016-10-19
|
* systemd: add user target supportPeter Hoeg2016-09-29
| | | | | | | | | This allows us to define system user targets in addition to the existing services, timers and sockets. Furthermore, we add a top-level configuration keyword: - Documentation
* systemd-unit-options: startAt can be a listProfpatsch2016-09-01
| | | | | | | | | | | | | | | | | | OnCalendar entrys can be specified multiple times in a systemd timer, to make more complex scheduling possible. Tested by manually checking the timer generated by the following: systemd = { services.huhu = { description = "meh"; wantedBy = [ "default.target" ]; serviceConfig.ExecStart = "/bin/sh -c 'printf HUHU!'"; startAt = [ "*:*:0/30" "*:0/1:15" ]; }; }; It prints HUHU to the log at seconds 0, 15 and 30 of each minute.
* makeSearchPathOutputs: refactor to makeSearchPathOutputNikolay Amiantov2016-04-25
|
* replace makeSearchPath tree-wise to take care of possible multiple outputsNikolay Amiantov2016-04-13
|
* Revert "Add the tool "nixos-typecheck" that can check an option declaration to:"Eelco Dolstra2016-03-01
| | | | | | This reverts commit cad8957eabcbf73062226d28366fd446c15c8737. It breaks NixOps, but more importantly, such major changes to the module system really need to be reviewed.
* Add the tool "nixos-typecheck" that can check an option declaration to:Thomas Strobel2016-02-29
| | | | | | | | | | | | | | - Enforce that an option declaration has a "defaultText" if and only if the type of the option derives from "package", "packageSet" or "nixpkgsConfig" and if a "default" attribute is defined. - Enforce that the value of the "example" attribute is wrapped with "literalExample" if the type of the option derives from "package", "packageSet" or "nixpkgsConfig". - Warn if a "defaultText" is defined in an option declaration if the type of the option does not derive from "package", "packageSet" or "nixpkgsConfig". - Warn if no "type" is defined in an option declaration.
* systemd module: Add OnFailure to systemd common unit optionsJaka Hudoklin2015-11-16
|
* Some more type cleanupEelco Dolstra2015-06-15
|
* networkd: Fix evaluation of systemd.network units.aszlig2015-04-30
| | | | | | | | | | | During the refactor of the networkd stuff in f8dbe5f, a lot of the options are now needed by systemd.nix as well as networkd.nix but weren't moved by that commit as well. For now, this fixes all networkd VM tests except for the macvlan one and thus it should fix #7505 for at least DHCP-based configuration. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* systemd: Move networkd into separate modulesEelco Dolstra2015-04-19
| | | | The systemd module was getting rather bloated.
* systemd: extend checkUnitConfig with on-abnormalLongrin Wischnewski2015-01-19
|
* nixos/network-interfaces: Provide a networkd implementationWilliam A. Kennington III2014-11-26
|
* systemd-network: Add assertions for user clarityWilliam A. Kennington III2014-11-26
|
* systemd: Enable more network servicesWilliam A. Kennington III2014-11-26
|
* systemd: Add ability to define networksWilliam A. Kennington III2014-11-26
|
* Replace hasAttr/getAttr calls with the ? and . operatorsEelco Dolstra2014-10-05
| | | | | For NixOS evaluation, this gives a ~21% reduction in the number of values allocated and a ~4% speedup. It's also more readable.
* systemd: Support reload scriptsWilliam A. Kennington III2014-09-15
|
* 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.