From c696372bcc1560962b86526539e06a20a51de4a6 Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Mon, 27 Nov 2023 11:22:45 -0600 Subject: [PATCH 1/6] Update 70-nix.just --- build/ublue-os-just/70-nix.just | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/build/ublue-os-just/70-nix.just b/build/ublue-os-just/70-nix.just index d4cea4a4..c482fb5b 100644 --- a/build/ublue-os-just/70-nix.just +++ b/build/ublue-os-just/70-nix.just @@ -35,6 +35,15 @@ fleek-install: echo "Install nix with ujust nix-install before running ujust fleek-install." fi +# Removes Fleek +fleek-remove: + #!/usr/bin/env bash + if [[ -x "/var/usrlocal/bin/fleek" ]]; then + sudo rm -f /var/usrlocal/bin/fleek + else + echo "Fleek is not installed or has been already removed" + fi + # Integrate Nix/Fleek applications with system theme fleek-themes-install: #!/usr/bin/env bash @@ -49,3 +58,21 @@ fleek-themes-install: else echo "Install fleek with ujust fleek-install before running ujust fleek-themes-install." fi + +# Installs Devbox +devbox-install: + #!/usr/bin/env bash + if [[ -d "/nix" ]]; then + curl -fsSL https://get.jetpack.io/devbox | bash + else + echo "Install nix with ujust nix-install before running ujust devbox-install." + fi + +# Removes Devbox +devbox-remove: + #!/usr/bin/env bash + if [[ -x "/var/usrlocal/bin/devbox" ]]; then + sudo rm -f /var/usrlocal/bin/devbox + else + echo "Devbox is not installed or has been already removed" + fi From b954b0f01c8791244ad309d4d3f10a5637390956 Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Mon, 27 Nov 2023 11:57:11 -0600 Subject: [PATCH 2/6] added nixGL installation too 70-nix.just --- build/ublue-os-just/70-nix.just | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build/ublue-os-just/70-nix.just b/build/ublue-os-just/70-nix.just index c482fb5b..170421e7 100644 --- a/build/ublue-os-just/70-nix.just +++ b/build/ublue-os-just/70-nix.just @@ -76,3 +76,12 @@ devbox-remove: else echo "Devbox is not installed or has been already removed" fi + +# Installs nixGL +nixgl-install: + #!/usr/bin/env bash + if [[ -d "/nix" ]]; then + nix profile install github:guibou/nixGL --impure + else + echo "NixGL requires nix to install." + fi From 842e7cf544b76cf416db3d5a78cbac532c2ff45b Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Tue, 28 Nov 2023 11:17:08 -0600 Subject: [PATCH 3/6] Update 70-nix.just --- build/ublue-os-just/70-nix.just | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build/ublue-os-just/70-nix.just b/build/ublue-os-just/70-nix.just index 170421e7..01b33e45 100644 --- a/build/ublue-os-just/70-nix.just +++ b/build/ublue-os-just/70-nix.just @@ -85,3 +85,22 @@ nixgl-install: else echo "NixGL requires nix to install." fi + +# Upgrades user nix profile +nix-update: + #!/usr/bin/env bash + if [[ -d "/nix" ]]; then + nix profile upgrade '.*' + else + echo "Nix is not installed" + fi + +# Upgrades both user and root nix profiles +nix-update-all: + #!/usr/bin/env bash + if [[ -d "/nix" ]]; then + nix profile upgrade '.*' + sudo nix profile upgrade '.*' + else + echo "Nix is not installed" + fi From b69f145cf42746014cf8674858a098c4cd4e3446 Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Tue, 28 Nov 2023 11:22:55 -0600 Subject: [PATCH 4/6] Update 70-nix.just --- build/ublue-os-just/70-nix.just | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ublue-os-just/70-nix.just b/build/ublue-os-just/70-nix.just index 01b33e45..e2f7ba55 100644 --- a/build/ublue-os-just/70-nix.just +++ b/build/ublue-os-just/70-nix.just @@ -87,7 +87,7 @@ nixgl-install: fi # Upgrades user nix profile -nix-update: +nix-update-user: #!/usr/bin/env bash if [[ -d "/nix" ]]; then nix profile upgrade '.*' From b9557e5c25ce5e9d308b61d077906978bd2b925c Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:44:39 -0600 Subject: [PATCH 5/6] Nix service units will be real files instead of symlinks 70-nix.just That should fix any issues of nix not loading --- build/ublue-os-just/70-nix.just | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build/ublue-os-just/70-nix.just b/build/ublue-os-just/70-nix.just index e2f7ba55..3bbe2052 100644 --- a/build/ublue-os-just/70-nix.just +++ b/build/ublue-os-just/70-nix.just @@ -4,10 +4,16 @@ nix-install: #!/usr/bin/env bash curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sudo bash -s -- install --no-confirm + sudo rm -f /etc/systemd/system/nix-daemon.service + sudo rm -f /etc/systemd/system/nix-daemon.socket + sudo cp /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.service + sudo cp /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket /etc/systemd/system/nix-daemon.socket # Uninstall Nix nix-remove: sudo /nix/nix-installer uninstall + sudo rm -f /etc/systemd/system/nix-daemon.service + sudo rm -f /etc/systemd/system/nix-daemon.socket # Adds the nix bin path to the sudoers config nix-sudo: @@ -104,3 +110,10 @@ nix-update-all: else echo "Nix is not installed" fi + +# Deletes and recoppies nix systemd units to ensure that they are the same +nix-systemd-copy: + sudo rm -f /etc/systemd/system/nix-daemon.service + sudo rm -f /etc/systemd/system/nix-daemon.socket + sudo cp /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.service + sudo cp /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket /etc/systemd/system/nix-daemon.socket From 86020c67bf056a163f4bd2117cb5b8f58b61296b Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:45:41 -0600 Subject: [PATCH 6/6] fixed syntax in 70-nix.just fixed syntax