NixOS systemd | 609 Members | |
| NixOS ❤️ systemd | 167 Servers |
| Sender | Message | Time |
|---|---|---|
| 14 Jun 2021 | ||
| But I don't think the NixOS module system uses shipped service units in any way. | 19:41:15 | |
In reply to @hpfr:matrix.orgYes we override as expected here | 19:41:32 | |
| thanks | 19:41:43 | |
| Only place where this doesn't work is templated units | 19:42:07 | |
How does it work, is nixpkgs parsing .service files? | 19:42:31 | |
| No but if we see a . service file with the same name we create an override.conf | 19:42:57 | |
| At activation? | 19:43:09 | |
| No at build time. | 19:43:17 | |
| All service files in systemd.packages are known at build time | 19:43:34 | |
I'm still not sure how that works. So you inspect all packages in systemd.packages for .service files when building the system closure and create overrides if they exists? | 19:44:58 | |
* I'm still not sure I understand how that works. So you inspect all packages in systemd.packages for .service files when building the system closure and create overrides if they exists? | 19:45:20 | |
| Yes | 19:45:37 | |
| Oh, my bad then. | 19:46:07 | |
| Thanks for the explaination ^^ | 19:46:13 | |
| I recently upgraded my server and the borgmatic service I wrote broke seemingly due to systemd-inhibit https://0x0.st/-LI7.txt, so I want to remove the systemd-inhibit call and just run borgmatic directly. I did that but I'm still getting the same error. Is the override not working or something? here's systemd cat: https://0x0.st/-Llq.txt | 19:48:44 | |
| as you can see in the cat, most of the overrides are redundant because I wrote the service before I realized there was a nixos module providing it | 19:49:23 | |
| and this is the ExecStart override:
| 19:50:55 | |
| so I don't know how systemd-inhibit is still getting involved since I removed the call to it from ExecStart, anyone see anything in the cat paste that I don't understand? | 19:51:34 | |
| and running borgmatic manually still works so I'm pretty sure it's something with NixOS and the systemd upgrade | 19:52:33 | |
| uh oh | 20:11:11 | |
Note how ExecStart must be cleared before being re-assigned [1]. The same holds for every item that can be specified multiple times, e.g. OnCalendar for timers. | 20:11:29 | |
Nix does not seem to do this, so overriding script will not work | 20:11:59 | |
* Nix does not seem to do this, so overriding systemd.services.<name>.script will not work | 20:12:30 | |
| Arian: can I force Nix to override the whole unit rather than doing the conf stuff? | 20:15:12 | |
| You can as a workaround do: ``` serviceConfig.ExecStart = [ "" "new executable"] ; ``` | 20:15:36 | |
| * You can as a workaround do: ``` yourService.serviceConfig.ExecStart = [ "" "new executable"] ; ``` | 20:16:04 | |
I currently have a multiline script, what's a good way to reference that | 20:16:52 | |
I basically reimplemented the script option to get that working. so the workaround finally works at least, but I'm still confused what's wrong with systemd-inhibit on NixOS. guess I'll open an issue | 20:43:30 | |
| Yes please! | 20:46:45 | |
| 16 Jun 2021 | ||
| Any ideas what I could be doing wrong if this is my .network file:
but
| 12:44:16 | |