Compare commits
2 commits
297ef48f8e
...
e2cc3f5f34
Author | SHA1 | Date | |
---|---|---|---|
Ryan Schanzenbacher | e2cc3f5f34 | ||
Ryan Schanzenbacher | a3a44f9054 |
21
deploy.sh
21
deploy.sh
|
@ -39,10 +39,10 @@ copy_and_prepare() {
|
||||||
# Copy template to root of repo
|
# Copy template to root of repo
|
||||||
if [ "$install_type" == "e" ]
|
if [ "$install_type" == "e" ]
|
||||||
then
|
then
|
||||||
cp ./modules/ryan-config/deploy-templates/HostTemplateEncrypted.scm ./$install_hostname.scm
|
cp ./modules/ryan-config/deploy-templates/HostTemplateEncrypted ./$install_hostname.scm
|
||||||
elif [ "$install_type" == "d" ]
|
elif [ "$install_type" == "d" ]
|
||||||
then
|
then
|
||||||
cp ./modules/ryan-config/deploy-templates/HostTemplate.scm ./$install_hostname.scm
|
cp ./modules/ryan-config/deploy-templates/HostTemplate ./$install_hostname.scm
|
||||||
else
|
else
|
||||||
echo "Invalid install type (not d or e), bailing!"
|
echo "Invalid install type (not d or e), bailing!"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -73,16 +73,14 @@ install_user_env() {
|
||||||
# System should be installed now, we can chroot in and configure the user profile now
|
# System should be installed now, we can chroot in and configure the user profile now
|
||||||
# NOTE: This assumes the user "ryan" for things, so change the USER var if you change your username
|
# NOTE: This assumes the user "ryan" for things, so change the USER var if you change your username
|
||||||
|
|
||||||
# Mount the special block devices to prepare for chroot
|
# Copy some files over to prepare for reboot
|
||||||
mount --rbind /proc /mnt/proc
|
|
||||||
mount --rbind /sys /mnt/sys
|
|
||||||
mount --rbind /dev /mnt/dev
|
|
||||||
|
|
||||||
# chroot into system and run commands
|
|
||||||
USER=ryan
|
USER=ryan
|
||||||
chroot /mnt <<EOT
|
guix shell git -- git clone https://git.stationery.faith/ryan77627/guix-dotfiles /mnt/home/$USER/.config/guix
|
||||||
|
|
||||||
EOT
|
cp ~/guix-dotfiles/$install_hostname.scm /mnt/home/$USER/.config/guix/$install_hostname.scm
|
||||||
|
cp ~/guix-dotfiles/modules/ryan-config/user_first_run.sh /mnt/home/$USER/.bashrc
|
||||||
|
|
||||||
|
chown 1000:1000 -R /mnt/home/ryan
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,3 +88,6 @@ gather_env
|
||||||
copy_and_prepare
|
copy_and_prepare
|
||||||
install_system
|
install_system
|
||||||
install_user_env
|
install_user_env
|
||||||
|
|
||||||
|
# Reboot the machine at this point!
|
||||||
|
reboot
|
||||||
|
|
0
home-config/deploy-flag
Normal file
0
home-config/deploy-flag
Normal file
20
modules/ryan-config/user_first_run.sh
Normal file
20
modules/ryan-config/user_first_run.sh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/run/current-system/profile/bin/bash
|
||||||
|
|
||||||
|
# This should run on user first logon, so let's a go!
|
||||||
|
# First, we should run a guix pull
|
||||||
|
|
||||||
|
guix pull
|
||||||
|
|
||||||
|
hash guix
|
||||||
|
|
||||||
|
guix home -L ~/.config/guix/modules reconfigure ~/.config/guix/home-config/home-configuration.scm
|
||||||
|
|
||||||
|
sudo herd restart nix-daemon
|
||||||
|
|
||||||
|
nix-channel --update
|
||||||
|
|
||||||
|
nix-shell '<home-manager>' -A install
|
||||||
|
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
home-manager switch
|
Loading…
Reference in a new issue