add initial config
This commit is contained in:
commit
36e92d95c2
6 changed files with 218 additions and 0 deletions
24
install.sh
Executable file
24
install.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $EUID != 0 ]; then
|
||||
sudo "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
CONFIG=$0
|
||||
|
||||
if [ -z "$CONFIG" ]
|
||||
then
|
||||
echo "path to config to use as configuration.nix needs to be passed as first argument"
|
||||
fi
|
||||
|
||||
ln -s $CONFIG configuration.nix
|
||||
|
||||
nixos-generate-config --root /mnt
|
||||
|
||||
# add nixos-unstable and home-manager channels
|
||||
nix-channel --add http://nixos.org/channels/nixos-unstable nixos-unstable
|
||||
nix-channel --add https://github.com/rycee/home-manager/archive/release-19.03.tar.gz home-manager
|
||||
nix-channel --update
|
||||
|
||||
nixos-install
|
||||
Loading…
Add table
Add a link
Reference in a new issue