NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.28k stars 14.27k forks source link

systemd tooling does not pull in .link files defined packages #105689

Open xaverdh opened 3 years ago

xaverdh commented 3 years ago

Describe the bug iwd includes a .link unit (lib/systemd/network/80-iwd.link) which is ignored by the systemd tooling (i.e. systemd.packages).

To Reproduce Use the iwd nixos module and observe that the .link file does not show up in /etc/systemd/network/

Expected behavior systemd.packages should probably extract the file from the package and make it visible there.

Additional context This came up in #105560

I think https://github.com/NixOS/nixpkgs/blob/fc7f72e1446b6eee70a0287cde9dbd84098e6625/nixos/modules/system/boot/systemd-lib.nix#L164 is the right place to fix this, but not entirely sure.

Notify maintainers cc @flokli

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module: systemd
flokli commented 3 years ago

It's a bit more complicated than that unfortunately - The links are managed inside systemd.network.units (see at the bottom of nixos/modules/system/boot/networkd.nix).

I'm not sure how well this will compose with "finding .link files from other packages.

Highlighting @dasJ due to https://github.com/NixOS/nixpkgs/pull/93073 for opinions ;-)

You could manually

xaverdh commented 3 years ago

As far as iwd is concerned, I opted for the manual route for now. The general issue remains though.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

flokli commented 3 years ago

Still relevant.

ahydronous commented 2 weeks ago

This file currently turns up in /etc/systemd/networking! image

So this issue can be closed I think. Sadly it is leading to a new issue: https://github.com/NixOS/nixpkgs/issues/353583