Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions base/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ RUN ln -srvf /var/opt /opt && \
ln -srvf /var/afs /afs && \
ln -srvf /var/media /media


# Add Nix support
RUN mkdir -p /var/nix && ln -srf /var/nix /nix && chmod 1777 /var/nix
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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...?


# Tmpfiles configuration
RUN echo "$(for dir in opt usrlocal home srv mnt ; do echo "d /var/$dir 0755 root root -" ; done)" | tee -a /usr/lib/tmpfiles.d/bootc-base-dirs.conf && \
RUN echo "$(for dir in opt usrlocal home srv mnt nix ; do echo "d /var/$dir 0755 root root -" ; done)" | tee -a /usr/lib/tmpfiles.d/bootc-base-dirs.conf && \
echo "d /var/roothome 0700 root root -" | tee -a /usr/lib/tmpfiles.d/bootc-base-dirs.conf && \
echo "d /run/media 0755 root root -" | tee -a /usr/lib/tmpfiles.d/bootc-base-dirs.conf

Expand Down
Loading