diff options
| author | Maximilian Bosch <maximilian@mbosch.me> | 2023-09-01 10:41:02 +0200 |
|---|---|---|
| committer | Maximilian Bosch <maximilian@mbosch.me> | 2023-09-13 23:50:27 +0200 |
| commit | 17398e4ff31415b0cefb3273325ed08bddec5a68 (patch) | |
| tree | ce82b9ef3936c86e8ae30bbcd19e8c81fbc44422 /pkgs/development/python-modules/python-mapnik | |
| parent | b8400a7134fed120c7a3d8b0b2942c06580ffcb5 (diff) | |
systemd: suggest using `--runtime` on `systemctl edit`
`systemctl edit foobar.service` attempts to write into
`/etc/systemd/system`. This is impossible on purpose, for such a
configuration change the `configuration.nix(8)` should be modified.
However, sometimes it's still a handy feature, for instance when
debugging a broken service. For such a purpose,
`systemctl edit --runtime` is still working on NixOS and an even better
solution because it only overrides the unit temporarily by placing the
override config into `/run` rather than `/etc`.
Unfortunately, this flag isn't well-known in my experience. So inspired
by PEP668[1], RaitoBezarius nerd-sniped me into implementing a similar
warning:
$ ./result/bin/systemctl edit libvirtd.service
The unit-directory '/etc/systemd/system' is read-only on NixOS, so it's not possible to edit system-units directly. Use 'systemctl edit --runtime' instead.
This only applies to system-level units. Overrides for user-units are
written into `$XDG_CONFIG_HOME/systemd/user` which is not managed by
NixOS (even when using home-manager it's possible to write into that
directory).
[1] https://peps.python.org/pep-0668/
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik')
0 files changed, 0 insertions, 0 deletions
