Skip to content

Explicitly create /nix folder on installation #1523

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexdesiqueira
Copy link

@alexdesiqueira alexdesiqueira commented Apr 21, 2025

Description

Hey everyone,
while using this installer, when using the uninstaller it won't delete the /nix folder. This is a nuisance on e.g. Fedora Atomic images, where you'd have to go through extra steps to delete /. Checking that the installer will only revert the items it did while installing, I think that explicitly adding /nix to PATHS would solve the issue. Thanks! Please feel free to close if it's not relevant.

Checklist
  • Formatted with cargo fmt
  • Built with nix build
  • Ran flake checks with nix flake check
  • Added or updated relevant tests (leave unchecked if not applicable)
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • Linked to related issues (leave unchecked if not applicable)
Validating with install.determinate.systems

If a maintainer has added the upload to s3 label to this PR, it will become available for installation via install.determinate.systems:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/$PR_NUMBER | sh -s -- install

Hey everyone,
while using this installer, when using the uninstaller it won't delete the `/nix` folder. This is a nuisance on e.g. Fedora Atomic images, where you'd have to go through extra steps to delete `/`.
Checking that the installer will only revert the items it did while installing, I think that explicitly adding `/nix` to `PATHS` would solve the issue.
Thanks! Please feel free to close if it's not relevant.
@@ -8,6 +8,7 @@ use crate::action::{
};

const PATHS: &[&str] = &[
"/nix",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to do it as part of CreateNixTree, as that happens before we hit the revert for nix.mount, etc in the ostree planner, which will probably cause issues.

We'll probably want to create something similar to RevertCleanSteamosNixOffload for the ostree planner that does nothing in execute, but deletes /nix in revert, and have it be one of the first steps in the plan (so it's one of the last steps to be reverted upon uninstall).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants