add initial config

This commit is contained in:
Felix Schröter 2019-08-24 13:12:32 +02:00
commit 36e92d95c2
No known key found for this signature in database
GPG key ID: A12D7C9D2FD34458
6 changed files with 218 additions and 0 deletions

24
install.sh Executable file
View 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