diff --git a/usr/bin/nix-install b/usr/bin/nix-install index a5c21af61fd..a3696932940 100755 --- a/usr/bin/nix-install +++ b/usr/bin/nix-install @@ -1,4 +1,7 @@ #!/bin/bash +# original script here: https://github.com/dnkmmr69420/nix-with-selinux/blob/main/silverblue-installer.sh +# thanks dnkmmr! + sudo sleep 2 echo "Adding selinux content to /nix" sudo semanage fcontext -a -t etc_t '/nix/store/[^/]+/etc(/.*)?' ; sudo semanage fcontext -a -t lib_t '/nix/store/[^/]+/lib(/.*)?' ; sudo semanage fcontext -a -t systemd_unit_file_t '/nix/store/[^/]+/lib/systemd/system(/.*)?' ; sudo semanage fcontext -a -t man_t '/nix/store/[^/]+/man(/.*)?' ; sudo semanage fcontext -a -t bin_t '/nix/store/[^/]+/s?bin(/.*)?' ; sudo semanage fcontext -a -t usr_t '/nix/store/[^/]+/share(/.*)?' ; sudo semanage fcontext -a -t var_run_t '/nix/var/nix/daemon-socket(/.*)?' ; sudo semanage fcontext -a -t usr_t '/nix/var/nix/profiles(/per-user/[^/]+)?/[^/]+' @@ -90,4 +93,4 @@ sudo setenforce Enforcing sleep 1 echo "Reboot your system by typing" -echo "systemctl reboot" \ No newline at end of file +echo "systemctl reboot"