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

error: path '/home' is a symlink #912

Open
Viliansh opened this issue Apr 2, 2024 · 22 comments · Fixed by NixOS/nix#10391
Open

error: path '/home' is a symlink #912

Viliansh opened this issue Apr 2, 2024 · 22 comments · Fixed by NixOS/nix#10391

Comments

@Viliansh
Copy link

Viliansh commented Apr 2, 2024

hello, after following this blog https://julianhofer.eu/blog/01-silverblue-nix/ for how to install nix on ostree based systems, installing with nix-shell work, but when i try to install something with nix-env it return this error error: path '/home' is a symlink is this a known issue?,i didn't saw any issue with this same error, only this post https://discourse.nixos.org/t/error-path-home-is-a-symlink/42267/2 that didn't solved my issue, what other info do i need to provide to help?

@Viliansh
Copy link
Author

Viliansh commented Apr 2, 2024

urg, ok the installer worked on a VM, look like the problem is with me, what i can do to debug this?

@cole-h
Copy link
Member

cole-h commented Apr 2, 2024

Looks like upstream has a similar issue reported: NixOS/nix#10247. Although it is about /var not /home, this may be related.

@Viliansh
Copy link
Author

Viliansh commented Apr 2, 2024

Looks like upstream has a similar issue reported: NixOS/nix#10247. Although it is about /var not /home, this may be related.

the problem is that, i installed nix in a vm(running fedora atomic) and it worked fine, but i tried in bare metal(also using fedora atomic) and it give me this error

@Viliansh
Copy link
Author

Viliansh commented Apr 3, 2024

how do i update to the master branch?

@cole-h
Copy link
Member

cole-h commented Apr 3, 2024

This was closed in error -- the fix hasn't yet made it to a released version of Nix yet.

@cole-h cole-h reopened this Apr 3, 2024
github-actions bot pushed a commit to NixOS/nix that referenced this issue Apr 3, 2024
@Viliansh
Copy link
Author

Viliansh commented Apr 3, 2024

This was closed in error -- the fix hasn't yet made it to a released version of Nix yet.

oh, ok thank you!

@cig0
Copy link

cig0 commented Apr 6, 2024

Hi all 👋

@cole-h Once the new version with the symlink fix is released, what will be the proper way to update a Single-user installation, given nix-env bails out with the symlink error message?

@Viliansh
Copy link
Author

Viliansh commented Apr 6, 2024

btw installed nix-2.21.2 and everything seen to be working fine, thank you all!, want me to close it now, or wait until the installer get updated?

@cig0
Copy link

cig0 commented Apr 7, 2024

