Skip to content

add Nix support#23

Open
korewaChino wants to merge 2 commits intomainfrom
patch/nix-support
Open

add Nix support#23
korewaChino wants to merge 2 commits intomainfrom
patch/nix-support

Conversation

@korewaChino
Copy link
Member

Experimental patch to add Nix support, needs testing

@korewaChino korewaChino self-assigned this Mar 18, 2026


# Add Nix support
RUN mkdir -p /var/nix && ln -srf /var/nix /nix && chmod 1777 /var/nix
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't work, nix requires the /nix directory to specifically not be a symlink. It must be writeable and probably a bind-mount to somewhere else

Copy link
Member Author

Choose a reason for hiding this comment

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

huh... interesting. What if we bind mount it to /sysroot/nix

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd recommend not doing anything with /sysroot due to it being an internal implementation of bootc, the composefs-native backend wants to change that into a read-only mount as well

Copy link
Member Author

Choose a reason for hiding this comment

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

what about an optional nix.mount unit that just creates a bind mount to /var/nix?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That probably would work yeah! I think thats what the determinate-systems nix installer does that...?

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