Compare commits

..

17 Commits
nix ... main

Author SHA1 Message Date
Tyrel Souza
8093c6ac9f
Configurable 2024-09-30 10:23:17 -04:00
Tyrel Souza
9757cfbb97
screenshot fixes, zsh, some others 2024-09-30 10:21:32 -04:00
Tyrel Souza
427302795a
travis fix 2024-09-28 22:46:21 -04:00
4cdff74d2b nixos pubkey 2024-08-14 20:36:38 -04:00
Tyrel Souza
40eacc3371
Fix merge 2024-08-13 16:41:38 -04:00
Tyrel Souza
48763b4d7a
fix shells 2024-08-13 16:28:51 -04:00
Tyrel Souza
3183d4ac1a
p10k fixes 2024-08-13 16:18:43 -04:00
Tyrel Souza
482ac00839
Wezterm updates, and an odd git punish file 2024-08-13 09:47:26 -04:00
Tyrel Souza
003b9cbe8b
merge 2024-08-13 09:16:28 -04:00
Tyrel Souza
e7a291db30
updates from RL 2024-08-13 09:16:04 -04:00
Tyrel Souza
be29c2f2bd
auth keys 2024-05-20 10:11:44 -04:00
Tyrel Souza
e463d35dd6
desktop changes 2024-05-20 10:07:28 -04:00
Tyrel Souza
d4aa37f573
pacman nitch 2024-05-20 10:04:53 -04:00
Tyrel Souza
ea16342574
remove old bin files 2024-05-14 17:26:26 -04:00
Tyrel Souza
e419f323d0
readme 2024 yo 2024-05-14 17:18:40 -04:00
Tyrel Souza
cc333d932b
bases: 2024-05-14 17:13:50 -04:00
Tyrel Souza
45f668be72
remove nix, cleanup justfiles 2024-05-14 17:02:21 -04:00
59 changed files with 2004 additions and 885 deletions

11
.gitignore vendored
View File

@ -1,13 +1,6 @@
*.swp
result
vim/bundle/
tags*
vim/view
.netrwhist
chromedriver
emacs.d/elpa
midweek*
watercooler*
spicy*
bin/duck.sh
bin/tidelift
home/bin/subl

View File

