From d4645d2c48434ba7210921a7a170596fb987db03 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 19 Feb 2024 18:46:58 +0100 Subject: [yadm] bootstrap packages for complete install --- .config/yadm/scripts/bootstrap/nix/bootstrap | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 .config/yadm/scripts/bootstrap/nix/bootstrap (limited to '.config/yadm/scripts/bootstrap/nix') diff --git a/.config/yadm/scripts/bootstrap/nix/bootstrap b/.config/yadm/scripts/bootstrap/nix/bootstrap new file mode 100755 index 0000000..f6b5e97 --- /dev/null +++ b/.config/yadm/scripts/bootstrap/nix/bootstrap @@ -0,0 +1,25 @@ +#!/bin/zsh + + +if ! command -v nix > /dev/null 2>&1; then + sh <(curl -L https://nixos.org/nix/install) --daemon +fi + +#sudo sed -i 's/# sandbox/sandbox/' /etc/nix/nix.conf + +sudo systemctl enable nix-daemon --now + +#sudo usermod -aG nix-users $USER + +echo "Create initial nix env? (will take a while) [Y/n]" +read REPLY +if [[ $REPLY =~ ^[Yy]$ ]] +then + export PATH="$PATH:/nix/var/nix/profiles/default/bin" + nix-channel --add https://nixos.org/channels/nixpkgs-unstable + nix-channel -v --update + nix-env -u +fi + +## nix - debug help with "nix repl ." +echo "import {}" > "$HOME/default.nix" -- cgit v1.2.3