From 9c572b6dfaa13def7f7428bedf66141f224065ae Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Sun, 26 Nov 2023 17:59:31 -0600 Subject: [PATCH] feat(just): Created 70-nix.just with nix installation, uninstallation, and configuration (#161) * Create 70-nix.just * added fleek stuff 70-nix.just * Update 70-nix.just made `nix-sudo` delete the nix sudo config file `/etc/sudoers.d/nix-sudo-env` if it exists before generating new `/etc/sudoers.d/nix-sudo-env` * fixed typos in 70-nix.just typo fixes * fixed syntax 70-nix.just * Update 70-nix.just * removed fleek theming from 70-nix.just * fix(nix): Restore theme install, check for mutter * fix(just): Add nix justfile to spec * chore(fleek-themes-install): Use kebab case instead of snake case --------- Co-authored-by: RJ Trujillo --- build/ublue-os-just/70-nix.just | 51 ++++++++++++++++++++++++++ build/ublue-os-just/ublue-os-just.spec | 8 +++- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 build/ublue-os-just/70-nix.just diff --git a/build/ublue-os-just/70-nix.just b/build/ublue-os-just/70-nix.just new file mode 100644 index 00000000..d4cea4a4 --- /dev/null +++ b/build/ublue-os-just/70-nix.just @@ -0,0 +1,51 @@ +# vim: set ft=make : + +# Install Nix with the Determinate Nix Installer +nix-install: + #!/usr/bin/env bash + curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sudo bash -s -- install --no-confirm + +# Uninstall Nix +nix-remove: + sudo /nix/nix-installer uninstall + +# Adds the nix bin path to the sudoers config +nix-sudo: + #!/usr/bin/env bash + sudo echo "Adding sudo path variables for nix" + sudo rm -f /etc/sudoers.d/nix-sudo-env + SUDOPATHVARIABLE5=$(sudo printenv PATH) + sudo tee /etc/sudoers.d/nix-sudo-env <> $HOME/.config/nix/nix.conf + curl -fsSL https://getfleek.dev/installer | env FORCE=1 bash + else + echo "Install nix with ujust nix-install before running ujust fleek-install." + fi + +# Integrate Nix/Fleek applications with system theme +fleek-themes-install: + #!/usr/bin/env bash + if [[ -x "/var/usrlocal/bin/fleek" ]]; then + if command -v mutter; then + fleek add adw-gtk3 --apply + else + fleek add breeze-icons + fleek add libsForQt5.breeze-qt5 + fleek apply + fi + else + echo "Install fleek with ujust fleek-install before running ujust fleek-themes-install." + fi diff --git a/build/ublue-os-just/ublue-os-just.spec b/build/ublue-os-just/ublue-os-just.spec index 9c8f6c02..d75f8839 100644 --- a/build/ublue-os-just/ublue-os-just.spec +++ b/build/ublue-os-just/ublue-os-just.spec @@ -1,7 +1,7 @@ Name: ublue-os-just Packager: ublue-os Vendor: ublue-os -Version: 0.7 +Version: 0.8 Release: 1%{?dist} Summary: ublue-os just integration License: MIT @@ -18,7 +18,8 @@ Source4: 30-distrobox.just Source5: 40-nvidia.just Source6: 50-akmods.just Source7: 60-custom.just -Source8: ujust +Source8: 70-nix.just +Source9: ujust %global sub_name %{lua:t=string.gsub(rpm.expand("%{NAME}"), "^ublue%-os%-", ""); print(t)} @@ -51,6 +52,9 @@ install -Dm755 %{SOURCE8} %{buildroot}%{_bindir}/ujust %attr(0755,root,root) %{_bindir}/ujust %changelog +* Sat Nov 25 2023 RJ Trujillo - 0.8 +- Integrate justfile for nix + * Fri Oct 13 2023 bri <284789+b-@users.noreply.github.com> - 0.7 - Add ujust runner - Add chsh task