summary refs log tree commit diff
path: root/nixos/lib/systemd-lib.nix
Commit message (Collapse)AuthorAge
* systemd-lib: cleanup empty lines in unit filesSandro Jäckel2023-11-09
|
* nixos/systemd-lib: fix building of empty unit filesemilylange2023-11-02
| | | | | | | | | | | | | | | | This is a fixup for c1ae82f448b10b278dc77e02518775175b463a27. nix' `passAsFile` does not create empty files for variables that are `null`. This results in the following error for units that have no overrides or content, but are, e.g. `wantedBy`: `mv: cannot stat '': No such file or directory`. Minimal reproducer: `systemd.units.empty.wantedBy = [ "multi-user.target" ];` This is often necessary when a unit is loaded in via `systemd.packages`.
* nixos/systemd: fix make unit failed when unit too large5aaee92023-10-31
|
* networkd: Allow combinations of WakeOnLan policiesign0tus2023-09-28
| | | | | | | To comply with the systemd.link WakeOnLan[^1] specification, the option "off" and all other possible policy combinations must be allowed. [^1]: https://www.freedesktop.org/software/systemd/man/systemd.link.html#WakeOnLan=
* systemd-lib: add name to X-{Reloads,Restart}-Triggers to easily identify to ↵Sandro Jäckel2023-09-13
| | | | which service/unit/... they belong
* nixos/lib: systemd definition files functionnikstur2023-07-26
| | | | | Add a re-usable function that converts an attrset to a directory containing systemd definition files.
* nixos/networkd: fix netdev MAC addresses assertsRaito Bezarius2023-07-20
| | | | | | The `||` condition made it fail no matter what because nothing can be none and a proper MAC address. Thanks to trofi for catching it.
* nixos/networkd: support netdev MAC addressesRaito Bezarius2023-07-04
| | | | | | | | | | | | | | | | | | According to systemd.netdev manpage: ``` MACAddress= Specifies the MAC address to use for the device, or takes the special value "none". When "none", systemd-networkd does not request the MAC address for the device, and the kernel will assign a random MAC address. For "tun", "tap", or "l2tp" devices, the MACAddress= setting in the [NetDev] section is not supported and will be ignored. Please specify it in the [Link] section of the corresponding systemd.network(5) file. If this option is not set, "vlan" device inherits the MAC address of the master interface. For other kind of netdevs, if this option is not set, then the MAC address is generated based on the interface name and the machine-id(5). Note, even if "none" is specified, systemd-udevd will assign the persistent MAC address for the device, as 99-default.link has MACAddressPolicy=persistent. So, it is also necessary to create a custom .link file for the device, if the MAC address assignment is not desired. ``` Therefore, `none` is an acceptable value.
* nixos/lib: save triggers of systemd into nix storewrvsrx2023-05-11
|
* nixos/lib: hash triggers after converting them to string in systemd-libwrvsrx2023-05-07
| | | | | | | | | This change is made for two reasons: 1. If `toString config.restartTriggers` containes `\n`, systemd unit file will be ill-formed. 2. This change can limit length of the trigger, although it doesn't matter in most cases.
* systemd-lib: fix building -.slice (root slice)Sandro Jäckel2023-03-20
| | | | | | | The error was: dirname: invalid option -- '.' Try 'dirname --help' for more information.
* lib.replaceChars: warn about being a deprecated aliasArtturin2022-12-15
| | | | | | | | replaceStrings has been in nix since 2015(nix 1.10) so it is safe to remove the fallback https://github.com/nixos/nix/commit/d6d5885c1567454754a0d260521bafa0bd5e7fdb
* nixos: Add unit option overrideStrategyChristian Kögler2022-10-27
|
* nixos/unitGenerator: fix generation for nspawn filesChristian Kögler2022-10-23
|
* nixos/systemd: Add onSuccess module option for unitsGiulio De Pasquale2022-04-07
|
* Merge pull request #164943 from ↵Janne Heß2022-04-03
|\ | | | | | | | | ElvishJerricco/systemd-initrd-reuse-systemd-module initrd: Opt-in bare bones systemd-based initrd
| * nixos/systemd-initrd: Remove unit options that don't workJanne Heß2022-04-01
| |
| * nixos/systemd-lib: Use module compositionJanne Heß2022-04-01
| |
| * nixos/lib/systemd-lib.nix: move comment back down to packagesFlorian Klink2022-03-24
| | | | | | | | https://github.com/NixOS/nixpkgs/pull/164943#discussion_r833215903
| * systemd-initrd, systemd-lib: drop initrdServiceToUnitFlorian Klink2022-03-24
| | | | | | | | We can just use serviceToUnit here.
| * systemd-initrd: Fix Environment= and PATHWill Fancher2022-03-22
| |
| * initrd: Optional systemd-based initrdWill Fancher2022-03-22
| |
| * nixos: systemd-lib: Make generateUnits general with default argsWill Fancher2022-03-22
| |
* | nixos/systemd: Allow creation of unit directoriesSilvan Mosberger2022-03-25
|/ | | | | | | | | | | | | | | | | | | This patch allows creation of files like /etc/systemd/system/user-.slice.d/limits.conf with systemd.units."user-.slice.d/limits.conf" = { text = '' [Slice] CPUAccounting=yes CPUQuota=50% ''; }; which previously threw an error Also renames the systemd-unit-path test to sytsemd-misc, and extends it to test that `systemd.units` can handle directories. In this case we make sure that resource limits specified in user slices apply.
* nixos: systemd: split off helper functions into systemd-libBob van der Linden2022-03-15
|
* Merge pull request #152372 from symphorien/systemd-validate-afterGuillaume Girol2022-01-31
|\ | | | | nixos/systemd: validate the values of systemd.services.<name>.after
| * nixos/systemd: validate the values of systemd.services.<name>.afterGuillaume Girol2021-12-27
| | | | | | | | | | and similar option. Notably check that they end with one of .service, .target, etc.
* | Merge branch 'staging-next' into stagingDmitry Kalinkin2021-12-11
|/ | | | | Conflicts: pkgs/development/libraries/log4cplus/default.nix
* Move systemd-lib.nix and systemd-unit-options.nix into utilsWill Fancher2021-11-20