diff options
Diffstat (limited to '.config/yadm/scripts/bootstrap/nix')
-rwxr-xr-x | .config/yadm/scripts/bootstrap/nix/bootstrap | 25 |
1 files changed, 25 insertions, 0 deletions
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 <nixpkgs> {}" > "$HOME/default.nix" |