@ -1,11 +1,7 @@
## Setup
.PHONY: install-just install-nix
.PHONY: install-just
## Management
install-just:
curl --proto '=https' --tlsv1.3 -sSf https://just.systems/install.sh | bash -s -- --to ~/
sudo cp ~/just /usr/local/bin
install-nix:
sh <(curl -L https://nixos.org/nix/install) --daemon

View File

@ -1,31 +1,16 @@
# Nix
# Tyrel Dotfiles
## Debian
Install Nix and Home-Manager
```shell
$ export NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/tyrel/channels/nixpkgs:/nix/var/nix/profiles/per-user/tyrel/channels
$ nix-channel --add https://nixos.org/channels/nixos-22.11 nixos
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
$ nix-channel --update
$ nix-shell '<home-manager>' -A install
make install-just
just debian
```
For Macos:
## Arch
Install nix-darwin
```shell
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --update
$ nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
$ ./result/bin/darwin-installer
$ ./result/sw/bin/darwin-rebuild switch --flake .
make install-just
just arch
```
# How To
Clone the repository, then symlink `ln -s` each file to the dotted version in your homedirectory.
ex:
```ln -s dotfiles/shell_funcs ~/.shell_funcs```

View File

@ -1,27 +0,0 @@
#!/bin/bash
USER=tyrel
HOME=/home/tyrel
curl https://sh.rustup.rs -sSf | sh
sudo curl https://pyenv.run | bash
ln -s $(pwd)/home/config/nvim /home/$USER/.config/nvim
ln -s $(pwd)/home/gitconfig /home/$USER/.gitconfig
ln -s $(pwd)/home/shell_aliases /home/$USER/.shell_aliases
ln -s $(pwd)/home/shell_funcs /home/$USER/.shell_funcs
ln -s $(pwd)/home/zshrc /home/$USER/.zshrc
echo 'export PYENV_ROOT="/home/$USER/.pyenv"' >> /home/$USER/.bashrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> /home/$USER/.bashrc
echo 'eval "$(pyenv init -)"' >> /home/$USER/.bashrc
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv install 3.12.3
pyenv global 3.12.3
pip install neovim

View File

@ -1,33 +0,0 @@
#!/bin/bash
USER=tyrel
HOME=/home/tyrel
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:neovim-ppa/unstable
sudo apt update
sudo apt-get install -y libncurses5-dev neovim
sudo apt-get install -y build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev
sudo apt-get install -y git-lfs
curl https://sh.rustup.rs -sSf | sh
sudo curl https://pyenv.run | bash
ln -s $(pwd)/home/config/nvim /home/$USER/.config/nvim
ln -s $(pwd)/home/bin /home/$USER/bin
ln -s $(pwd)/home/gitconfig /home/$USER/.gitconfig
ln -s $(pwd)/home/shell_aliases /home/$USER/.shell_aliases
ln -s $(pwd)/home/shell_funcs /home/$USER/.shell_funcs
echo 'export PYENV_ROOT="/home/$USER/.pyenv"' >> /home/$USER/.bashrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> /home/$USER/.bashrc
echo 'eval "$(pyenv init -)"' >> /home/$USER/.bashrc
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv install 3.10.13
pyenv global 3.10.13
pip install neovim

View File

@ -1,5 +0,0 @@
#!/bin/bash
git reset --soft origin/master
git commit -a
git push -f

View File

@ -1 +0,0 @@
oh_fuck.sh

20
home/bin/git_punish.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# Check if filename and line number are provided
if [ $# -ne 2 ]; then
echo "Usage: $0 <filename> <line_number>"
exit 1
fi
# Extract filename and line number from arguments
filename=$1
line_number=$2
# Get the commit hash where the line was last changed
commit_hash=$(git blame -L "$line_number,$line_number" -- "$filename" | awk '{print $1}')
# Get the email address of the committer
email_address=$(git show --no-patch --format='%ae' $commit_hash)
echo "Email address of the committer: $email_address"

View File

@ -1,5 +0,0 @@
#!/bin/bash
git tag temp$RANDOM
git reset --hard HEAD^
git push --force
echo "There. I fixed your stupid mistake Tyrel"

View File

@ -1,8 +0,0 @@
#!/usr/bin/env python
# convert json to yaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# python3 json2yaml.py < ~/code/manpow/moneybug/mbuploader/support/offices.json
# gist https://gist.github.com/noahcoad/46909253a5891af3699580b8f17baba8
import yaml, json, sys
sys.stdout.write(yaml.dump(json.load(sys.stdin)))

View File

@ -1,3 +0,0 @@
#!/bin/bash
killall transmission-gtk

View File

@ -1,11 +0,0 @@
#!/bin/bash
set -v
umount /Volumes/ramdisk
mysql.server stop
killall mysqld
killall mysqld
killall mysqld
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://2048000`
cp -r /usr/local/var/mysql /Volumes/ramdisk
mysql.server start

View File

@ -1,5 +0,0 @@
#!/bin/bash
git tag temp$RANDOM
git reset --hard HEAD^
git push --force
echo "There. I fixed your stupid mistake Tyrel"

View File

@ -1,6 +0,0 @@
python setup.py clean
python setup.py sdist bdist_wheel
python3 setup.py sdist bdist_wheel
gpg --detach-sign -a dist/*.gz
gpg --detach-sign -a dist/*.whl
twine upload dist/*

View File

@ -7,15 +7,21 @@
### CHANGE THESE FUNCTIONS:
# Host is the ssh host
HOST=tyrel.dev
# Site is the domain (can differ from host)
SITE=tyrel.bike
upload() {
# Given a filepath and a target name, upload the screenshot
chmod +r "$1"
scp "$1" "tyrel.dev:/www/tyrel.bike/s/$2"
scp "$1" "$HOST:/www/$SITE/s/$2"
}
url() {
# Given a target name, echo the expected URL of the uploaded screenshot
echo "https://tyrel.pw/s/$1"
echo "https://$SITE/s/$1"
}
### (End)
@ -88,7 +94,8 @@ clipboard " "
# Upload it
url=$(url "${filename}")
echo "Uploading: $url"
upload "${tmppath}" "${filename}" && rm "${tmppath}" || fail 3 "failed to upload ${tmppath}"
upload "${tmppath}" "${filename}" || fail 3 "failed to upload ${tmppath}"
# Copy to clipboard
clipboard "${url}"

View File

@ -1,3 +0,0 @@
#!/bin/bash
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's%\(..\)%\1:%g; s%.$%%')

View File

@ -1,13 +1,5 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
include catppuccin-frappe
include tyrel-colors
set $mod Mod4
@ -26,14 +18,14 @@ exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
@ -45,7 +37,7 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec terminator -u
# kill focused window
bindsym $mod+Shift+q kill
@ -54,7 +46,8 @@ bindsym $mod+Shift+q kill
# bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+d exec rofi -show run
bindsym $mod+Shift+d exec rofi -show drun
bindsym $mod+Shift+Tab exec rofi -show window -p '[window] '
bindsym $mod+Tab exec rofi -show window -p '[window] '
bindsym $mod+t split toggle; layout tabbed; exec notify-send 'Tabbed'
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
@ -103,9 +96,6 @@ bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
@ -179,13 +169,14 @@ bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
position bottom
status_command i3status -c ~/.config/i3status/config
tray_output primary
}
#bar {
# position bottom
# status_command i3status -c ~/.config/i3status/config
# tray_output primary
#}
exec --no-startup-id feh --bg-scale /home/tyrel/Pictures/wallpapers/uw_vibes.png
exec --no-startup-id ~/bin/startup_i3.sh
bindsym $mod+Shift+l exec dm-tool switch-to-greeter

View File

@ -7,6 +7,7 @@
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
"earthly.vim": { "branch": "main", "commit": "66bf86d8292d71e6f2f5e8ea371471c9809efde6" },
"fzf": { "branch": "master", "commit": "7320b7df62039c879c4f609bca946ea09b438a98" },
"fzf.vim": { "branch": "master", "commit": "1e054c1d075d87903647db9320116d360eb8b024" },
"indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" },

View File

@ -217,4 +217,5 @@ return {
require('bamboo').load()
end,
},
{ 'earthly/earthly.vim'},
}

View File

@ -19,7 +19,7 @@ vim.opt.cursorline = true
vim.opt.cursorcolumn = true
-- Global settings
vim.opt.autochdir = true -- Keep vim's directory context same as the current buffer
vim.opt.autochdir = false -- Keep vim's directory context same as the current buffer
vim.opt.listchars = "tab:> ,trail:.,extends:$,nbsp:_"
vim.opt.fillchars = "fold:-"
@ -44,7 +44,7 @@ vim.cmd 'colorscheme bamboo'
vim.g.floaterm_keymap_toggle = '<F9>'
vim.g.floaterm_width = 0.9
vim.g.floaterm_height = 0.9
vim.g.floaterm_shell = "/bin/bash"
vim.g.floaterm_shell = "/bin/zsh"
vim.g.rustfmt_autosave = 1
vim.g.rust_use_custom_ctags_defs = 1
@ -123,7 +123,7 @@ vim.api.nvim_set_keymap("n", "<C-J>", ":bprev<CR>", {silent = true})
vim.api.nvim_set_keymap("n", "<C-K>", ":bnext<CR>", {silent = true})
vim.api.nvim_set_keymap("n", "<C-o>", ":NERDTreeToggle<CR>", {silent = true})
vim.api.nvim_set_keymap("n", "<F1>", ":set invnumber invrelativenumber<CR>", {silent = true })
vim.api.nvim_set_keymap("n", "<F1>", ":set invrnu<CR>", {silent = true })
vim.api.nvim_set_keymap("i", "<F1>", "<Esc>", {silent = true })
vim.api.nvim_set_keymap("n", "<F8>", ":Tagbar<CR>", {silent = true })
vim.api.nvim_set_keymap("n", "<F9>", ":FloatermToggle<CR>", {silent = true })
@ -196,3 +196,15 @@ let g:vimspector_bottombar_height = 15
let g:vimspector_terminal_maxwidth = 70
]])
local cwd = vim.fn.getcwd()
-- Generate a server address based on the current directory
local server_address = "/tmp/nvim_" .. cwd:gsub("/", "_"):gsub("\\", "_")
local success = pcall(vim.fn.serverstart, server_address)
if not success then
-- print("Error: Unable to start Neovim server. The address '" .. server_address .. "' is already in use.")
else
print("Neovim is listening on: " .. server_address)
end

View File

@ -0,0 +1,123 @@
local wezterm = require 'wezterm'
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
end
wezterm.on('update-status', function(window)
-- Grab the utf8 character for the "powerline" left facing
-- solid arrow.
local SOLID_LEFT_ARROW = utf8.char(0xe0b2)
-- Grab the current window's configuration, and from it the
-- palette (this is the combination of your chosen colour scheme
-- including any overrides).
local color_scheme = window:effective_config().resolved_palette
local bg = color_scheme.background
local fg = color_scheme.foreground
window:set_right_status(wezterm.format({
-- First, we draw the arrow...
{ Background = { Color = 'none' } },
{ Foreground = { Color = bg } },
{ Text = SOLID_LEFT_ARROW },
-- Then we draw our text
{ Background = { Color = bg } },
{ Foreground = { Color = fg } },
{ Text = ' ' .. wezterm.hostname() .. ' ' },
}))
end)
-- This is where you actually apply your config choices
config.set_environment_variables = {
PATH = '/opt/homebrew/bin:' .. os.getenv('PATH')
}
-- FUCK LIGATURES
config.harfbuzz_features = { 'calt=0', 'clig=0', 'liga=0' }
config.color_scheme = 'Jellybeans (Gogh)'
config.font = wezterm.font_with_fallback { 'IosevkaTerm Nerd Font' }
config.font_size = 15
config.hide_tab_bar_if_only_one_tab = true
config.window_decorations = 'RESIZE'
config.window_background_opacity = 0.8
config.macos_window_background_blur = 80
config.window_frame = {
font = wezterm.font({ family = 'IosevkaTerm Nerd Fonk', weight = 'Bold' }),
font_size = 11,
}
config.keys = {
-- Sends ESC + b and ESC + f sequence, which is used
-- for telling your shell to jump back/forward.
{
-- When the left arrow is pressed
key = 'LeftArrow',
-- With the "Option" key modifier held down
mods = 'OPT',
-- Perform this action, in this case - sending ESC + B
-- to the terminal
action = wezterm.action.SendString '\x1bb',
},
{
key = 'RightArrow',
mods = 'OPT',
action = wezterm.action.SendString '\x1bf',
},
-- Command+, for opening "settings" in nvim
{
key = ',',
mods = 'SUPER',
action = wezterm.action.SpawnCommandInNewTab {
cwd = wezterm.home_dir,
args = { 'nvim', wezterm.home_dir .. '/.config/wezterm/wezterm.lua' },
},
},
{
key = '|',
mods = 'CTRL|SHIFT|ALT',
action = wezterm.action.SplitHorizontal { },
},
{
key = '_',
mods = 'CTRL|SHIFT|ALT',
action = wezterm.action.SplitVertical { },
},
}
function tab_title(tab_info)
local title = tab_info.tab_title
-- if the tab title is explicitly set, take that
if title and #title > 0 then
return title
end
-- Otherwise, use the title from the active pane
-- in that tab
return tab_info.active_pane.title
end
wezterm.on(
'format-tab-title',
function(tab, tabs, panes, config, hover, max_width)
local title = tab_title(tab)
if tab.is_active then
return {
{ Background = { Color = 'purple' } },
{ Text = ' ' .. title .. ' ' },
}
end
return title
end
)
-- and finally, return the configuration to wezterm
return config

View File

@ -39,7 +39,8 @@
logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging
noop="!git commit --allow-empty -m 'no op'"
ob = "!$EDITOR $(git diff --name-only origin/main)" # Open all files in editor that differ between origin/main and staged/unstaged
od = "!$EDITOR $(git diff --name-only HEAD)" # Open all changed files differ from current HEAD
od = "!$EDITOR $(git diff --name-only origin/devel)" # Open all files in editor that differ between origin/main and staged/unstaged
oh = "!$EDITOR $(git diff --name-only HEAD)" # Open all changed files differ from current HEAD
p = push
recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/main/d' | head -n 15" # get the most 10 recent branches worked on
scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline

View File

@ -1,8 +1,11 @@
#!/bin/bash
function portaldsave() {
docker save portald:devel | gzip > portal.tar.gz
}
function rl() {
for var in "$@"
do
for var in "$@"; do
open -a iTerm ~/rl/$var
settitle $var
done
@ -16,6 +19,9 @@ function rl-gsub() {
function rl-portalshell() {
docker compose -f /home/tsouza/rl/vail-dev/docker-compose.yml exec portald bash
}
function rl-portalrunshell() {
docker compose -f /home/tsouza/rl/vail-dev/docker-compose.yml run --rm -it portald bash
}
function rl-dbshell() {
docker compose -f /home/tsouza/rl/vail-dev/docker-compose.yml exec portal-db bash
}
@ -25,3 +31,10 @@ function rl-syncnode() {
function rl-redisshell() {
docker compose -f /home/tsouza/rl/vail-dev/docker-compose.yml exec portal-redis bash
}
function rl-bash() {
docker compose -f /home/tsouza/rl/vail-dev/docker-compose.yml exec $1 bash
}
function rl-runbash() {
docker compose -f /home/tsouza/rl/vail-dev/docker-compose.yml run --rm -it $1 bash
}

View File

@ -7,8 +7,7 @@ function pulldep() {
}
function tide() {
for var in "$@"
do
for var in "$@"; do
open -a iTerm ~/code/tidelift/$var
settitle $var
done

1690
home/p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,16 @@
alias cat='batcat'
alias dots='cd ~/code/dotfiles/'
alias cat='bat'
alias cprm='git remote get-url origin | tr -d "\n" | pbcopy'
alias dcomp="docker compose"
alias docker-compose="docker compose"
alias dots='cd ~/code/tyrel.dev/dotfiles/'
alias fuckingip="curl https://wtfismyip.com/json"
alias g='git'
alias gcd='cd $(git rev-parse --show-toplevel)'
alias gp='git push -u'
alias ls="exa -lhFgxUm --git --time-style long-iso --group-directories-first"
alias vimini="vim ~/.config/nvim/init.vim"
alias ls="eza -lhgxUm --git --time-style long-iso --group-directories-first"
alias lzd='lazydocker'
alias tree=tree -I 'node_modules|venv'
alias vim=nvim
alias vimini="vim ~/.config/nvim/init.vim"
alias wx="curl https://wttr.in/Raleigh"
alias tf0="tail -n0 -f"

8
home/shell_base Normal file
View File

@ -0,0 +1,8 @@
source ~/.shell_funcs
source ~/.shell_aliases
source ~/.shell_exports
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(direnv hook zsh)"

13
home/shell_exports Normal file
View File

@ -0,0 +1,13 @@
export ANDROID_NDK_HOME="$HOMEBREW_PREFIX/share/android-ndk"
export BAT_THEME="Dracula"
export EDITOR=nvim
export GPG_TTY=$(tty)
export PYENV_ROOT="$HOME/.pyenv"
export VISUAL=nvim
export WORKON_HOME=~/rl/_envs/
# KEEP LAST
export PATH=/Users/tyrel/bin/:$PATH

View File

@ -1,6 +1,4 @@
#!/bin/bash
export EDITOR=nvim
export VISUAL=nvim
# Functions
function httpdiff () {
@ -37,3 +35,6 @@ function new_dock_space (){
}
function agr (){
ag -0 -l "$1" | xargs -0 perl -pi.bak -e "s/$1/$2/g";
}

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiEgzOxE5fmvUIxmigwsvmm5kcDKrHRzbFH31UEU7bm tyrel@tyrel-nixos

View File

@ -1,25 +0,0 @@
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
end
-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.color_scheme = 'Jellybeans (Gogh)'
config.font = wezterm.font_with_fallback {
'IosevkaTerm Nerd Font',
}
config.font_size = 13
config.hide_tab_bar_if_only_one_tab = true
-- and finally, return the configuration to wezterm
return config

View File

@ -1,4 +1,7 @@
nitch
autoload -Uz promptinit
promptinit
prompt steeef
prompt adam2
source ~/.shell_aliases
source ~/.shell_funcs
source ~/.shell_base

View File

@ -1,10 +0,0 @@
{ pkgs, config, lib, ... }:
{
fonts.fonts = with pkgs; [
noto-fonts
dejavu_fonts
nerdfonts # Includes font-awesome, material-icons, powerline-fonts
iosevka
];
}

View File

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.stateVersion = "22.05";
}

View File

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
programs.home-manager.enable = true;
}

View File

@ -1,6 +0,0 @@
{ pkgs, config, ... }:
{
xdg.configFile = {
};
}

View File

@ -1,4 +0,0 @@
{ pkgs, config, lib, ... }:
{
#programs.zsh.enable = true;
}

View File

@ -1,64 +0,0 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1672688183,
"narHash": "sha256-3sNEWKTg3XXVDnvzVatdyetiUQWL+ibJ1YkvxSk3PuM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c1a830c8fabb13f95f51ecf48552f0a794d8718a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1672525397,
"narHash": "sha256-WASDnyxHKWVrEe0dIzkpH+jzKlCKAk0husv0f/9pyxg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8ba56d7c0d7490680f2d51ba46a141eca7c46afa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,36 +0,0 @@
{
description = "Tyrel Nix";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager } :
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
homeConfigurations = {
"tyrel" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./default.nix
./home-manager.nix
{
home = {
homeDirectory = "/home/tyrel";
username = "tyrel";
stateVersion = "22.05";
};
}
];
};
};
};
}

View File

@ -1,15 +0,0 @@
{ pkgs, ... }:
{
# Common Imports
imports = [
./home.nix
../_common/home.nix
../_common/programs.nix
../_common/xdg.nix
];
home.sessionVariables = {
XDG_CONFIG_HOME = "/home/tyrel/.config";
};
}

View File

@ -1,14 +0,0 @@
{ pkgs, ... }:
{
home.stateVersion = "22.05";
home.sessionVariables = {
};
home.packages = with pkgs; [
maestral
maestral-gui
];
home.file = {
};
}

View File

@ -1,29 +0,0 @@
{ pkgs, config, lib, ... }:
{
homebrew = {
enable = true;
casks = [
"alfred"
"affinity-photo"
"affinity-designer"
"affinity-publisher"
"commander-one"
"discord"
"divvy"
"firefox"
"gpg-suite"
"jetbrains-toolbox"
"karabiner-elements"
"meetingbar"
"qsyncthingtray"
"scrivener"
"slack"
"spotify"
"steam"
"syncthing"
"tailscale"
"telegram-desktop"
"thunderbird"
];
};
}

View File

@ -1,6 +0,0 @@
{ pkgs, config, lib, ... }:
{
services.nix-daemon.enable = true;
programs.zsh.enable = true;
system.defaults.dock.autohide = true;
}

View File

@ -1,85 +0,0 @@
{
"nodes": {
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1671891118,
"narHash": "sha256-+GJYiT7QbfA306ex4sGMlFB8Ts297pn3OdQ9kTd4aDw=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "267040e7a2b8644f1fdfcf57b7e808c286dbdc7b",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1672688183,
"narHash": "sha256-3sNEWKTg3XXVDnvzVatdyetiUQWL+ibJ1YkvxSk3PuM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c1a830c8fabb13f95f51ecf48552f0a794d8718a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1672600835,
"narHash": "sha256-PCrIP7joW/SaDYbKlZGV44bBcLOXI/woLVnVHwcJlWc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fe1c6a5547c10a5f6b6debb22d548017f7e14263",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-22.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,29 +0,0 @@
{
description = "Tyrel Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-22.11-darwin";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, darwin }: {
defaultPackage.x86_64-darwin = home-manager.defaultPackage.x86_64-darwin;
darwinConfigurations."ts-tl-mbp" = darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [
home-manager.darwinModules.home-manager
./default.nix
./home-manager.nix
./brew.nix
../_common/fonts.nix
];
};
nixpkgs.config = {
allowUnfree = true;
};
};
}

View File

@ -1,24 +0,0 @@
{ pkgs, ... }:
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.tyrel = { pkgs, ... }: {
# Common Imports
imports = [
./home.nix
../_common/home.nix
../_common/programs.nix
../_common/xdg.nix
];
home.sessionVariables = {
XDG_CONFIG_HOME = "/Users/tyrel/.config";
};
# XDG CONFIGS
xdg.configFile."karabiner" = {
source = ../../home/config/karabiner;
recursive = true;
};
}; # -- HomeManager
}

View File

@ -1,12 +0,0 @@
{ pkgs, ... }:
{
home.stateVersion = "22.05";
home.sessionVariables = {
};
home.packages = with pkgs; [
];
home.file = {
};
}

View File

@ -1,4 +0,0 @@
{ pkgs, config, lib, ... }:
{
programs.zsh.enable = true;
}

View File

@ -1,64 +0,0 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1672688183,
"narHash": "sha256-3sNEWKTg3XXVDnvzVatdyetiUQWL+ibJ1YkvxSk3PuM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c1a830c8fabb13f95f51ecf48552f0a794d8718a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1672525397,
"narHash": "sha256-WASDnyxHKWVrEe0dIzkpH+jzKlCKAk0husv0f/9pyxg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8ba56d7c0d7490680f2d51ba46a141eca7c46afa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,36 +0,0 @@
{
description = "Tyrel Nix";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager } :
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
homeConfigurations = {
"tyrel" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./default.nix
./home-manager.nix
{
home = {
homeDirectory = "/home/tyrel";
username = "tyrel";
stateVersion = "22.05";
};
}
];
};
};
};
}

View File

@ -1,15 +0,0 @@
{ pkgs, ... }:
{
# Common Imports
imports = [
./home.nix
../_common/home.nix
../_common/programs.nix
../_common/xdg.nix
];
home.sessionVariables = {
XDG_CONFIG_HOME = "/home/tyrel/.config";
};
}

View File

@ -1,12 +0,0 @@
{ pkgs, ... }:
{
home.stateVersion = "22.05";
home.sessionVariables = {
};
home.packages = with pkgs; [
];
home.file = {
};
}

View File

@ -1,4 +0,0 @@
{ pkgs, config, lib, ... }:
{
#programs.zsh.enable = true;
}

View File

@ -1,64 +0,0 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1672688183,
"narHash": "sha256-3sNEWKTg3XXVDnvzVatdyetiUQWL+ibJ1YkvxSk3PuM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c1a830c8fabb13f95f51ecf48552f0a794d8718a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1672525397,
"narHash": "sha256-WASDnyxHKWVrEe0dIzkpH+jzKlCKAk0husv0f/9pyxg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8ba56d7c0d7490680f2d51ba46a141eca7c46afa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,36 +0,0 @@
{
description = "Tyrel Nix";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager } :
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
homeConfigurations = {
"tyrel" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./default.nix
./home-manager.nix
{
home = {
homeDirectory = "/home/tyrel";
username = "tyrel";
stateVersion = "22.05";
};
}
];
};
};
};
}

View File

@ -1,15 +0,0 @@
{ pkgs, ... }:
{
# Common Imports
imports = [
./home.nix
../_common/home.nix
../_common/programs.nix
../_common/xdg.nix
];
home.sessionVariables = {
XDG_CONFIG_HOME = "/home/tyrel/.config";
};
}

View File

@ -1,12 +0,0 @@
{ pkgs, ... }:
{
home.stateVersion = "22.05";
home.sessionVariables = {
};
home.packages = with pkgs; [
];
home.file = {
};
}

101
justfile
View File

@ -6,70 +6,59 @@ OS := if "${HOME}" =~ '/U.*' {
} else {
if `cat /etc/issue 2>/dev/null || true` =~ "Deb.*" { "debian" } else { "ubuntu" }
}
HOSTNAME := `hostname| sed 's/.local//'`
NIXPATH := "nixpkgs=/nix/var/nix/profiles/per-user/tyrel/channels/nixpkgs:/nix/var/nix/profiles/per-user/tyrel/channels"
PWD := `pwd`
USER := "tyrel"
HOME := "/home/tyrel"
setup:
just setup-{{OS}}
setup-ubuntu:
NIX_PATH={{NIXPATH}} nix-channel --add https://nixos.org/channels/nixos-22.11 nixos
NIX_PATH={{NIXPATH}} nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
NIX_PATH={{NIXPATH}} nix-channel --add https://channels.nixos.org/nixos-22.11 nixpkgs
NIX_PATH={{NIXPATH}} nix-channel --update
NIX_PATH={{NIXPATH}} nix-shell '<home-manager>' -A install
update-hm:
NIX_PATH={{NIXPATH}} nix-shell '<home-manager>' -A update
setup-debian:
NIX_PATH={{NIXPATH}} nix-channel --add https://nixos.org/channels/nixos-22.11 nixos
NIX_PATH={{NIXPATH}} nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
NIX_PATH={{NIXPATH}} nix-channel --add https://channels.nixos.org/nixos-22.11 nixpkgs
NIX_PATH={{NIXPATH}} nix-channel --update
NIX_PATH={{NIXPATH}} nix-shell '<home-manager>' -A install
experimental:
mkdir -p ~/.config/nix
echo "extra-experimental-features = flakes nix-command" ~/.config/nix/nix.conf
pwd:
echo "{{PWD}}"
git-add:
git add .
update: update-neovim
rust:
curl https://sh.rustup.rs -sSf | sh
update-os:
sudo nixos-rebuild switch
pyenv:
sudo curl https://pyenv.run | bash
echo 'export PYENV_ROOT="/home/$USER/.pyenv"' >> /home/$USER/.bashrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> /home/$USER/.bashrc
echo 'eval "$(pyenv init -)"' >> /home/$USER/.bashrc
pyenv install 3.12.3
pyenv global 3.12.3
update-neovim:
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
reset-symlinks:
rm /home/{{USER}}/.config/nvim
rm /home/{{USER}}/bin
rm /home/{{USER}}/.gitconfig
rm /home/{{USER}}/.shell_base
rm /home/{{USER}}/.p10k.zsh
rm /home/{{USER}}/.shell_aliases
rm /home/{{USER}}/.shell_funcs
rm /home/{{USER}}/.shell_exports
pi:
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerInstall'
symlinks:
ln -s {{PWD}}/home/gitconfig /home/{{USER}}/.gitconfig
ln -s {{PWD}}/home/shell_base /home/{{USER}}/.shell_base
ln -s {{PWD}}/home/p10k.zsh /home/{{USER}}/.p10k.zsh
ln -s {{PWD}}/home/shell_aliases /home/{{USER}}/.shell_aliases
ln -s {{PWD}}/home/shell_funcs /home/{{USER}}/.shell_funcs
ln -s {{PWD}}/home/shell_exports /home/{{USER}}/.shell_exports
ln -s {{PWD}}/home/bin /home/{{USER}}
ln -s {{PWD}}/home/config/nvim /home/{{USER}}/.config/
echo "source ~/.shell_base" >> ~/.bashrc
echo "source ~/.shell_base" >> ~/.zshrc
sync:
sudo nix-channel --update
nix-channel --update
debian: rust pyenv symlinks
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:neovim-ppa/unstable
sudo apt update
sudo apt-get install -y libncurses5-dev neovim
sudo apt-get install -y build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev
sudo apt-get install -y git-lfs
clean:
nix-collect-garbage --delete-older-than 7d
home-manager expire-generations "-7 days"
arch: rust pyenv symlinks
sudo pacman -S git git-lfs ctags rofi terminator tint2 tree-sitter unzip cpan base-devel bat exa nitch
vimpacker:
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
rebuild: git-add
just rebuild-{{OS}}
rebuild-macos:
./result/sw/bin/darwin-rebuild switch --flake ./hosts/{{HOSTNAME}}
rebuild-ubuntu:
NIX_PATH={{NIXPATH}} nix run ./hosts/{{HOSTNAME}} switch -vv
NIX_PATH={{NIXPATH}} home-manager switch --flake ./hosts/{{HOSTNAME}}
just clean
rebuild-debian:
NIX_PATH={{NIXPATH}} nix run ./hosts/{{HOSTNAME}} switch -vv
NIX_PATH={{NIXPATH}} home-manager switch --flake ./hosts/{{HOSTNAME}}
just clean
ssh-keys:
cat home/ssh/*.pub > ~/.ssh/authorized_keys