Open worldofpeace opened 4 years ago
Similarly, we had to do wants
manually in gnome-settings-daemon https://github.com/NixOS/nixpkgs/blob/954d44f875c20069478c05b1c81c11da7669944e/nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nix#L50. But everything has the links in the package.
I'm guessing that the [Install]
section, which is put into effect by systemctl enable
which in turn creates symlinks in /etc/systemd/system/multi-user.target.wants
(for instance), is not currently respected by systemd.packages
. EDIT: i.e. we need to use or emulate the behaviour of systemctl enable
Hello, I'm a bot and I thank you in the name of the community for opening this issue.
To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.
The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.
If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.
Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.
this is still really important
I marked this as stale due to inactivity. → More info
Still relevant.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/disable-a-systemd-service-while-having-it-in-nixoss-conf/12732/3
Can't we just run systemctl enable --root=where/ever *
or something?
@ElvishJerricco can you elaborate on the --root=where/ever
part?
@aanderse When building the generateUnits
derivation, we could do something along the lines of for x in ${units}; do systemctl enable --root=$out $x; done
. The --root
arg makes it operate on a different root tree and not on any running daemon, so all it will do is create necessary symlinks and implement the [Install]
section.
Describe the bug I've noticed on several occasions, and again with a PR https://github.com/NixOS/nixpkgs/pull/81087 which has a unit
The
wantedBy
didn't do anything when it was included withsystemd.packages
.We had to add it manually like:
Looking at nixpkgs, it seems like others have noticed this.