Created
November 10, 2021 06:45
-
-
Save Riey/5df2d462f235b338a85116a68e8b3147 to your computer and use it in GitHub Desktop.
Install Nix Flake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Before this script, target device must mounted as /mnt | |
nix-env -iA nixos.nixUnstable nixos.gh nixos.git | |
gh auth login | |
mkdir -pv /mnt/etc | |
gh repo clone https://github.com/Riey/nixos-flake /mnt/etc/nixos | |
mkdir -pv ~/.nix | |
echo "experimental-features = nix-command flakes" >> ~/.nix/config | |
nixos-install --root /mnt --flake /mnt/etc/nixos#nixos --impure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment