diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-05-25 15:42:43 +0530 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-05-25 15:42:43 +0530 |
| commit | ee0a5d881c896ccbd05ec16b5d7e3f12774c6844 (patch) | |
| tree | 178962538ce5350571166d20e5a218f6c9f348ec /scripts | |
| parent | fd09c4aedaf47808ec44623dc063ca61b54b3762 (diff) | |
update
Diffstat (limited to '')
| -rw-r--r-- | scripts/provision-docker.sh | 7 | ||||
| -rw-r--r-- | scripts/provision-root.sh | 12 | ||||
| -rw-r--r-- | scripts/provision-user.sh (renamed from debian/provision-user.sh) | 11 |
3 files changed, 29 insertions, 1 deletions
diff --git a/scripts/provision-docker.sh b/scripts/provision-docker.sh new file mode 100644 index 0000000..f238a44 --- /dev/null +++ b/scripts/provision-docker.sh @@ -0,0 +1,7 @@ +useradd -rm -d /home/compromyse -s /bin/bash -G sudo compromyse +groupadd -g 1000 compromyse && useradd -u 1000 -g compromyse -G sudo -m -s /bin/bash compromyse +sed -i /etc/sudoers -re 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' +sed -i /etc/sudoers -re 's/^root.*/root ALL=(ALL:ALL) NOPASSWD: ALL/g' +sed -i /etc/sudoers -re 's/^#includedir.*/## **Removed the include directive** ##"/g' +echo "compromyse ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +echo "compromyse user:"; su - compromyse -c id diff --git a/scripts/provision-root.sh b/scripts/provision-root.sh new file mode 100644 index 0000000..f44fdba --- /dev/null +++ b/scripts/provision-root.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -xe + +export DEBIAN_FRONTEND=noninteractive + +apt-get update +apt-get upgrade -y + +apt-get install -y git + +unset DEBIAN_FRONTEND diff --git a/debian/provision-user.sh b/scripts/provision-user.sh index 518f7b5..39da031 100644 --- a/debian/provision-user.sh +++ b/scripts/provision-user.sh @@ -2,11 +2,19 @@ set -xe +sh <(curl -L https://nixos.org/nix/install) --no-daemon + +. "$HOME/.nix-profile/etc/profile.d/nix.sh" + +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 . "$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 rm $HOME/.config/home-manager/home.nix ln -s $HOME/.config/home-manager/dotfiles/machines/v/home.nix $HOME/.config/home-manager/home.nix @@ -17,5 +25,6 @@ sudo apt-get autoremove -y home-manager build home-manager switch -b backup -git clone git@github.com:tmux-plugins/tpm ~/.tmux/plugins/tpm +rm $HOME/result + ~/.tmux/plugins/tpm/bin/install_plugins |
