From 8148ddb3be0880f8ba56780451c45db1bbc59ec1 Mon Sep 17 00:00:00 2001 From: Brian Ketelsen Date: Wed, 7 Jun 2023 11:04:26 -0400 Subject: [PATCH] feat: update nix tools (#263) --- usr/bin/ublue-nix-install | 87 +++++++++++++++++------------ usr/share/ublue-os/just/custom.just | 14 ++++- 2 files changed, 61 insertions(+), 40 deletions(-) diff --git a/usr/bin/ublue-nix-install b/usr/bin/ublue-nix-install index ad82dae42e5..d0f6159405f 100755 --- a/usr/bin/ublue-nix-install +++ b/usr/bin/ublue-nix-install @@ -2,16 +2,23 @@ # original script here: https://github.com/dnkmmr69420/nix-with-selinux/blob/main/silverblue-installer.sh # thanks dnkmmr! +#!/bin/bash sudo sleep 2 -echo "Adding SELinux content to /nix" +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/[^/]+)?/[^/]+' sleep 1 sudo mkdir /var/lib/nix sleep 1 -echo "Adding SELinux content to /var/lib/nix" +echo "adding selinux content to /var/lib/nix" sudo semanage fcontext -a -t etc_t '/var/lib/nix/store/[^/]+/etc(/.*)?' ; sudo semanage fcontext -a -t lib_t '/var/lib/nix/store/[^/]+/lib(/.*)?' ; sudo semanage fcontext -a -t systemd_unit_file_t '/var/lib/nix/store/[^/]+/lib/systemd/system(/.*)?' ; sudo semanage fcontext -a -t man_t '/var/lib/nix/store/[^/]+/man(/.*)?' ; sudo semanage fcontext -a -t bin_t '/var/lib/nix/store/[^/]+/s?bin(/.*)?' ; sudo semanage fcontext -a -t usr_t '/var/lib/nix/store/[^/]+/share(/.*)?' ; sudo semanage fcontext -a -t var_run_t '/var/lib/nix/var/nix/daemon-socket(/.*)?' ; sudo semanage fcontext -a -t usr_t '/var/lib/nix/var/nix/profiles(/per-user/[^/]+)?/[^/]+' echo "Creating service files" sleep 1 +echo "creating SSL cert file" + +sudo tee /etc/systemd/system/nix-daemon.service.d/override.conf <