Last active
          March 2, 2021 06:26 
        
      - 
      
- 
        Save SirRippovMaple/3f89636ebc5538a4e8d4719cab23f7e5 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # source <(curl -L -s https://bit.ly/trumpi-ubuntu-bootstrap) | |
| mkdir -p ~/Downloads | |
| sudo apt install -y git jq | |
| curl -sfL 'https://vault.bitwarden.com/download/?app=cli&platform=linux' > ~/Downloads/bitwarden.zip | |
| sudo unzip ~/Downloads/bitwarden.zip -d /bin | |
| sudo chmod +x /bin/bw | |
| pushd / | |
| curl -sfL https://git.io/chezmoi | sudo sh | |
| popd | |
| mkdir -p ~/.ssh | |
| cat > ~/.ssh/config << "EOF" | |
| Host github.com | |
| AddKeysToAgent yes | |
| IdentityFile ~/.ssh/github | |
| EOF | |
| cat > ~/.bashrc << "EOF" | |
| alias unlock='export BWSESSION=`bw unlock --raw`' | |
| EOF | |
| echo Logging in to Bitwarden | |
| bw login | |
| echo Creating Bitwarden session | |
| export BW_SESSION=`bw unlock --raw` | |
| bw get item "private_key_github" | jq -r '.notes' > ~/.ssh/github | |
| chmod 600 ~/.ssh/github | |
| # Initialize our dotfiles | |
| chezmoi init [email protected]:SirRippovMaple/dotfiles.git | |
| chezmoi apply | |
| # Execute ansible | |
| mkdir -p ~/repositories | |
| cd ~/repositories && \ | |
| git clone [email protected]:SirRippovMaple/ansible.git && \ | |
| cd ansible && \ | |
| git submodule init && git submodule update && \ | |
| ./install.sh && ./update.sh | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment