Compare commits
12 Commits
59db8935ca
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| f89791d7ff | |||
| 4ee8c17fad | |||
| 0f6197f4e2 | |||
| c822db6021 | |||
| 9bc911a665 | |||
| edeb664f73 | |||
| 3b454065ae | |||
| dab4201158 | |||
| 906b218136 | |||
| e29003e594 | |||
| ed94e2047a | |||
| 0e9151390b |
64
.bashrc
64
.bashrc
@ -1,50 +1,61 @@
|
|||||||
# ==============================================================================
|
|
||||||
# Personal $HOME/.bashrc file by James Blair <mail@jamesblair.net>
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[ -z "$PS1" ] && return
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
# don't put duplicate lines or lines starting with space in the history.
|
# Don't put duplicate lines or lines starting with space in the history.
|
||||||
HISTCONTROL=ignoreboth
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
# append to the history file, don't overwrite it
|
# Append to the history file, don't overwrite it
|
||||||
# also ensure we write to history immediately instead of only on terminal close
|
# Also ensure we write to history immediately instead of only on terminal close
|
||||||
shopt -s histappend
|
shopt -s histappend
|
||||||
export PROMPT_COMMAND="history -a; history -n"
|
export PROMPT_COMMAND="history -a; history -n"
|
||||||
|
|
||||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
# Retain infinite bash history
|
||||||
HISTSIZE=10000
|
HISTSIZE=-1
|
||||||
HISTFILESIZE=20000
|
HISTFILESIZE=-1
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
# Check the window size after each command and, if necessary
|
||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
shopt -s checkwinsize
|
shopt -s checkwinsize
|
||||||
|
|
||||||
# enable color support of ls and also add handy aliases
|
# Alias ls to eza
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
if [ "$(command -v eza)" ]; then
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
alias ll='eza -l --icons=auto --group-directories-first'
|
||||||
alias ls='ls -l --color=auto -h --group-directories-first'
|
alias ls='eza -l --icons=auto --group-directories-first'
|
||||||
alias ll='ls -l --color=auto -h --group-directories-first'
|
fi
|
||||||
|
|
||||||
|
# Alias cat to bat
|
||||||
|
if [ "$(command -v bat)" ]; then
|
||||||
|
alias cat='bat --style=plain --pager=never' 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Alias docker to podman
|
# Alias docker to podman
|
||||||
alias docker=podman
|
alias docker=podman
|
||||||
|
|
||||||
# Custom git alias for pushing to all remotes at once
|
# Alias df to dysk
|
||||||
alias gpa='git remote | xargs -L1 git push --all'
|
if [ "$(command -v bat)" ]; then
|
||||||
|
alias df=dysk
|
||||||
|
fi
|
||||||
|
|
||||||
# simplify bitwarden cli usage
|
# Simplify bitwarden cli usage
|
||||||
cpcmd="xclip -selection c"; if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then cpcmd="wl-copy"; fi
|
cpcmd="xclip -selection c"; if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then cpcmd="wl-copy"; fi
|
||||||
alias bwu='export BW_SESSION=$(bw unlock --raw > ~/.bw_session && cat ~/.bw_session)'
|
alias bwu='export BW_SESSION=$(bw unlock --raw > ~/.bw_session && cat ~/.bw_session)'
|
||||||
|
|
||||||
function bwgp () {
|
function bwgp () {
|
||||||
local test=$(export BW_SESSION=~/.bw_session) && bw get password "$1" | $cpcmd;
|
|
||||||
|
|
||||||
# If the login has a totp associated we should leave a follow-up prompt for it
|
# Retrieve full json
|
||||||
if totp=$(bw get totp "$1"); then
|
local test
|
||||||
read -p "Press enter when ready for totp"
|
test=$(eval $(export BW_SESSION=~/.bw_session) && bw get item "${1}");
|
||||||
echo "${totp}" | $cpcmd
|
|
||||||
|
# Update clipboard with initial value
|
||||||
|
echo ${test} | jq -r '.login.password' | "${cpcmd}"
|
||||||
|
|
||||||
|
# Check if a totp is associated
|
||||||
|
if [ $(echo ${test} | jq -r .login.totp) != "null" ]; then
|
||||||
|
|
||||||
|
# Retrieve totp in background
|
||||||
|
exec 3< <(echo $(bw get totp "${1}"))
|
||||||
|
read -r -p "Press enter when ready for totp"
|
||||||
|
read -r <&3 line && echo "${line}" | "${cpcmd}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
function bwgt () { local test=$(export BW_SESSION=~/.bw_session) && bw get totp "$1" | $cpcmd; }
|
function bwgt () { local test=$(export BW_SESSION=~/.bw_session) && bw get totp "$1" | $cpcmd; }
|
||||||
@ -79,9 +90,7 @@ function bwai () {
|
|||||||
bw encode | bw create item && bw sync
|
bw encode | bw create item && bw sync
|
||||||
}
|
}
|
||||||
|
|
||||||
# enable programmable completion features (you don't need to enable
|
# Enable programmable completion features
|
||||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
|
||||||
# sources /etc/bash.bashrc).
|
|
||||||
if ! shopt -oq posix; then
|
if ! shopt -oq posix; then
|
||||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
. /usr/share/bash-completion/bash_completion
|
. /usr/share/bash-completion/bash_completion
|
||||||
@ -158,6 +167,7 @@ alias bthsd="bluetoothctl disconnect CC:98:8B:B6:F0:8E"
|
|||||||
# Add kubectl krew plugins to path
|
# Add kubectl krew plugins to path
|
||||||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||||
|
|
||||||
|
# Enable simple bash prompt
|
||||||
SBP_PATH=/home/james/Downloads/sbp
|
SBP_PATH=/home/james/Downloads/sbp
|
||||||
source /home/james/Downloads/sbp/sbp.bash
|
source /home/james/Downloads/sbp/sbp.bash
|
||||||
|
|
||||||
|
|||||||
10
Brewfile
10
Brewfile
@ -7,8 +7,10 @@ brew "bitwarden-cli"
|
|||||||
brew "btop"
|
brew "btop"
|
||||||
brew "cekit"
|
brew "cekit"
|
||||||
brew "cloudflared"
|
brew "cloudflared"
|
||||||
|
brew "pcre2"
|
||||||
brew "dict"
|
brew "dict"
|
||||||
brew "direnv"
|
brew "direnv"
|
||||||
|
brew "dysk"
|
||||||
brew "emacs"
|
brew "emacs"
|
||||||
brew "eza"
|
brew "eza"
|
||||||
brew "fd"
|
brew "fd"
|
||||||
@ -18,17 +20,18 @@ brew "gh"
|
|||||||
brew "git-absorb"
|
brew "git-absorb"
|
||||||
brew "git-lfs"
|
brew "git-lfs"
|
||||||
brew "glab"
|
brew "glab"
|
||||||
brew "pcre2"
|
brew "go"
|
||||||
brew "go", link: false
|
brew "go@1.24"
|
||||||
brew "go@1.23", link: true
|
|
||||||
brew "golangci-lint"
|
brew "golangci-lint"
|
||||||
brew "goreman"
|
brew "goreman"
|
||||||
brew "govulncheck"
|
brew "govulncheck"
|
||||||
|
brew "gpgme"
|
||||||
brew "helm"
|
brew "helm"
|
||||||
brew "kind"
|
brew "kind"
|
||||||
brew "kn"
|
brew "kn"
|
||||||
brew "kubernetes-cli"
|
brew "kubernetes-cli"
|
||||||
brew "krew"
|
brew "krew"
|
||||||
|
brew "kubetail"
|
||||||
brew "kwok"
|
brew "kwok"
|
||||||
brew "lynx"
|
brew "lynx"
|
||||||
brew "markdownlint-cli"
|
brew "markdownlint-cli"
|
||||||
@ -39,6 +42,7 @@ brew "npm-check-updates"
|
|||||||
brew "ocm"
|
brew "ocm"
|
||||||
brew "openshift-cli"
|
brew "openshift-cli"
|
||||||
brew "pcre"
|
brew "pcre"
|
||||||
|
brew "podman-compose"
|
||||||
brew "ripgrep"
|
brew "ripgrep"
|
||||||
brew "rosa-cli"
|
brew "rosa-cli"
|
||||||
brew "roxctl"
|
brew "roxctl"
|
||||||
|
|||||||
3
Flatfile
3
Flatfile
@ -12,5 +12,6 @@ flathub com.obsproject.Studio
|
|||||||
flathub org.fedoraproject.MediaWriter
|
flathub org.fedoraproject.MediaWriter
|
||||||
flathub app.polychromatic.controller
|
flathub app.polychromatic.controller
|
||||||
flathub org.videolan.VLC
|
flathub org.videolan.VLC
|
||||||
flathub org.remmina.Remmina
|
flathub com.thincast.client
|
||||||
flathub org.raspberrypi.rpi-imager
|
flathub org.raspberrypi.rpi-imager
|
||||||
|
flathub one.flipperzero.qFlipper
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
#+TITLE: Fairphone setup
|
|
||||||
#+AUTHOR: James Blair
|
|
||||||
#+EMAIL: mail@jamesblair.net
|
|
||||||
#+DATE: <2023-11-03 Fri 16:45>
|
|
||||||
|
|
||||||
|
|
||||||
Below are the steps I follow post standard installation of [[https://ubuntu-touch.io][ubuntu touch]] on my [[https://en.wikipedia.org/wiki/Fairphone_4][Fairphone 4]].
|
|
||||||
|
|
||||||
I've been using the fairphone 4 as a daily driver since April 2023, most recently with Ubuntu Touch.
|
|
||||||
|
|
||||||
|
|
||||||
* Downgrade prior to installation
|
|
||||||
|
|
||||||
After initially purchasing the fairphone, while it was running android I had upgraded to android 12. Unfortunately the ubuntu touch installer is not fully working with Android 12 so I had to downgrade the phone to Android 11 by reinstalling a stock image before proceeding with the ubuntu touch installation.
|
|
||||||
@ -1,200 +0,0 @@
|
|||||||
{
|
|
||||||
"policy": {
|
|
||||||
"DEFAULT": {
|
|
||||||
"capabilities": [
|
|
||||||
"frame",
|
|
||||||
"fetch",
|
|
||||||
"noscript",
|
|
||||||
"other",
|
|
||||||
"media"
|
|
||||||
],
|
|
||||||
"temp": false
|
|
||||||
},
|
|
||||||
"TRUSTED": {
|
|
||||||
"capabilities": [
|
|
||||||
"script",
|
|
||||||
"object",
|
|
||||||
"media",
|
|
||||||
"frame",
|
|
||||||
"font",
|
|
||||||
"webgl",
|
|
||||||
"fetch",
|
|
||||||
"ping",
|
|
||||||
"noscript",
|
|
||||||
"unchecked_css",
|
|
||||||
"lan",
|
|
||||||
"other",
|
|
||||||
"lazy_load"
|
|
||||||
],
|
|
||||||
"temp": false
|
|
||||||
},
|
|
||||||
"UNTRUSTED": {
|
|
||||||
"capabilities": [],
|
|
||||||
"temp": false
|
|
||||||
},
|
|
||||||
"sites": {
|
|
||||||
"trusted": [
|
|
||||||
"§:addons.mozilla.org",
|
|
||||||
"§:ajax.aspnetcdn.com",
|
|
||||||
"§:ajax.googleapis.com",
|
|
||||||
"§:bootstrapcdn.com",
|
|
||||||
"§:code.jquery.com",
|
|
||||||
"§:google.com",
|
|
||||||
"§:googlevideo.com",
|
|
||||||
"§:gstatic.com",
|
|
||||||
"§:maps.googleapis.com",
|
|
||||||
"§:mozilla.net",
|
|
||||||
"§:noscript.net",
|
|
||||||
"§:paypal.com",
|
|
||||||
"§:paypalobjects.com",
|
|
||||||
"§:yimg.com",
|
|
||||||
"§:youtube.com",
|
|
||||||
"§:ytimg.com",
|
|
||||||
"§:jamma.life",
|
|
||||||
"§:github.com",
|
|
||||||
"§:githubassets.com",
|
|
||||||
"§:dreamhost.com",
|
|
||||||
"§:redhat.com",
|
|
||||||
"§:statuspage.io",
|
|
||||||
"§:southerncross.co.nz",
|
|
||||||
"§:azure.com",
|
|
||||||
"§:stripe.com",
|
|
||||||
"§:b2clogin.com",
|
|
||||||
"§:farmlands.co.nz",
|
|
||||||
"§:dynamics365commerce.ms",
|
|
||||||
"§:amazon.com",
|
|
||||||
"§:awsstatic.com",
|
|
||||||
"§:k8s.io",
|
|
||||||
"§:googleusercontent.com",
|
|
||||||
"§:windy.com",
|
|
||||||
"§:sharesies.nz",
|
|
||||||
"§:slack.com",
|
|
||||||
"§:slack-edge.com",
|
|
||||||
"§:tsbbank.co.nz",
|
|
||||||
"§:kiwibank.co.nz",
|
|
||||||
"§:linuxfoundation.org",
|
|
||||||
"§:cvent.com",
|
|
||||||
"§:cvent-assets.com",
|
|
||||||
"§:airnewzealand.com",
|
|
||||||
"§:airnewzealand.co.nz",
|
|
||||||
"§:airpointsstore.co.nz",
|
|
||||||
"§:reddit.com",
|
|
||||||
"§:redditstatic.com",
|
|
||||||
"§:cve.org",
|
|
||||||
"§:aquasec.com",
|
|
||||||
"§:nist.gov",
|
|
||||||
"§:cvefeed.io",
|
|
||||||
"§:mitre10.co.nz",
|
|
||||||
"§:cloudflare.com",
|
|
||||||
"§:jamma.dev",
|
|
||||||
"§:powershop.co.nz",
|
|
||||||
"§:flux.app",
|
|
||||||
"§:nzfarmsource.co.nz",
|
|
||||||
"§:primehort.co.nz",
|
|
||||||
"§:myworkday.com",
|
|
||||||
"§:opentlc.com",
|
|
||||||
"§:openshift.net",
|
|
||||||
"§:jmhbnz.github.io",
|
|
||||||
"§:redhatworkshops.io",
|
|
||||||
"§:bunnings.co.nz",
|
|
||||||
"§:openshiftapps.com",
|
|
||||||
"§:westpac.co.nz",
|
|
||||||
"§:kapiticoast.govt.nz",
|
|
||||||
"§:discord.com",
|
|
||||||
"§:farmlandspro.co.nz",
|
|
||||||
"§:hnry.io",
|
|
||||||
"§:trademe.co.nz",
|
|
||||||
"§:bitwarden.com",
|
|
||||||
"§:one.nz",
|
|
||||||
"§:vodafone.co.nz",
|
|
||||||
"§:cncf.io",
|
|
||||||
"§:openshift.com",
|
|
||||||
"§:force.com",
|
|
||||||
"§:keddle.net.nz",
|
|
||||||
"§:ycombinator.com",
|
|
||||||
"§:snyk.io",
|
|
||||||
"§:docker.com",
|
|
||||||
"rhdemo.win",
|
|
||||||
"§:clearscore.com",
|
|
||||||
"§:projectbluefin.io",
|
|
||||||
"§:pbtech.co.nz",
|
|
||||||
"§:kde.org",
|
|
||||||
"§:protondb.com",
|
|
||||||
"§:sharesies.com",
|
|
||||||
"§:ryobi.co.nz",
|
|
||||||
"§:metlink.org.nz",
|
|
||||||
"§:sched.com",
|
|
||||||
"§:sched.co",
|
|
||||||
"§:canva.com",
|
|
||||||
"§:safing.io",
|
|
||||||
"§:windcave.com",
|
|
||||||
"§:azure.net",
|
|
||||||
"§:microsoftonline.com",
|
|
||||||
"§:microsoft.com",
|
|
||||||
"§:msftauth.net",
|
|
||||||
"§:mypaymentvault.com",
|
|
||||||
"§:recaptcha.net",
|
|
||||||
"§:salesforce.com",
|
|
||||||
"§:acc.co.nz",
|
|
||||||
"§:realme.govt.nz",
|
|
||||||
"§:redhatstatic.com",
|
|
||||||
"§:starlink.com",
|
|
||||||
"§:quay.io",
|
|
||||||
"§:airbnb.co.nz",
|
|
||||||
"§:onetimesecret.com",
|
|
||||||
"§:concursolutions.com",
|
|
||||||
"§:etcd.io",
|
|
||||||
"§:gitlab.com",
|
|
||||||
"§:sessionize.com",
|
|
||||||
"§:morganstanley.com",
|
|
||||||
"§:hnry.co.nz",
|
|
||||||
"§:wise.com",
|
|
||||||
"§:deerstalkers.org.nz",
|
|
||||||
"§:arcgis.com",
|
|
||||||
"§:muscache.com",
|
|
||||||
"§:ird.govt.nz",
|
|
||||||
"§:p-airnz.com",
|
|
||||||
"§:nzpost.co.nz",
|
|
||||||
"§:fast.com",
|
|
||||||
"§:metservice.com",
|
|
||||||
"§:b-airnz.com",
|
|
||||||
"§:egencia.co.nz",
|
|
||||||
"§:egencia.com",
|
|
||||||
"§:wellingtonairport.co.nz",
|
|
||||||
"§:airnewzealand.com.au",
|
|
||||||
"§:homes.co.nz",
|
|
||||||
"§:netlify.com",
|
|
||||||
"§:github.dev",
|
|
||||||
"§:jaycar.co.nz"
|
|
||||||
],
|
|
||||||
"untrusted": [],
|
|
||||||
"custom": {}
|
|
||||||
},
|
|
||||||
"enforced": true,
|
|
||||||
"autoAllowTop": false
|
|
||||||
},
|
|
||||||
"local": {
|
|
||||||
"debug": false,
|
|
||||||
"showCtxMenuItem": true,
|
|
||||||
"showCountBadge": true,
|
|
||||||
"showFullAddresses": false,
|
|
||||||
"showProbePlaceholders": true,
|
|
||||||
"amnesticUpdates": true,
|
|
||||||
"storage": "local"
|
|
||||||
},
|
|
||||||
"sync": {
|
|
||||||
"global": false,
|
|
||||||
"xss": true,
|
|
||||||
"TabGuardMode": "incognito",
|
|
||||||
"TabGuardPrompt": "post",
|
|
||||||
"cascadeRestrictions": false,
|
|
||||||
"overrideTorBrowserPolicy": false,
|
|
||||||
"storage": "sync"
|
|
||||||
},
|
|
||||||
"xssUserChoices": {
|
|
||||||
"https://mail.google.com>https://www.youtube.com": "allow",
|
|
||||||
"https://drive.google.com>https://youtube.googleapis.com": "allow",
|
|
||||||
"https://app.sharesies.nz>https://js.stripe.com": "allow",
|
|
||||||
"https://app.sharesies.com>https://js.stripe.com": "allow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -8,7 +8,7 @@ This document captures my standard tooling for future replication and aims to ma
|
|||||||
|
|
||||||
For the purposes of this repository I broadly refer to tooling as the "standard" way my devices are configured and which things are installed that are non-standard to the operating system.
|
For the purposes of this repository I broadly refer to tooling as the "standard" way my devices are configured and which things are installed that are non-standard to the operating system.
|
||||||
|
|
||||||
The environment is based on [[https://projectbluefin.io/][Bluefin]] for my primary work device which is a 2021 Razer Blade 14". Additionally a subdirectory is included for my smartphone which is a [[https://en.wikipedia.org/wiki/Fairphone_4][Fairphone 4]] running [[https://lineageos.org][LineageOS]].
|
The environment is based on [[https://projectbluefin.io/][Bluefin]] for my primary work device which is a 2021 Razer Blade 14".
|
||||||
|
|
||||||
|
|
||||||
* How I get things done
|
* How I get things done
|
||||||
|
|||||||
26
setup.org
26
setup.org
@ -14,7 +14,7 @@ I use Bluefin as my daily driver operating system on a variety of different mach
|
|||||||
Additional packages are ideally sourced from [[https://docs.brew.sh/Homebrew-on-Linux][Homebrew for Linux]], with [[https://flathub.org/][Flathub]] for anything I can't find in brew. Included in this repository is my ~Brewfile~ of packages.
|
Additional packages are ideally sourced from [[https://docs.brew.sh/Homebrew-on-Linux][Homebrew for Linux]], with [[https://flathub.org/][Flathub]] for anything I can't find in brew. Included in this repository is my ~Brewfile~ of packages.
|
||||||
|
|
||||||
#+begin_src tmux
|
#+begin_src tmux
|
||||||
brew bundle install
|
brew bundle install --cleanup
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
@ -212,3 +212,27 @@ sbp toggle peekaboo k8s
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Congratulations - you should now have a functional, good looking and informative bash prompt! 🎉
|
Congratulations - you should now have a functional, good looking and informative bash prompt! 🎉
|
||||||
|
|
||||||
|
|
||||||
|
** Optional - bluetooth device names
|
||||||
|
|
||||||
|
On a fresh install a selection of bluetooth devices need to be paired. I prefer a custom naming scheme for these devices, so the snippet below can be used to bulk apply my preferred device names.
|
||||||
|
|
||||||
|
#+NAME: Rename bluetooth devices
|
||||||
|
#+begin_src tmux
|
||||||
|
bluetoothctl connect CC:98:8B:B6:F0:8E && bluetoothctl set-alias james-headphones
|
||||||
|
bluetoothctl connect CA:20:FE:30:DA:C0 && bluetoothctl set-alias james-travel-mouse
|
||||||
|
bluetoothctl connect 80:E1:26:6D:66:4A && bluetoothctl set-alias james-flipper
|
||||||
|
bluetoothctl connect 88:C9:E8:5A:56:6C && bluetoothctl set-alias james-earphones
|
||||||
|
bluetoothctl connect E2:A0:9F:BC:DB:27 && bluetoothctl set-alias james-home-mouse
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
** Optional - disable sleep
|
||||||
|
|
||||||
|
I just power off my devices when they aren't in use, the snippet below disables sleep buttons and also ensures my devices will never unintentionally sleep when closing lid etc.
|
||||||
|
|
||||||
|
#+NAME: Disable sleep
|
||||||
|
#+begin_src bash
|
||||||
|
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
|
||||||
|
#+end_src
|
||||||
|
|||||||
Reference in New Issue
Block a user