Skip to content

Commit

Permalink
Merge branch 'main' into git
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmorganson authored Nov 13, 2023
2 parents 8ae189c + cad3989 commit 08e6752
Show file tree
Hide file tree
Showing 16 changed files with 131 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .chezmoiexternal.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[".local/share/alacritty/alacritty-theme"]
type = "git-repo"
url = "https://github.com/alacritty/alacritty-theme"

[".local/share/nushell/default_env.nu"]
type = "file"
url = "https://raw.githubusercontent.com/nushell/nushell/0.86.0/crates/nu-utils/src/sample_config/default_env.nu"
Expand Down
11 changes: 8 additions & 3 deletions .chezmoiignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.git
.tea
.pkgx
.local
.chezmoi
.hyperfine.js
bin
docker-compose.yaml
Expand All @@ -12,6 +12,7 @@ entrypoint.sh
README.md

# Cache
.cache
.dccache
.cs_cache
.pnpm-state
Expand All @@ -31,7 +32,9 @@ README.md
.config/zsh/.zcompdump*

# SSH
.ssh/known_hosts
.ssh/id_rsa
.ssh/id_rsa.pub
.ssh/known_hosts*
.ssh/environment-
.ssh/codespaces.auto
.ssh/codespaces.auto.pub
Expand All @@ -49,6 +52,7 @@ README.md
.config/zsh/.zsh_sessions
.zsh_sessions
.config/nushell/history.txt
.config/nushell/history.sqlite*

# VIM
.vim
Expand Down Expand Up @@ -100,7 +104,6 @@ Public
Support

# Extra files
.config/chezmoi
.config/coc
.config/containers
.config/docker
Expand All @@ -115,6 +118,7 @@ Support
# Cache in config
.config/todoist
.config/tmux/plugins
.config/chezmoi/chezmoistate.boltdb

# Unmanaged
.actrc
Expand All @@ -138,5 +142,6 @@ Support

**/.DS_Store

Code
GitHub
OrbStack
5 changes: 5 additions & 0 deletions dot_config/alacritty/alacritty.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
window:
option_as_alt: Both

font:
normal:
family: Hack

live_config_reload: true
4 changes: 4 additions & 0 deletions dot_config/chezmoi/chezmoi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[git]
autoCommit = true
autoPush = true

4 changes: 4 additions & 0 deletions dot_config/git/config
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f

[user]
name = Jason Morganson
email = [email protected]

[credential "https://github.com"]
helper =
helper = !gh auth git-credential
Expand Down
2 changes: 2 additions & 0 deletions dot_config/nushell/config.nu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ $env.config = (
| upsert history.isolation true
)


use xdg.nu
use theme.nu
use ls_colors.nu
overlay use git.nu
overlay use aliases.nu
Expand Down
15 changes: 8 additions & 7 deletions dot_config/nushell/env.nu
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
source ~/.local/share/nushell/default_env.nu

$env.NU_LIB_DIRS = ($env.NU_LIB_DIRS | default [] | append ($env.HOME | path join ".config" "nushell" "scripts"))
bash -c $"source ($env.HOME)/.profile && env"
| lines
| parse "{name}={value}"
| filter { |var| (not $var.name in $env) or $var.value != ($env | get $var.name) }
| where not name in ["_", "LAST_EXIT_CODE", "DIRS_POSITION"]
| transpose --header-row
| into record
| load-env

$env.PATH = (
$env.PATH
| split row (char esep)
| prepend "/usr/local/bin"
| prepend ($env.HOME | path join '.local' 'bin')
)
5 changes: 5 additions & 0 deletions dot_config/nushell/scripts/aliases.nu
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# https://www.nushell.sh/book/aliases.html#piping-in-aliases
def lsg [] { ls | sort-by type name -i | grid -c | str trim }

export alias l = ls
export alias ls = ls
export alias la = ls -a
Expand Down Expand Up @@ -43,6 +46,8 @@ export alias unpushed = git log --branches --not --remotes --no-walk --decorate
export alias stashes = git stash list
export alias untracked = git status --untracked

export def unclean [] { gfold -d json ~/Code | from json | where status != Clean }

export def undone [] {
untracked
unpushed
Expand Down
9 changes: 9 additions & 0 deletions dot_config/nushell/scripts/theme.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module theme {
export def dark [] {
$env.config.color_config = $dark_theme
}

export def light [] {
$env.config.color_config = $light_theme
}
}
22 changes: 22 additions & 0 deletions dot_config/topgrade/topgrade.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[git]

# Git repositories that you want to pull and push
repos = [
"~/Code/*/**",
"~/.local/share/chezmoi"
]

# Arguments to pass Git when pulling repositories
pull_arguments = "--rebase --autostash"

# Arguments to pass Git when pushing repositories
push_arguments = "--all"

[misc]

# Skip sending a notification at the end of a run (default: false)
skip_notify = true

# Commands to run after anything
[post_commands]
"Update brew bundle" = "/opt/homebrew/bin/brew bundle dump --force --file /Users/jasonmorganson/Library/Mobile Documents/com~apple~CloudDocs/Homebrew/Brewfile"
2 changes: 2 additions & 0 deletions dot_config/zellij/config.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
simplified_ui true

Empty file removed dot_config/zellij/empty_config.kdl
Empty file.
6 changes: 6 additions & 0 deletions dot_profile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ export XDG_PUBLICSHARE_DIR="$HOME/Public"
export XDG_TEMPLATES_DIR="$HOME/Templates"
export XDG_VIDEOS_DIR="$HOME/Videos"

# PATH
export PATH="$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"

# Homebrew
export HOMEBREW_BUNDLE_FILE="~/Library/Mobile Documents/com~apple~CloudDocs/Homebrew/Brewfile"

26 changes: 26 additions & 0 deletions dot_ssh/config
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,29 @@ Host *
AddKeysToAgent yes
SetEnv TERM=xterm-256color

Host jason-testing-prod-1
HostName jason-testing-prod-1
User ubuntu
IdentityFile ./LightsailDefaultKey-us-east-1.pem
RequestTTY force
RemoteCommand tmux attach

Host bucephalus-platform-dev-2
HostName bucephalus-platform-dev-2
User ubuntu
IdentityFile ./LightsailDefaultKey-us-east-1.pem
RequestTTY force
RemoteCommand tmux attach

Host bucephalus-platform-prod
HostName bucephalus-platform-prod
User ubuntu
IdentityFile ./LightsailDefaultKey-us-east-1.pem
RequestTTY force
RemoteCommand tmux attach

Host imapsync
HostName imapsync
User jasonmorganson
RequestTTY force
RemoteCommand zellij attach --create
25 changes: 25 additions & 0 deletions private_Library/LaunchAgents/io.github.topgrade-rs.topgrade.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>io.github.topgrade-rs.topgrade</string>

<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/topgrade</string>
</array>

<key>StartInterval</key>
<integer>10800</integer> <!-- Number of seconds in 3 hours -->

<key>RunAtLoad</key>
<true/>

<key>StandardErrorPath</key>
<string>/tmp/io.github.topgrade-rs.topgrade/err</string>

<key>StandardOutPath</key>
<string>/tmp/io.github.topgrade-rs.topgrade/out</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ env "HOME" }}/.config/nushell

0 comments on commit 08e6752

Please sign in to comment.