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-rebuild overwrites existing files in /etc #22005

Open
bennofs opened this issue Jan 20, 2017 · 7 comments
Open

nixos-rebuild overwrites existing files in /etc #22005

bennofs opened this issue Jan 20, 2017 · 7 comments
Labels
0.kind: enhancement Add something new 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@bennofs
Copy link
Contributor

bennofs commented Jan 20, 2017

As it is implemented currently, nixos-rebuild will overwrite existing files in /etc. Wouldn't it be better if instead of overwriting them, it printed a warning?

@LnL7 LnL7 added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Jan 21, 2017
@fpletz fpletz added the 0.kind: enhancement Add something new label Jan 21, 2017
@jpierre03
Copy link
Contributor

@bennofs

  1. IMHO, a failure should trigger an error.
  2. add a file in /etc/xxx is supported in nixos with environment.etc attribute

Example:
environment.etc."pulse/daemon.conf".text = "flat-volumes = no"

an existing file can be fetched with builtins.readFile

@deepfire
Copy link
Contributor

deepfire commented Jan 23, 2017

@bennofs, quite notably I just have finished fighting a counterexample to your statement -- #22062!

In my case, a stale regular file /etc/cups/cupsd.conf was silently preventing a proper symlink from being installed during rebuild-switch.

@vcunat
Copy link
Member

vcunat commented Jan 23, 2017

Triggering an error isn't so easy, because an equivalent of switch can happen on boot-time, and there it's a much larger problem if you just fail. It shouldn't be silent in any case.

@mmahut
Copy link
Member

mmahut commented Aug 10, 2019

Are there any updates to this issue, please?

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@bennofs

This comment was marked as off-topic.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@stale

This comment was marked as off-topic.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

No branches or pull requests

7 participants