nix icon indicating copy to clipboard operation
nix copied to clipboard

Nix does not work with selinux enabled yet!

Open mysticphantomninja opened this issue 2 years ago • 3 comments

Platform

Fedora Linux... I have been been a long user of Fedora Linux however I've used Ubuntu and Arch-based distributions on my old laptop, and switched my main computer over to EndeavourOS for a few months, however I've switched back to Fedora during the last month. NixOS doesn't install on Fedora, however installs successfully on Ubuntu and Arch-based distributions. NixOS doesn't actually work on Fedora as I recieve the following message in the terminal:

Switching to the Multi-user Installer

---- oh no! --------------------------------------------------------------------
Nix does not work with selinux enabled yet!
see https://github.com/NixOS/nix/issues/2374

We'd love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community

I've looked up information regarding this, however I've wondered is there a work around to get NixOS installed on Fedora?

mysticphantomninja avatar Feb 25 '23 22:02 mysticphantomninja

Nix does not work with selinux enabled yet! see https://github.com/NixOS/nix/issues/2374

As the message notes, this isn't officially supported.

In the thread the installer links you can find ~unofficial community-maintained installers that should be usable: https://github.com/NixOS/nix/issues/2374#issuecomment-1103734992

abathur avatar Feb 26 '23 00:02 abathur

The Determinate Systems Nix installer works with SELinux since this https://github.com/DeterminateSystems/nix-installer/issues/124

I've tested the installation and usage with Fedora and Rocky 8 today using a Lima VM.

adrian-hesketh@lima-nix-airgapped-vm ~]$ hostnamectl
     Static hostname: lima-nix-airgapped-vm
           Icon name: computer-vm
             Chassis: vm 🖴
          Machine ID: b52f1e82bced4ef2b1c4be94606403ed
             Boot ID: bf52f969a9d44481b7d324e24541b723
      Virtualization: kvm
    Operating System: Fedora Linux 38 (Cloud Edition) 
         CPE OS Name: cpe:/o:fedoraproject:fedora:38
      OS Support End: Tue 2024-05-14
OS Support Remaining: 5month 2w 2d
              Kernel: Linux 6.2.9-300.fc38.x86_64
        Architecture: x86-64
     Hardware Vendor: QEMU
      Hardware Model: Standard PC _Q35 + ICH9, 2009_
    Firmware Version: edk2-stable202302-for-qemu
       Firmware Date: Wed 2023-03-01

With Nix installed, you still have to add additional SELinux permissions to run some things, e.g. I had to provide additional permissions to run a web server, which I did by attempting to run it, then using audit2allow -a -M mypolicy dance to create an SELinux policy.

a-h avatar Nov 27 '23 14:11 a-h

Also worth checking out running in Nix via Fedora Toolbox, it is a lot simpler and does even work on Fedora Atomic Desktops (e.g. Silverblue):

https://thrix.github.io/nix-toolbox/

thrix avatar Jun 14 '25 21:06 thrix