aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/provision-root.sh8
-rw-r--r--scripts/provision-user.sh9
2 files changed, 10 insertions, 7 deletions
diff --git a/scripts/provision-root.sh b/scripts/provision-root.sh
index 224a6f1..4cd8d17 100644
--- a/scripts/provision-root.sh
+++ b/scripts/provision-root.sh
@@ -4,9 +4,11 @@ set -xe
export DEBIAN_FRONTEND=noninteractive
-apt-get update
-apt-get upgrade -y
-
apt-get install -y git curl xz-utils sudo ssh
+useradd compromyse -G sudo -p changeme -s /bin/bash
+mkdir /home/compromyse
+cp -rT /etc/skel /home/compromyse
+chown -R compromyse:compromyse /home/compromyse
+echo "compromyse ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
unset DEBIAN_FRONTEND
diff --git a/scripts/provision-user.sh b/scripts/provision-user.sh
index 44472f4..79d5558 100644
--- a/scripts/provision-user.sh
+++ b/scripts/provision-user.sh
@@ -2,6 +2,8 @@
set -xe
+CONFIG=vm
+
sh <(curl -L https://nixos.org/nix/install) --no-daemon
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
@@ -9,12 +11,11 @@ sh <(curl -L https://nixos.org/nix/install) --no-daemon
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
-nix-shell '<home-manager>' -A install
+nix-shell "<home-manager>" -A install
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
-ssh-keyscan github.com >> ~/.ssh/known_hosts
-git clone git@github.com:compromyse/dotfiles $HOME/.config/home-manager/dotfiles
-git clone git@github.com:tmux-plugins/tpm $HOME/.tmux/plugins/tpm
+git clone https://github.com/compromyse/dotfiles $HOME/.config/home-manager/dotfiles
+git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
rm $HOME/.config/home-manager/home.nix
ln -s $HOME/.config/home-manager/dotfiles/machines/$CONFIG/home.nix $HOME/.config/home-manager/home.nix