On my side after updating to nix-2.21.2 via sh <(curl -L https://releases.nixos.org/nix/nix-2.21.2/install) --no-daemon:

$ nix-env -iA nix
error: attribute 'nix' in selection path 'nix' not found

This is a Single-user installation.

@Viliansh
Copy link
Author

Viliansh commented Apr 7, 2024

i ran this curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --nix-package-url https://releases.nixos.org/nix/nix-2.21.2/nix-2.21.2-x86_64-linux.tar.xz and worked

@cig0
Copy link

cig0 commented Apr 7, 2024

i ran this curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --nix-package-url https://releases.nixos.org/nix/nix-2.21.2/nix-2.21.2-x86_64-linux.tar.xz and worked

Oh yes, the Determinate installer! Sadly, the SELinux policy they ship breaks /var on all the Fedora Atomic Desktop (the "immutable" flavors), so I had to uninstall it a few months ago :(

In my case, I'm using an alternate method to install Nix as Single-user, which works great. The only issue is the symlink issue you mentioned in your OP up to 2.21.1.

Edit: typo

@Viliansh
Copy link
Author

Viliansh commented Apr 10, 2024

i ran this curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --nix-package-url https://releases.nixos.org/nix/nix-2.21.2/nix-2.21.2-x86_64-linux.tar.xz and worked

Oh yes, the Determinate installer! Sadly, the SELinux policy they ship breaks /var on all the Fedora Atomic Desktop (the "immutable" flavors), so I had to uninstall it a few months ago :(

In my case, I'm using an alternate method to install Nix as Single-user, which works great. The only issue is the symlink issue you mentioned in your OP up to 2.21.1.

i'm literally using fedora kinoite right now, and it update selinux policies from what i read in the installer, what issue you had? (and my nix profile is located in .local/state so i think it's also single-user)

@cig0
Copy link

cig0 commented Apr 10, 2024

Moar Kinoite goodness! 💙

TL;DR: I'm not using Kinoite itself, but a close-to-vanilla image that include some batteries.

I'm running https://universal-blue.org + https://blue-build.org/. uBlue is a special sauce you pour on top of ostree-based spins, that allows you to customize your images the way you want them (I.e. https://github.com/cig0/bluebuild/blob/main/config/recipes/). uBlue adds a few QoL enhancements to vanilla Atomic images (like Kinoite), and then I take those images as my base images for my hosts. A great uBlue derivated is https://preview.getaurora.dev/, which was born out of the desire of enjoying all the goodness of https://projectbluefin.io/ (Universal Blue official image), but with the greatness of KDE as DE.

Anyway, I believe that's enough context. So, the first thing I noticed when running Determinate's installer was that the policy somehow breaks SDDM - i.e. avatars won't show up on the login screen. It also produces some other side effects like:

I'm also being spammed with the AVC error messages:
image

Can you confirm you're not experiencing any weird stuff on your official Atomic Desktop Kinoite image, like the one I describe above?

@Viliansh
Copy link
Author

Can you confirm you're not experiencing any weird stuff on your official Atomic Desktop Kinoite image, like the one I describe above?

nop, never saw these errors and my sddm is working fine, also you can always rollback if something bad happens no?

@cig0
Copy link

cig0 commented Apr 13, 2024

Can you confirm you're not experiencing any weird stuff on your official Atomic Desktop Kinoite image, like the one I describe above?

nop, never saw these errors and my sddm is working fine, also you can always rollback if something bad happens no?

This is super interesting.

I downloaded the Fedora Atomic Kinoite 39 (https://download.fedoraproject.org/pub/fedora/linux/releases/39/Kinoite/x86_64/iso/Fedora-Kinoite-ostree-x86_64-39-1.5.iso) image, and the F40 Beta Kinoite image (https://download.fedoraproject.org/pub/fedora/linux/releases/test/40_Beta/Kinoite/x86_64/iso/Fedora-Kinoite-ostree-x86_64-40_Beta-1.10.iso), and definitely can reproduce the error.

Methodology:

  • I created a VM for each distro
  • Refreshed the repositories metadata
  • Upgraded the OS via rpm-ostree
  • Upgraded everything else with Discover

The only additional change I made to the Fedora Atomic Desktop 40 Beta Kinoite installation was to switch the Fedora SDDM theme to KDE's theme -- everything else was left untouched:

Fedora Atomic Desktop Kinoite 39
Before applying DS' Nix installer:
Spectacle-Screenshot_20240413_114452
After applying DS' Nix installer:
Spectacle-Screenshot_20240413_122322

Fedora Atomic Desktop Kinoite 40 Beta
Before applying DS' Nix installer:
Spectacle-Screenshot_20240413_114205
After applying DS' Nix installer:
Spectacle-Screenshot_20240413_113728


Edit: I forgot to mention I installed Nix using the same command from #912 (comment)
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --nix-package-url https://releases.nixos.org/nix/nix-2.21.2/nix-2.21.2-x86_64-linux.tar.xz

@Viliansh
Copy link
Author

oh, that's what you mean by messed?, let me see what happen if i change the sddm theme

@Viliansh
Copy link
Author

actually @cig0 you already have a VM, make a test for me, reinstall the vm like you did, but DON'T install nix, just create another user like you would you in KDE (going to settings and clicking Add users) and log out to see if the sddm changes

@cig0
Copy link

cig0 commented Apr 13, 2024

actually @cig0 you already have a VM, make a test for me, reinstall the vm like you did, but DON'T install nix, just create another user like you would you in KDE (going to settings and clicking Add users) and log out to see if the sddm changes

Here:
Spectacle-Screenshot_20240413_170023

@Viliansh I reverted all the changes made by the installer by deleting the VM snapshot and booting from the one I took right after updating both systems for the first time. The SDDM background image for F40 Beta Kinoite is the stock one (as I took the VM snapshot before even changing the SDDM theme).

HTH!

@Viliansh
Copy link
Author

hmmm, i can't print it, but i reverted my sddm going to /etc/sddm.conf.d/kde_settings.conf and writing this [Users] MaximumUid=1000 MinimumUid=1000
because my user is uid=1000, so it only show my user, look at /etc/passwd to be sure what's your uid

@cig0
Copy link

cig0 commented Apr 14, 2024

hmmm, i can't print it, but i reverted my sddm going to /etc/sddm.conf.d/kde_settings.conf and writing this [Users] MaximumUid=1000 MinimumUid=1000 because my user is uid=1000, so it only show my user, look at /etc/passwd to be sure what's your uid

Do you mean after using the installer?

@Viliansh
Copy link
Author

hmmm, i can't print it, but i reverted my sddm going to /etc/sddm.conf.d/kde_settings.conf and writing this [Users] MaximumUid=1000 MinimumUid=1000 because my user is uid=1000, so it only show my user, look at /etc/passwd to be sure what's your uid

Do you mean after using the installer?

yep, apparently sddm become that way because the nix-installer create various nix-users, and sddm becomes confused, but i'm not sure, for me it worked

@cig0
Copy link

cig0 commented Apr 15, 2024

hmmm, i can't print it, but i reverted my sddm going to /etc/sddm.conf.d/kde_settings.conf and writing this [Users] MaximumUid=1000 MinimumUid=1000 because my user is uid=1000, so it only show my user, look at /etc/passwd to be sure what's your uid

Do you mean after using the installer?

yep, apparently sddm become that way because the nix-installer create various nix-users, and sddm becomes confused, but i'm not sure, for me it worked

/etc/sddm.conf.d/kde_settings.conf
[Users]
MinimumUid=1000
MaximumUid=1001

Note: both the test users I created are now correctly handled by SDDM

Purrrfect, I confirm this is the solution. I believe it's an SDDM issue. I will reach out to the SDDM team and let them know about this.

Thanks for taking the time to help me troubleshoot this issue, @Viliansh 🚀
If everyone agrees, we can close this issue.

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 a pull request may close this issue.

3 participants