Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/networking.nix: make /etc/netgroup empty #68671

Closed
wants to merge 1 commit into from

Conversation

@matthewbauer
Copy link
Member

matthewbauer commented Sep 13, 2019

nscd complains when we say to cache /etc/netgroup but it doesn’t
actually exist. To silence these (apparently harmless) warning, just
make /etc/netgroup empty on activation.

Fixes #68603

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

nscd complains when we say to cache /etc/netgroup but it doesn’t
actually exist. To silence these (apparently harmless) warning, just
make /etc/netgroup empty on NixOS

Fixes #68603
@@ -37,6 +37,10 @@ in
###### implementation

config = mkIf cfg.enable {
system.activationScripts.netgroup = ''
touch /etc/netgroup

This comment has been minimized.

Copy link
@Mic92

Mic92 Sep 13, 2019

Contributor

systemd.tmpfiles.rules is preferred here. If we ever want to manage this file or a user would it not be better to use environment.etc."netgroup"?

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Sep 13, 2019

Author Member

My understanding was it could be generated by some tools similar to how resolv.conf works. But unclear on that, and probably need someone who actually uses this file to provide some input. This was just the easiest way to silence that warning.

This comment has been minimized.

Copy link
@Mic92

Mic92 Sep 13, 2019

Contributor

Something like following should work too:

systemd.tmpfiles.rules = [ "f /etc/netgroup" ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.