diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-02-19 18:46:58 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-02-22 16:40:15 +0100 |
commit | d4645d2c48434ba7210921a7a170596fb987db03 (patch) | |
tree | 9116640e2fd6a612fd3c7e5e01d1b3bab5b3d76c /.config/yadm/scripts/bootstrap/nix | |
parent | 2daa93b9985ecb8aba6531fdd93859a8dd451be3 (diff) |
[yadm] bootstrap packages for complete install
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" |