Skip to content

Commit

Permalink
feat(just): More nix things added to 70-nix.just (#162)
Browse files Browse the repository at this point in the history
* Update 70-nix.just

* added nixGL installation too 70-nix.just

* Update 70-nix.just

* Update 70-nix.just

* Nix service units will be real files instead of symlinks 70-nix.just

That should fix any issues of nix not loading

* fixed syntax in 70-nix.just

fixed syntax
  • Loading branch information
dnkmmr69420 authored Dec 1, 2023
1 parent a6d3cdc commit 1acf1a3
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions build/ublue-os-just/70-nix.just
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -35,6 +41,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
Expand All @@ -49,3 +64,56 @@ 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

# 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

# Upgrades user nix profile
nix-update-user:
#!/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

# 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

0 comments on commit 1acf1a3

Please sign in to comment.