Giter VIP home page Giter VIP logo

blueprint's Introduction

HGL/Blueprint

Print your workstation wherever you. The same thing, the same way, every time.

Supports Linux, macOS and Windows native and WSL2 and Docker container.

Getting Started

sudo ls # to let ansible become root when needed
# In Debian/Ubuntu add your the user to sudo group:
usermod -aG sudo
./bootstrap-Linux.sh
# Checkout your `.blueprint` settings.
git clone [email protected]:YOURUSER/.blueprint.git ~/.blueprint
ansible-playbook -i inventory --ask-become-pass main.yaml

Caution: Don't run ansible process in root! And don't forget to close your session if sudo is not needed anymore.

Coc Plugins

Run this after installation in vim to setup vim plugins:

:PlugInstall
:CocInstall coc-rust-analyzer coc-prettier coc-tsserver coc-go coc-pyright coc-snippets coc-go

MacOS

Install XCode 15 or higher from App Store. Then open XCode and install macOS SDK.

Docker has to be manually copied from attached disk image. This is to keep Alacritty unauthorized to access user Applications.

License

HGL, verified:

shasum -a 512 -c SHA512SUMS

Security Key

Share the YubiKey with WSL2 for Windows: https://learn.microsoft.com/en-us/windows/wsl/connect-usb

Use YubiKey for password less sudo:

mkdir -p ~/.config/Yubico
pamu2fcfg > ~/.config/Yubico/u2f_keys
pamu2fcfg -n >> ~/.config/Yubico/u2f_keys # with the spare key
sudo mv ~/.config/Yubico/u2f_keys /etc/Yubico/u2f_keys
sudo chown root:root -R /etc/Yubico/u2f_keys

Add a new key using:

pamu2fcfg -n | sudo tee -a /etc/Yubico/u2f_keys

Git signing

Add pubkeys to allowed_signers for git verification:

echo "$(git config --get user.email) namespaces=\"git\" $(cat ~/.ssh/vortex.pub)" >> ~/.ssh/allowed_signers

Windows

Run ansible in WSL2 for to run ansible on Windows native host:

export WIN_USER=YOUR_WINDOWS_USER
ansible-playbook -i inventory -e ansible_become_user=$WIN_USER -e ansible_user=$WIN_USER -e ansible_python_interpreter="C:\Users\$WIN_USER\.pyenv\pyenv-win\versions\3
.12.0\python.exe" main-Windows.yml

Secret Rotation

To rotate secrets, use ansible-vault:

ANSIBLE_VAULT_PASSWORD_FILE=<(vault -d vault) ansible-playbook -i inventory rotate.yaml

# or in Fish:
ANSIBLE_VAULT_PASSWORD_FILE=(vault -d vault | psub) ansible-playbook -i inventory rotate.yaml

blueprint's People

Contributors

evgnomon avatar

Watchers

 avatar

blueprint's Issues

Spotify

sudo apt install curl libcanberra-gtk-module software-properties-common apt-transport-https

Add Zellij.

Zellij is useful to watch files in a separate Alacrity terminal.

Yubi key

sudo apt-get install libpam-yubico

install Hugo

We need a tool to convert a bunch of markdowns to a website. I use Hugo to handle this for now.

Disable fn keys for Apple keyboards.

Add a systemd service /etc/systemd/system/set-fnmode.service

[Unit]
Description=Set FN Mode for HID Apple

[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo -n 0x02 > /sys/module/hid_apple/parameters/fnmode"
User=root

[Install]
WantedBy=multi-user.target

And then:

sudo systemctl daemon-reload
sudo systemctl enable set-fnmode.service
sudo systemctl start set-fnmode.service

Install Docker engine in macOSX

As containers are going to be used in Zygote a lot, we need to make sure the container engine is for us not we for the container engine. So we add support for Docker engine in macOSX and Ubuntu/Debian.

Hugo installation

Fix hugo installation from source in Debian
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.