| 21 Jan 2025 |
@msanft:matrix.org | I think you should be able to put stuff into ~/.config/systemd/user/ if I'm not mistaken. | 15:42:49 |
@philiptaron:matrix.org | For a system service, maybe:
tmpfiles.d configuration to land a symlink to well-known location
- write a generator in bash to land the thing from well-known location
- Find one of the search paths that's not wired up on NixOS and squat there
| 15:47:20 |
gdamjan |
- portable service (which you can also build with nix, but also with other tools)
| 15:48:44 |
@adam:robins.wtf | Hmm. I'd thought of using a generator but don't love the idea. Squatting on an FHS path maybe is a good idea. | 15:50:39 |
@adam:robins.wtf | One thing I'd like to know is what this means
/run/systemd/generator/*
…
/usr/local/lib/systemd/system/*
| 15:51:01 |
@adam:robins.wtf | what's in ... ??? | 15:51:05 |
@philiptaron:matrix.org | I think it's this: https://github.com/systemd/systemd/blob/d641a1f8f7a1fcb95b01a63820dcdba5bb7dc78f/src/core/systemd.pc.in#L46 | 15:52:07 |
@philiptaron:matrix.org | * I think it's this: https://github.com/systemd/systemd/blob/main/src/core/systemd.pc.in#L46 | 15:52:42 |
@adam:robins.wtf | so systemd_system_unit_dir=${prefix}/lib/systemd/system ? | 15:52:52 |
@adam:robins.wtf | I'd also written off #1 because it requires an up front enumeration of the known services. I think #3 will work for what I need. Thanks :) | 15:53:58 |
Arian | We used to have /etc/systemd/system-mutable | 15:55:03 |
Arian | But idk if we still do | 15:55:08 |
@adam:robins.wtf | i don't see it in the nixpkgs source | 15:56:35 |
@adam:robins.wtf | paths are compile time, so it's not something i can trivially update | 15:56:59 |
@msanft:matrix.org | Is it a system service, at all? Or user-scoped anyway? | 15:59:30 |
@adam:robins.wtf | Both? :) I want the isolation of a user, but with all the flexibility and control of a system service | 16:04:54 |
@adam:robins.wtf | user units a good for interactive users only imo | 16:05:50 |
@adam:robins.wtf | * user units are good for interactive users only imo | 16:06:04 |
gdamjan |
| 17:22:37 |
gdamjan | * $ systemd-path systemd-search-system-unit
/etc/systemd/system.control:/run/systemd/system.control:/run/systemd/transient:/run/systemd/generator.early:/etc/systemd/system:/nix/var/nix/profiles/default/lib/systemd/system:/etc/systemd/system.attached:/run/systemd/system:/run/systemd/system.attached:/run/systemd/generator:/nix/store/bl5dgjbbr9y4wpdw6k959mkq4ig0jwyg-systemd-256.10/lib/systemd/system:/run/systemd/generator.late | 17:22:44 |
gdamjan | * $ systemd-path systemd-search-system-unit
/etc/systemd/system.control:/run/systemd/system.control:/run/systemd/transient:/run/systemd/generator.early:/etc/systemd/system:/nix/var/nix/profiles/default/lib/systemd/system:/etc/systemd/system.attached:/run/systemd/system:/run/systemd/system.attached:/run/systemd/generator:/nix/store/bl5dgjbbr9y4wpdw6k959mkq4ig0jwyg-systemd-256.10/lib/systemd/system:/run/systemd/generator.late | 17:22:51 |
gdamjan | there's /nix/var/nix/profiles/default/lib/systemd/system ? | 17:23:31 |
@adam:robins.wtf | hmm, and the standard FHS paths are missing from that list | 18:21:46 |
@adam:robins.wtf | what even is the default profile supposed to be used for on nixos? | 18:23:00 |
emily | nix-env, I guess | 18:23:59 |
| @rootname:matrix.org removed their display name rootname. | 19:55:08 |
| @rootname:matrix.org left the room. | 19:59:42 |
| 22 Jan 2025 |
@srestegosaurio:tchncs.de | I have what might be a silly SysD question: does it make any sense to set the WantedBy of a socket unit to anything other than the sockets.target?
| 08:53:29 |
@srestegosaurio:tchncs.de | I decided to "tidy up" my SystemD as an excuse to learn some concepts and I was wondering about this.
| 08:54:19 |
@srestegosaurio:tchncs.de | I. e.: There are some services in my system which I would like to be socket activated only and that the socket is available only when "it makes sense to".
| 08:55:53 |