mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
Setup nixnuc, rework home manager files
This commit is contained in:
parent
ce3edc74b5
commit
493ac02c33
18 changed files with 273 additions and 100 deletions
214
modules/home-manager/common/all-cli.nix
Normal file
214
modules/home-manager/common/all-cli.nix
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
{ pkgs, genebean-omp-themes, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
colordiff
|
||||
dogdns
|
||||
dos2unix
|
||||
du-dust
|
||||
git-filter-repo
|
||||
gotop
|
||||
htop
|
||||
hub
|
||||
jq
|
||||
minicom
|
||||
mtr
|
||||
nix-zsh-completions
|
||||
nurl
|
||||
powershell
|
||||
rename
|
||||
subversion
|
||||
tree
|
||||
watch
|
||||
wget
|
||||
yq
|
||||
];
|
||||
home.sessionVariables = {
|
||||
CLICLOLOR = 1;
|
||||
PAGER = "less";
|
||||
};
|
||||
programs = {
|
||||
atuin = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ctrl_n_shortcuts = true; # Use Ctrl-0 .. Ctrl-9 instead of Alt-0 .. Alt-9 UI shortcuts
|
||||
enter_accept = true; # press tab to edit command before running
|
||||
filter_mode_shell_up_key_binding = "host"; # or global, host, directory, etc
|
||||
sync_address = "https://atuin.home.technicalissues.us";
|
||||
sync_frequency = "15m";
|
||||
|
||||
};
|
||||
};
|
||||
bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "Catppuccin-frappe";
|
||||
};
|
||||
themes = {
|
||||
Catppuccin-frappe = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "bat";
|
||||
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||
hash = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||
};
|
||||
file = "Catppuccin-frappe.tmTheme";
|
||||
};
|
||||
};
|
||||
};
|
||||
eza.enable = true;
|
||||
gh.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
diff-so-fancy.enable = true;
|
||||
includes = [ { path = "~/.gitconfig-local"; }];
|
||||
lfs.enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Gene Liverman";
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
merge = {
|
||||
conflictStyle = "diff3";
|
||||
tool = "meld";
|
||||
};
|
||||
pull = {
|
||||
rebase = false;
|
||||
};
|
||||
};
|
||||
}; # end git
|
||||
jq.enable = true;
|
||||
neovim.enable = true;
|
||||
oh-my-posh = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile (genebean-omp-themes + "/beanbag.omp.json")));
|
||||
};
|
||||
vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
syntastic
|
||||
tabular
|
||||
tlib_vim
|
||||
vim-addon-mw-utils
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
vim-flog
|
||||
vim-fugitive
|
||||
vim-json
|
||||
vim-markdown
|
||||
vim-nix
|
||||
vim-puppet
|
||||
vim-ruby
|
||||
vim-snipmate
|
||||
vim-snippets
|
||||
vim-yaml
|
||||
];
|
||||
settings = {
|
||||
background = "dark";
|
||||
expandtab = true;
|
||||
};
|
||||
extraConfig = ''
|
||||
set nocompatible " be iMproved, required
|
||||
filetype plugin indent on " required for plugins to be able to adjust indent
|
||||
syntax on " enable syntax highlighting
|
||||
set encoding=utf-8
|
||||
set termencoding=utf-8
|
||||
set t_Co=256 " tell vim we have 256 colors to work with
|
||||
|
||||
set autoindent " automatically indent new lines
|
||||
set backspace=2 " make backspace work like most other programs
|
||||
set fillchars+=stl:\ ,stlnc:\ " fix added per powerline troubleshooting docs
|
||||
set laststatus=2 " Always display the status line in all windows
|
||||
set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the status line)
|
||||
set smarttab " helps with expanding tabs to spaces (I think)
|
||||
set statusline+=%{FugitiveStatusline()} " get git info via fugitive plugin
|
||||
set statusline+=%#warningmsg# " recommended setting from syntastic plugin
|
||||
set statusline+=%{SyntasticStatuslineFlag()} " recommended setting from syntastic plugin
|
||||
set statusline+=%* " recommended setting from syntastic plugin
|
||||
|
||||
" This has to come after colorscheme, if defined, to not be masked
|
||||
highlight ColorColumn ctermbg=232 " set the color to be used for guidelines
|
||||
let &colorcolumn=join(range(81,999),",") " change the background color of everything beyond 80 characters
|
||||
|
||||
let g:snipMate = { 'snippet_version' : 1 }
|
||||
|
||||
" settings for the syntastic plugin
|
||||
let g:syntastic_always_populate_loc_list = 1
|
||||
let g:syntastic_auto_loc_list = 1
|
||||
let g:syntastic_check_on_open = 1
|
||||
let g:syntastic_check_on_wq = 0
|
||||
let g:syntastic_enable_signs = 1
|
||||
let g:syntastic_ruby_checkers = ['rubocop']
|
||||
let g:syntastic_quiet_messages = {'level': 'warnings'}
|
||||
|
||||
" don't wrap text in markdown files
|
||||
let g:vim_markdown_folding_disabled = 1
|
||||
|
||||
" settings for vim-airline
|
||||
let g:airline_theme='badwolf'
|
||||
let g:airline_powerline_fonts = 1
|
||||
'';
|
||||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
enableAutosuggestions = true;
|
||||
history.save = 1000000;
|
||||
history.size = 1000000;
|
||||
initExtra = ''
|
||||
[ -f ~/.private-env ] && source ~/.private-env || echo '~/.private-env is missing'
|
||||
[ -f ~/.gitconfig-local ] || echo '~/.gitconfig-local is missing. Create it and set user.email'
|
||||
|
||||
# Start GPG agent
|
||||
# Some tips from https://hedberg.io/yubikey-for-ssh/ helped simplify this:
|
||||
if [[ $(uname) == 'Darwin' ]]; then
|
||||
# Add GPG Suite binaries to the path:
|
||||
export PATH=/usr/local/MacGPG2/bin:$PATH
|
||||
fi
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
'';
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"bundler"
|
||||
"gem"
|
||||
"git"
|
||||
"github"
|
||||
"history"
|
||||
"kubectl"
|
||||
"pip"
|
||||
"terraform"
|
||||
"vagrant"
|
||||
"vscode"
|
||||
];
|
||||
};
|
||||
shellAliases = {
|
||||
bcrr = "bolt command run --run-as root --sudo-password-prompt";
|
||||
bcrrs = "bcrr --stream --no-verbose";
|
||||
beo = "bundle exec onceover run spec --trace --force";
|
||||
biv = "bundle install --path=vendor/bundle";
|
||||
ce = "code-exploration";
|
||||
dots = "cd ~/repos/dots";
|
||||
gbc = ''
|
||||
git branch --merged | command grep -vE "^(\*|\s*(main|master|develop|production)\s*$)" | command xargs -n 1 git branch -d
|
||||
'';
|
||||
gitextract = "git log --pretty=email --patch-with-stat --reverse --full-index --binary --";
|
||||
gpge = "gpg2 --encrypt --sign --armor -r ";
|
||||
hubpr = "hub pull-request --push --browse";
|
||||
pssh = "ssh -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no' -o PubkeyAcceptedKeyTypes=+ssh-rsa -o HostKeyAlgorithms=+ssh-rsa -o KexAlgorithms=+diffie-hellman-group1-sha1 -i ~/.ssh/id_rsa-acceptance";
|
||||
sal = "ssh-add -L";
|
||||
st = "open -a SourceTree";
|
||||
sz = "source ~/.zshrc";
|
||||
usegpg = "killall ssh-agent; export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) && gpgconf --launch gpg-agent";
|
||||
usessh = "gpgconf --kill gpg-agent";
|
||||
};
|
||||
}; # end zsh
|
||||
}; # end programs
|
||||
|
||||
home.file = {
|
||||
".config/powershell/Microsoft.PowerShell_profile.ps1".source = ../files/Microsoft.PowerShell_profile.ps1;
|
||||
".config/powershell/Microsoft.VSCode_profile.ps1".source = ../files/Microsoft.PowerShell_profile.ps1;
|
||||
};
|
||||
}
|
||||
26
modules/home-manager/common/all-darwin.nix
Normal file
26
modules/home-manager/common/all-darwin.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, genebean-omp-themes, ... }: {
|
||||
# dawrwin-specific shell config
|
||||
programs.zsh = {
|
||||
initExtra = ''
|
||||
function otpon() {
|
||||
osascript -e 'tell application "yubiswitch" to KeyOn'
|
||||
}
|
||||
function otpoff() {
|
||||
osascript -e 'tell application "yubiswitch" to KeyOff'
|
||||
}
|
||||
|
||||
# Include Puppet's normal bin folder since it is installed via Homebrew
|
||||
export PATH=$PATH:/opt/puppetlabs/bin
|
||||
export PATH=$PATH:/opt/puppetlabs/pdk/bin
|
||||
export PATH=$PATH:/opt/puppetlabs/puppet/bin
|
||||
'';
|
||||
oh-my-zsh.plugins = [ "macos" ];
|
||||
shellAliases = {
|
||||
currentwifi = "networksetup -getairportnetwork en0 |cut -d ':' -f2- | cut -d ' ' -f2-";
|
||||
nixup = "darwin-rebuild switch --flake ~/repos/dots";
|
||||
uwgconnect = "networksetup -setairportnetwork en0 SecureWest";
|
||||
uwgforget = "networksetup -removepreferredwirelessnetwork en0 SecureWest";
|
||||
ykey = "pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L";
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/home-manager/common/all-gui.nix
Normal file
10
modules/home-manager/common/all-gui.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, genebean-omp-themes, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
element-desktop
|
||||
];
|
||||
programs = {
|
||||
vscode = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
12
modules/home-manager/common/all-linux.nix
Normal file
12
modules/home-manager/common/all-linux.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
programs = {
|
||||
# Linux-specific aliases
|
||||
zsh.shellAliases = {
|
||||
nixup = "sudo nixos-rebuild switch --flake ~/repos/dots";
|
||||
uwgconnect = "nmcli dev wifi connect SecureWest password";
|
||||
uwgforget = "nmcli connection delete SecureWest";
|
||||
ykey = "sudo systemctl restart pcscd && sudo pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L";
|
||||
};
|
||||
};
|
||||
}
|
||||
30
modules/home-manager/common/linux-apps/tilix.nix
Normal file
30
modules/home-manager/common/linux-apps/tilix.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, pkgs, ... }: with lib.hm.gvariant; {
|
||||
|
||||
dconf.settings = {
|
||||
"com/gexperts/Tilix/profiles/2b7c4080-0ddd-46c5-8f23-563fd3ba789d" = {
|
||||
background-color = "#272822";
|
||||
background-transparency-percent = 10;
|
||||
badge-color-set = false;
|
||||
bold-color-set = false;
|
||||
cursor-colors-set = false;
|
||||
font = "Hack Nerd Font Mono 12";
|
||||
foreground-color = "#F8F8F2";
|
||||
highlight-colors-set = false;
|
||||
palette = [ "#272822" "#F92672" "#A6E22E" "#F4BF75" "#66D9EF" "#AE81FF" "#A1EFE4" "#F8F8F2" "#75715E" "#F92672" "#A6E22E" "#F4BF75" "#66D9EF" "#AE81FF" "#A1EFE4" "#F9F8F5" ];
|
||||
use-system-font = false;
|
||||
use-theme-colors = false;
|
||||
visible-name = "Default";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".config/tilix/schemes/Beanbag-Mathias.json".source = ../../files/tilix/Beanbag-Mathias.json;
|
||||
".config/tilix/schemes/Catppuccin-Frappe.json".source = (pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "tilix";
|
||||
rev = "3fd05e03419321f2f2a6aad6da733b28be1765ef";
|
||||
hash = "sha256-SI7QxQ+WBHzeuXbTye+s8pi4tDVZOV4Aa33mRYO276k=";
|
||||
} + "/src/Catppuccin-Frappe.json");
|
||||
};
|
||||
}
|
||||
17
modules/home-manager/common/linux-apps/waybar.nix
Normal file
17
modules/home-manager/common/linux-apps/waybar.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }: {
|
||||
home.file = {
|
||||
".config/waybar/config".source = ../../files/waybar/config;
|
||||
".config/waybar/frappe.css".source = (pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "waybar";
|
||||
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
|
||||
hash = "sha256-WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
|
||||
} + "/themes/frappe.css");
|
||||
".config/waybar/style.css".source = ../../files/waybar/style.css;
|
||||
};
|
||||
|
||||
programs = {
|
||||
# Using file in ../../files/waybar/ to configure waybar
|
||||
waybar.enable = true;
|
||||
};
|
||||
}
|
||||
46
modules/home-manager/common/linux-apps/xfce4-terminal.nix
Normal file
46
modules/home-manager/common/linux-apps/xfce4-terminal.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ pkgs, ... }: {
|
||||
home.file = {
|
||||
".config/xfce4/terminal/accels.scm".source = ../../files/xfce4/terminal/accels.scm;
|
||||
};
|
||||
|
||||
xfconf.settings = {
|
||||
xfce4-terminal = {
|
||||
"background-mode" = "TERMINAL_BACKGROUND_TRANSPARENT";
|
||||
"background-darkness" = "0.90000000000000000";
|
||||
"color-foreground" = "#e3e3ea";
|
||||
"color-background" = "#08052b";
|
||||
"color-cursor" = "#ff7f7f";
|
||||
"color-cursor-use-default" = false;
|
||||
"color-palette" = "#000000;#e52222;#a6e32d;#fc951e;#c48dff;#fa2573;#67d9f0;#f2f2f2;#555555;#ff5555;#55ff55;#ffff55;#5555ff;#ff55ff;#55ffff;#ffffff";
|
||||
"font-name" = "Hack Nerd Font Mono 12";
|
||||
"misc-always-show-tabs" = false;
|
||||
"misc-bell" = false;
|
||||
"misc-bell-urgent" = true;
|
||||
"misc-borders-default" = true;
|
||||
"misc-cursor-blinks" = false;
|
||||
"misc-cursor-shape" = "TERMINAL_CURSOR_SHAPE_BLOCK";
|
||||
"misc-default-geometry" = "120x24";
|
||||
"misc-inherit-geometry" = false;
|
||||
"misc-menubar-default" = true;
|
||||
"misc-mouse-autohide" = false;
|
||||
"misc-mouse-wheel-zoom" = true;
|
||||
"misc-toolbar-default" = false;
|
||||
"misc-confirm-close" = true;
|
||||
"misc-cycle-tabs" = true;
|
||||
"misc-tab-close-buttons" = true;
|
||||
"misc-tab-close-middle-click" = true;
|
||||
"misc-tab-position" = "GTK_POS_TOP";
|
||||
"misc-highlight-urls" = true;
|
||||
"misc-middle-click-opens-uri" = false;
|
||||
"misc-copy-on-select" = false;
|
||||
"misc-show-relaunch-dialog" = true;
|
||||
"misc-rewrap-on-resize" = true;
|
||||
"misc-slim-tabs" = true;
|
||||
"misc-new-tab-adjacent" = false;
|
||||
"misc-search-dialog-opacity" = "100";
|
||||
"misc-show-unsafe-paste-dialog" = true;
|
||||
"scrolling-unlimited" = true;
|
||||
"title-initial" = "xfce4-terminal";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue