diff --git a/ace/configuration.nix b/ace/configuration.nix index b11af9b..00f438a 100644 --- a/ace/configuration.nix +++ b/ace/configuration.nix @@ -3,10 +3,9 @@ { imports = [ - /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation/configuration.nix - /home/don/nixos/workstation/home.nix + /home/don/nixos/workstation/home /home/don/nixos/workstation/sway.nix /home/don/nixos/workstation/detect-reboot-needed.nix ]; diff --git a/dragon/configuration.nix b/dragon/configuration.nix index 08d97c3..a483c73 100644 --- a/dragon/configuration.nix +++ b/dragon/configuration.nix @@ -3,10 +3,9 @@ { imports = [ - /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation/configuration.nix - /home/don/nixos/workstation/home.nix + /home/don/nixos/workstation/home /home/don/nixos/workstation/sway.nix /home/don/nixos/workstation/detect-reboot-needed.nix ]; diff --git a/eve/configuration.nix b/eve/configuration.nix index 5eb45f8..26dd00b 100644 --- a/eve/configuration.nix +++ b/eve/configuration.nix @@ -4,10 +4,9 @@ imports = [ - /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation/configuration.nix - /home/don/nixos/workstation/home.nix + /home/don/nixos/workstation/home /home/don/nixos/workstation/sway.nix /home/don/nixos/workstation/detect-reboot-needed.nix ]; diff --git a/loki/configuration.nix b/loki/configuration.nix index 25c09fa..b542c3c 100644 --- a/loki/configuration.nix +++ b/loki/configuration.nix @@ -4,11 +4,10 @@ imports = [ - /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation/configuration.nix /home/don/nixos/loki/kernel.nix - /home/don/nixos/workstation/home.nix + /home/don/nixos/workstation/home /home/don/nixos/workstation/sway.nix /home/don/nixos/workstation/detect-reboot-needed.nix ]; diff --git a/pocket2/configuration.nix b/pocket2/configuration.nix index 49dd789..642fbdd 100644 --- a/pocket2/configuration.nix +++ b/pocket2/configuration.nix @@ -3,10 +3,9 @@ { imports = [ - /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation/configuration.nix - /home/don/nixos/workstation/home.nix + /home/don/nixos/workstation/home /home/don/nixos/workstation/sway.nix /home/don/nixos/workstation/detect-reboot-needed.nix ]; diff --git a/smaug/configuration.nix b/smaug/configuration.nix index f28e9f2..3167f7a 100644 --- a/smaug/configuration.nix +++ b/smaug/configuration.nix @@ -4,10 +4,9 @@ imports = [ - /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation/configuration.nix - /home/don/nixos/workstation/home.nix + /home/don/nixos/workstation/home /home/don/nixos/workstation/sway.nix /home/don/nixos/workstation/detect-reboot-needed.nix ]; diff --git a/workstation/home.nix b/workstation/home.nix deleted file mode 100644 index 21a6927..0000000 --- a/workstation/home.nix +++ /dev/null @@ -1,206 +0,0 @@ -{ config, pkgs, ... }: -{ - users.users.don.isNormalUser = true; - home-manager.users.don = { - home.username = "don"; - home.homeDirectory = "/home/don"; - home.stateVersion = "22.11"; - home.shellAliases = { - ls = "ls -hCF"; - l = "ls -l"; - df = "df -h -x squashfs"; - du = "du -h" ; - dotdrop = "~/.local/bin/dotdrop -c ~/.dotfiles/config.yaml"; - t = "task"; - ttoday = "task +TODAY or +OVERDUE -BLOCKED"; - ttom = "task +OVERDUE or +TOMORROW -BLOCKED"; - to = "task list +OVERDUE"; - turl = "task nnext | urlview"; - tfollow = "task list +followup"; - tnext = "task list +nextactions"; - open = "xdg-open"; - tt = "timew"; - }; - - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - vimdiffAlias = true; - extraConfig = - '' - colorscheme dracula - set backspace="indent,eol,start" - set autoindent - set expandtab - set tabstop=2 - set shiftwidth=2 - set history=50 - set ruler - set showcmd - set incsearch - set hlsearch - set nospell - set modeline - set wildmode=longest:full - set wildmenu - set scrolloff=2 - set number - set list - "set listchars="eol:⏎,tab:␉·,trail:␠,nbsp:⎵" - set background=dark - set laststatus=2 - set t_Co=256 - let g:ale_linters = { 'nix': ['statix']} - ''; - plugins = with pkgs.vimPlugins; [ - CheckAttach - Recover-vim - Shade-nvim # color - SpaceCamp # color - YouCompleteMe - ale - ansible-vim - aurora # color - dracula-nvim - gitv - tabular - vim-airline - vim-airline-themes - vim-bufferline - vim-fugitive - vim-gitgutter - vim-github-dashboard - vim-markdown - vim-misc - vim-nix - vim-tmux - vim-tmux-navigator - ]; - }; - programs.bash = { - enable = true; - enableCompletion = true; - enableVteIntegration = false; - historyFile = "\$\{HOME\}/.bash_history.\${USER}.\$(hostname -s).\$(tty | cut -c10-)"; - bashrcExtra = - '' - export GOPATH="~/go" - export PROMPT_COMMAND='history -a' - export EDITOR="nvim" - export PATH="$PATH:~/bin:~/.local/bin" - set bell-style visible - set nobeep - set -o noclobber - ulimit -c 0 - umask 0007 - export PAGER=less - export LESS="-s" - if [ -f "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh" ] - then - . "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh" - fi - export HOSTNAME_SHORT=$(hostname -s) - test -f ~/.bash_$(hostname -s) && . ~/.bash_$(hostname -s) - [[ $- == *i* ]] && test -f ~/.liquidprompt/liquidprompt && . ~/.liquidprompt/liquidprompt - test -f ~/.bash_functions && . ~/.bash_functions - export TZ=America/Chicago - export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" - export LESS="-FrSsUWX -z-3" - headset-setup - if [ $( tty | grep -v -q pts ) ]; then setterm --blank 1; fi - export FZF_DEFAULT_OPTS='--color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4' - ''; - profileExtra = - '' - # From me - . ~/.bash_motd && bash_motd --banner --processor --memory --diskspace --podman --docker - ''; - shellOptions = [ - "autocd" - "cdspell" - "checkjobs" - "checkwinsize" - "dotglob" - "extglob" - "histappend" - "histreedit" - "histverify" - ]; - }; - programs.go.enable = true; - programs.keychain = { - enable = true; - enableBashIntegration = true; - agents = [ "ssh" ]; - keys = [ "~/.ssh/id_ed25519" "~/.ssh/git" "~/.ssh/id_dsa.2022" "~/.ssh/id_rsa.2020" "~/.ssh/id_rsa.2022" ]; - inheritType = "any"; - }; - programs.mpv = { - enable = true; - # config = { - # cache-dir = "\${HOME}/.cache"; - # cache-on-disk = "yes"; - # cache = "yes"; - # demuxer-max-back-bytes = "100M"; - # demuxer-max-bytes = "500M"; - # demuxer-readahead-secs = "20"; - # pause = "no"; - # save-position-on-quit = "yes"; - # slang = "en"; - # user-agent = "Mozilla/5.0"; - # ytdl-format = "bestvideo+bestaudio"; - # ytdl-raw-options = "no-playlist="; - # ytdl = "yes"; - # script-opts = "ytdl_hook-ytdl_path=yt-dlp"; - # }; - scripts = [ pkgs.mpvScripts.autoload ]; - #scripts = [ pkgs.mpvScripts.autoload pkgs.mpvScripts.sponsorblock ]; - }; - services = { - gpg-agent = { - enable = true; - defaultCacheTtl = 1800; - enableSshSupport = true; - }; - kanshi = { - enable = true; - profiles = { - undocked = { - outputs = [ - { - criteria = "Sharp Corporation 0x14F9 0x00000000"; - status = "enable"; - scale = 1.2; - } - ]; - }; - docked = { - outputs = [ - { - criteria = "eDP-1"; - status = "disable"; - } - { - criteria = "Samsung Electric Company C24F390 H4ZN519488"; - status = "enable"; - position = "0,0"; - } - { - criteria = "Stargate Technology HDMI Unknown"; - status = "enable"; - position = "0,1080"; - } - ]; - exec = [ - "swaymsg workspace 1, move workspace to output \"Samsung Electric Company C24F390 H4ZN519488\"" - "swaymsg workspace 5, move workspace to output \"Stargate Technology HDMI Unknown\"" - "swaymsg workspace 6, move workspace to output \"Samsung Electric Company C24F390 H4ZN519488\"" - "swaymsg workspace 9, move workspace to output \"Stargate Technology HDMI Unknown\"" - ]; - }; - }; - }; - }; - }; -} diff --git a/workstation/home/default.nix b/workstation/home/default.nix new file mode 100644 index 0000000..c4d3f29 --- /dev/null +++ b/workstation/home/default.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + + ]; + users.users.don.isNormalUser = true; + home-manager.users.don = { + home.username = "don"; + home.homeDirectory = "/home/don"; + home.stateVersion = "22.11"; + programs.go.enable = true; + imports = + [ + ./services.nix + ./mpv.nix + ./neovim.nix + ]; + }; +} diff --git a/workstation/home/home.nix b/workstation/home/home.nix new file mode 100644 index 0000000..266f8a3 --- /dev/null +++ b/workstation/home/home.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: +{ + users.users.don.isNormalUser = true; + home-manager.users.don = { + home.username = "don"; + home.homeDirectory = "/home/don"; + home.stateVersion = "22.11"; + programs.go.enable = true; + }; +} diff --git a/workstation/home/mpv.nix b/workstation/home/mpv.nix new file mode 100644 index 0000000..65d453b --- /dev/null +++ b/workstation/home/mpv.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: +{ + programs.mpv = { + enable = true; + # config = { + # cache-dir = "\${HOME}/.cache"; + # cache-on-disk = "yes"; + # cache = "yes"; + # demuxer-max-back-bytes = "100M"; + # demuxer-max-bytes = "500M"; + # demuxer-readahead-secs = "20"; + # pause = "no"; + # save-position-on-quit = "yes"; + # slang = "en"; + # user-agent = "Mozilla/5.0"; + # ytdl-format = "bestvideo+bestaudio"; + # ytdl-raw-options = "no-playlist="; + # ytdl = "yes"; + # script-opts = "ytdl_hook-ytdl_path=yt-dlp"; + # }; + scripts = [ pkgs.mpvScripts.autoload ]; + #scripts = [ pkgs.mpvScripts.autoload pkgs.mpvScripts.sponsorblock ]; + }; +} diff --git a/workstation/home/neovim.nix b/workstation/home/neovim.nix new file mode 100644 index 0000000..52ac193 --- /dev/null +++ b/workstation/home/neovim.nix @@ -0,0 +1,59 @@ +{ config, pkgs, ... }: +{ + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + extraConfig = + '' + colorscheme dracula + set backspace="indent,eol,start" + set autoindent + set expandtab + set tabstop=2 + set shiftwidth=2 + set history=50 + set ruler + set showcmd + set incsearch + set hlsearch + set nospell + set modeline + set wildmode=longest:full + set wildmenu + set scrolloff=2 + set number + set list + "set listchars="eol:⏎,tab:␉·,trail:␠,nbsp:⎵" + set background=dark + set laststatus=2 + set t_Co=256 + let g:ale_linters = { 'nix': ['statix']} + ''; + plugins = with pkgs.vimPlugins; [ + CheckAttach + Recover-vim + Shade-nvim # color + SpaceCamp # color + YouCompleteMe + ale + ansible-vim + aurora # color + dracula-nvim + gitv + tabular + vim-airline + vim-airline-themes + vim-bufferline + vim-fugitive + vim-gitgutter + vim-github-dashboard + vim-markdown + vim-misc + vim-nix + vim-tmux + vim-tmux-navigator + ]; + }; +} diff --git a/workstation/home/services.nix b/workstation/home/services.nix new file mode 100644 index 0000000..28ff78b --- /dev/null +++ b/workstation/home/services.nix @@ -0,0 +1,43 @@ +{ config, pkgs, ... }: +{ + services = { + kanshi = { + enable = true; + profiles = { + undocked = { + outputs = [ + { + criteria = "Sharp Corporation 0x14F9 0x00000000"; + status = "enable"; + scale = 1.2; + } + ]; + }; + docked = { + outputs = [ + { + criteria = "eDP-1"; + status = "disable"; + } + { + criteria = "Samsung Electric Company C24F390 H4ZN519488"; + status = "enable"; + position = "0,0"; + } + { + criteria = "Stargate Technology HDMI Unknown"; + status = "enable"; + position = "0,1080"; + } + ]; + exec = [ + "swaymsg workspace 1, move workspace to output \"Samsung Electric Company C24F390 H4ZN519488\"" + "swaymsg workspace 5, move workspace to output \"Stargate Technology HDMI Unknown\"" + "swaymsg workspace 6, move workspace to output \"Samsung Electric Company C24F390 H4ZN519488\"" + "swaymsg workspace 9, move workspace to output \"Stargate Technology HDMI Unknown\"" + ]; + }; + }; + }; + }; +}