diff --git a/modules/home-manager/beets.nix b/configs/home-manager/beets.nix similarity index 100% rename from modules/home-manager/beets.nix rename to configs/home-manager/beets.nix diff --git a/configs/home-manager/btop.nix b/configs/home-manager/btop.nix new file mode 100644 index 0000000..164c3ee --- /dev/null +++ b/configs/home-manager/btop.nix @@ -0,0 +1,13 @@ +{ + config, + pkgs, + lib, + ... +}: { + programs.btop = { + enable = true; + settings = { + vim_keys = true; + }; + }; +} diff --git a/modules/home-manager/common.nix b/configs/home-manager/common.nix similarity index 91% rename from modules/home-manager/common.nix rename to configs/home-manager/common.nix index 41d3d37..d0bd7ca 100644 --- a/modules/home-manager/common.nix +++ b/configs/home-manager/common.nix @@ -25,6 +25,7 @@ }; }; imports = [ - ../hostopts.nix + ../../modules/hostopts.nix + ../../modules/home-manager ]; } diff --git a/configs/home-manager/direnv.nix b/configs/home-manager/direnv.nix new file mode 100644 index 0000000..82d080e --- /dev/null +++ b/configs/home-manager/direnv.nix @@ -0,0 +1,11 @@ +{ + config, + pgks, + lib, + ... +}: { + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; +} diff --git a/modules/home-manager/dunst.nix b/configs/home-manager/dunst.nix similarity index 100% rename from modules/home-manager/dunst.nix rename to configs/home-manager/dunst.nix diff --git a/modules/home-manager/email.nix b/configs/home-manager/email.nix similarity index 100% rename from modules/home-manager/email.nix rename to configs/home-manager/email.nix diff --git a/modules/home-manager/feh.nix b/configs/home-manager/feh.nix similarity index 100% rename from modules/home-manager/feh.nix rename to configs/home-manager/feh.nix diff --git a/configs/home-manager/gpg.nix b/configs/home-manager/gpg.nix new file mode 100644 index 0000000..176a404 --- /dev/null +++ b/configs/home-manager/gpg.nix @@ -0,0 +1,14 @@ +{ + config, + pkgs, + lib, + ... +}: { + programs.gpg.enable = true; + + services.gpg-agent = { + enable = true; + enableSshSupport = true; + pinentryPackage = lib.mkDefault pkgs.pinentry-tty; + }; +} diff --git a/modules/home-manager/terminal/irssi.nix b/configs/home-manager/irssi.nix similarity index 100% rename from modules/home-manager/terminal/irssi.nix rename to configs/home-manager/irssi.nix diff --git a/modules/home-manager/kitty.nix b/configs/home-manager/kitty.nix similarity index 100% rename from modules/home-manager/kitty.nix rename to configs/home-manager/kitty.nix diff --git a/modules/home-manager/mpd.nix b/configs/home-manager/mpd.nix similarity index 100% rename from modules/home-manager/mpd.nix rename to configs/home-manager/mpd.nix diff --git a/modules/home-manager/nextcloud.nix b/configs/home-manager/nextcloud.nix similarity index 100% rename from modules/home-manager/nextcloud.nix rename to configs/home-manager/nextcloud.nix diff --git a/modules/home-manager/terminal/nushell/completions/just-completions.nu b/configs/home-manager/nushell/completions/just-completions.nu similarity index 100% rename from modules/home-manager/terminal/nushell/completions/just-completions.nu rename to configs/home-manager/nushell/completions/just-completions.nu diff --git a/modules/home-manager/terminal/nushell/completions/make-completions.nu b/configs/home-manager/nushell/completions/make-completions.nu similarity index 100% rename from modules/home-manager/terminal/nushell/completions/make-completions.nu rename to configs/home-manager/nushell/completions/make-completions.nu diff --git a/modules/home-manager/terminal/nushell/completions/mod.nu b/configs/home-manager/nushell/completions/mod.nu similarity index 100% rename from modules/home-manager/terminal/nushell/completions/mod.nu rename to configs/home-manager/nushell/completions/mod.nu diff --git a/modules/home-manager/terminal/nushell/config.nu b/configs/home-manager/nushell/config.nu similarity index 100% rename from modules/home-manager/terminal/nushell/config.nu rename to configs/home-manager/nushell/config.nu diff --git a/configs/home-manager/nushell/default.nix b/configs/home-manager/nushell/default.nix new file mode 100644 index 0000000..de06dd4 --- /dev/null +++ b/configs/home-manager/nushell/default.nix @@ -0,0 +1,40 @@ +{ + config, + lib, + pkgs, + ... +}: { + home.file = { + ".config/nushell/completions".source = ./completions; + }; + + programs = { + #sessionVariables, sessionPath and shellAliases are not applied to nushell. + nushell = { + enable = true; + configFile.source = ./config.nu; + envFile.source = ./env.nu; + }; + + yazi.enableNushellIntegration = true; + zoxide.enableNushellIntegration = true; + starship.enableNushellIntegration = true; + eza.enableNushellIntegration = true; + carapace = { + enable = true; + enableNushellIntegration = true; + }; + direnv.enableNushellIntegration = true; + }; + services = { + gpg-agent.enableNushellIntegration = true; + pueue = { + enable = true; + settings = { + daemon = { + default_parallel_tasks = 5; + }; + }; + }; + }; +} diff --git a/modules/home-manager/terminal/nushell/env.nu b/configs/home-manager/nushell/env.nu similarity index 100% rename from modules/home-manager/terminal/nushell/env.nu rename to configs/home-manager/nushell/env.nu diff --git a/modules/home-manager/terminal/nushell/scripts/ultimate_extractor.nu b/configs/home-manager/nushell/scripts/ultimate_extractor.nu similarity index 100% rename from modules/home-manager/terminal/nushell/scripts/ultimate_extractor.nu rename to configs/home-manager/nushell/scripts/ultimate_extractor.nu diff --git a/configs/home-manager/pass.nix b/configs/home-manager/pass.nix new file mode 100644 index 0000000..55ad8a7 --- /dev/null +++ b/configs/home-manager/pass.nix @@ -0,0 +1,17 @@ +{ + config, + pkgs, + lib, + ... +}: { + programs.password-store = { + enable = true; + settings = { + PASSWORD_STORE_DIR = "$HOME/keys/password-store"; + }; + }; + + programs.nushell.extraEnv = '' + $env.PASSWORD_STORE_DIR = ($env.HOME | path join "keys" "password-store") + ''; +} diff --git a/modules/home-manager/picom.nix b/configs/home-manager/picom.nix similarity index 100% rename from modules/home-manager/picom.nix rename to configs/home-manager/picom.nix diff --git a/modules/home-manager/rofi.nix b/configs/home-manager/rofi.nix similarity index 100% rename from modules/home-manager/rofi.nix rename to configs/home-manager/rofi.nix diff --git a/configs/home-manager/ssh-agent.nix b/configs/home-manager/ssh-agent.nix new file mode 100644 index 0000000..46dcc7e --- /dev/null +++ b/configs/home-manager/ssh-agent.nix @@ -0,0 +1,11 @@ +{ + config, + pkgs, + lib, + ... +}: { + services.ssh-agent.enable = true; + programs.nushell.extraEnv = '' + $env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent" + ''; +} diff --git a/configs/home-manager/starship.nix b/configs/home-manager/starship.nix new file mode 100644 index 0000000..2ecab45 --- /dev/null +++ b/configs/home-manager/starship.nix @@ -0,0 +1,109 @@ +{ + config, + pkgs, + lib, + ... +}: { + programs.starship = { + enable = true; + settings = { + format = lib.concatStrings [ + "[](color_orange)" + "$shell" + "$username" + "[@](bg:color_orange)" + "$hostname" + "[ ](bg:color_orange)" + "[](bg:color_yellow fg:color_orange)" + "$directory" + "[](fg:color_yellow bg:color_aqua)" + "$git_branch" + "$git_status" + "[](fg:color_aqua bg:color_blue)" + "$git_metrics" + "[](fg:color_blue bg:color_bg3)" + "$git_commit" + "[](fg:color_bg3 bg:color_bg1)" + "$time" + "[ ](fg:color_bg1)" + "$line_break" + "$character" + ]; + add_newline = false; + palette = "gruvbox_dark"; + palettes.gruvbox_dark = { + color_fg0 = "#fbf1c7"; + color_bg1 = "#3c3836"; + color_bg3 = "#665c54"; + color_blue = "#458588"; + color_aqua = "#689d6a"; + color_green = "#98971a"; + color_orange = "#d65d0e"; + color_purple = "#b16286"; + color_red = "#cc241d"; + color_yellow = "#d79921"; + }; + hostname = { + ssh_only = false; + ssh_symbol = "🌐"; + format = "[$hostname $ssh_symbol]($style)"; + style = "bg:color_orange"; + }; + shell = { + disabled = false; + bash_indicator = "$"; + fish_indicator = "<><"; + zsh_indicator = "%"; + nu_indicator = ">"; + format = "[$indicator ]($style)"; + style = "bg:color_orange"; + }; + fill = { + symbol = " "; + style = "bg:color_bg3"; + }; + username = { + show_always = true; + style_user = "bg:color_orange fg:color_fg0"; + style_root = "bg:color_orange fg:color_fg0"; + format = "[$user]($style)"; + }; + directory = { + style = "fg:color_fg0 bg:color_yellow"; + format = "[ $path ]($style)"; + fish_style_pwd_dir_length = 3; + truncation_length = 4; + truncation_symbol = "…/"; + }; + git_branch = { + symbol = ""; + style = "bg:color_aqua"; + format = "[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)"; + }; + git_status = { + style = "bg:color_aqua"; + format = "[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)"; + }; + git_metrics = { + disabled = false; + added_style = "bg:color_blue fg:bold green"; + deleted_style = "bg:color_blue fg:bold red"; + format = "([ +$added ]($added_style))([-$deleted ]($deleted_style))"; + }; + git_commit = { + only_detached = false; + tag_disabled = false; + format = "[($hash$tag)]($style)"; + style = "bg:color_bg3"; + }; + time = { + disabled = false; + time_format = "%R"; + style = "bg:color_bg1"; + format = "[[  $time ](fg:color_fg0 bg:color_bg1)]($style)"; + }; + line_break.disabled = false; + character.disabled = false; + }; + }; +} diff --git a/modules/home-manager/syncthing.nix b/configs/home-manager/syncthing.nix similarity index 100% rename from modules/home-manager/syncthing.nix rename to configs/home-manager/syncthing.nix diff --git a/modules/home-manager/terminal/tiny-irc.nix b/configs/home-manager/tiny-irc.nix similarity index 88% rename from modules/home-manager/terminal/tiny-irc.nix rename to configs/home-manager/tiny-irc.nix index 15921e2..366682b 100644 --- a/modules/home-manager/terminal/tiny-irc.nix +++ b/configs/home-manager/tiny-irc.nix @@ -4,8 +4,6 @@ lib, ... }: { - options.user.tiny.enable=lib.mkEnableOption "enable tiny irc client"; - config=lib.mkIf config.user.tiny.enable { programs.tiny = { enable = true; settings = { @@ -46,4 +44,4 @@ }; }; }; -};} +} diff --git a/modules/home-manager/terminal/zellij/config.kdl b/configs/home-manager/zellij/config.kdl similarity index 100% rename from modules/home-manager/terminal/zellij/config.kdl rename to configs/home-manager/zellij/config.kdl diff --git a/configs/home-manager/zellij/default.nix b/configs/home-manager/zellij/default.nix new file mode 100644 index 0000000..d5935ff --- /dev/null +++ b/configs/home-manager/zellij/default.nix @@ -0,0 +1,11 @@ +{ + config, + lib, + pkgs, + ... +}: { + programs.zellij.enable = true; + home.file = { + ".config/zellij/config.kdl".source = ./config.kdl; + }; +} diff --git a/configs/home-manager/zsh.nix b/configs/home-manager/zsh.nix new file mode 100644 index 0000000..9a391bb --- /dev/null +++ b/configs/home-manager/zsh.nix @@ -0,0 +1,107 @@ +{ + config, + pkgs, + lib, + ... +}: { + programs = { + starship.enableZshIntegration = true; + fzf.enableZshIntegration = true; + zoxide.enableZshIntegration = true; + yazi.enableZshIntegration = true; + eza.enableZshIntegration = true; + direnv.enableZshIntegration = true; + kitty.shellIntegration.enableZshIntegration = true; + carapace.enableZshIntegration = false; + zsh = { + enable = true; + enableCompletion = true; + initExtra = lib.mkMerge [ + '' + #have the menu highlight while we cycle through options + zstyle ':completion:*' menu select + #case insensitive completion + zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' + #allow completion from midword + setopt COMPLETE_IN_WORD + #move cursor to end of word after completing + setopt ALWAYS_TO_END + #complete aliases as well + setopt COMPLETE_ALIASES + #select first item when you press tab the first time. + setopt MENU_COMPLETE + #case insensitive globbing + setopt NO_CASE_GLOB + #sort globs that expand to numbers by number rather than alphabeticly + setopt NUMERIC_GLOB_SORT + #allows for some neat globbing. + setopt EXTENDED_GLOB + #allow backspacing beyond the point you entered insert mode: + bindkey -v '^?' backward-delete-char + bindkey "^W" backward-kill-word + + #cheat.sh is a wonderful tool, the less typing needed the better. + cheat(){ + for i in $*; do; + curl cheat.sh/$i + done + } + '' + (lib.mkIf (!config.programs.starship.enable) '' + autoload -U promptinit + promptinit + autoload -U colors + colors + + #stuff to show git things. + autoload -Uz vcs_info + setopt prompt_subst + precmd_vcs() {vcs_info} + #when not in a repo, show full path to current directory. when in one, show path from base direcory of the repo. + zstyle ':vcs_info:*' nvcsformats '%~' + zstyle ':vcs_info:*' formats '%r/%S %F{green}[%b]%f' + zstyle ':vcs_info:*' actionformats '%r/%S %F{green}[%b] %F{red}<%a>%f' + + #the precmd function, called just before printing the prompt. + function precmd() { + precmd_vcs + } + + #Make the right prompt blank, just to be sure. + RPROMPT="" + + #on the top line, show a whole bunch of info. botton line should be as minimal as possilbe (just a single char to input next to...) + PROMPT=$'%F{cyan}[%n@%m]%f%F{red}├────┤%f$${vcs_info_msg_0_} %F{white}[%D %T]%f\n»' + '') + ]; + autocd = true; + autosuggestion.enable = true; + defaultKeymap = "viins"; + history = { + ignoreAllDups = true; + extended = true; + }; + shellAliases = { + ll = "ls -lh"; + la = "ls -lha"; + please = "sudo $(fc -ln -1)"; + pyactivate = "source ./.venv/bin/activate"; + }; + syntaxHighlighting = { + enable = true; + highlighters = [ + "main" + "brackets" + "pattern" + "regexp" + "root" + "line" + ]; + }; + }; + }; + services.gpg-agent.enableZshIntegration = true; + home.packages = with pkgs; [ + curl + ]; +} diff --git a/modules/nixos/common.nix b/configs/nixos/common.nix similarity index 93% rename from modules/nixos/common.nix rename to configs/nixos/common.nix index 1820fb4..1299677 100644 --- a/modules/nixos/common.nix +++ b/configs/nixos/common.nix @@ -29,6 +29,10 @@ neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. ]; + imports = [ + ../../modules/hostopts.nix + ]; + home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = {inherit inputs outputs;}; diff --git a/modules/both/i3/default.nix b/configs/nixos/i3/default.nix similarity index 100% rename from modules/both/i3/default.nix rename to configs/nixos/i3/default.nix diff --git a/modules/both/i3/i3status-rust.nix b/configs/nixos/i3/i3status-rust.nix similarity index 100% rename from modules/both/i3/i3status-rust.nix rename to configs/nixos/i3/i3status-rust.nix diff --git a/modules/both/i3/lockscreen.nix b/configs/nixos/i3/lockscreen.nix similarity index 100% rename from modules/both/i3/lockscreen.nix rename to configs/nixos/i3/lockscreen.nix diff --git a/modules/nixos/networking.nix b/configs/nixos/networking.nix similarity index 100% rename from modules/nixos/networking.nix rename to configs/nixos/networking.nix diff --git a/modules/nixos/nfsv2.nix b/configs/nixos/nfsv2.nix similarity index 100% rename from modules/nixos/nfsv2.nix rename to configs/nixos/nfsv2.nix diff --git a/modules/nixos/printing.nix b/configs/nixos/printing.nix similarity index 100% rename from modules/nixos/printing.nix rename to configs/nixos/printing.nix diff --git a/modules/both/sound.nix b/configs/nixos/sound.nix similarity index 100% rename from modules/both/sound.nix rename to configs/nixos/sound.nix diff --git a/modules/nixos/touchpad.nix b/configs/nixos/touchpad.nix similarity index 100% rename from modules/nixos/touchpad.nix rename to configs/nixos/touchpad.nix diff --git a/modules/nixos/wireless.nix b/configs/nixos/wireless.nix similarity index 100% rename from modules/nixos/wireless.nix rename to configs/nixos/wireless.nix diff --git a/hosts/archlaptop-vm/default.nix b/hosts/archlaptop-vm/default.nix index 706e8e3..f122713 100644 --- a/hosts/archlaptop-vm/default.nix +++ b/hosts/archlaptop-vm/default.nix @@ -11,12 +11,11 @@ inputs.nixpkgs.lib.nixosSystem { inputs.home-manager.nixosModules.home-manager ./hardware-configuration.nix ../../roles/nixos/graphical-vm.nix - ../../modules/hostopts.nix - ../../modules/nixos/common.nix - ../../modules/nixos/printing.nix - ../../modules/both/sound.nix - ../../modules/nixos/networking.nix - ../../modules/both/i3 + ../../configs/nixos/common.nix + ../../configs/nixos/printing.nix + ../../configs/nixos/sound.nix + ../../configs/nixos/networking.nix + ../../configs/nixos/i3 ({ config, pkgs, @@ -71,8 +70,8 @@ inputs.nixpkgs.lib.nixosSystem { }; imports = [ ../../roles/home-manager/terminal.nix - ../../modules/home-manager/common.nix - ../../modules/home-manager/email.nix + ../../configs/home-manager/common.nix + ../../configs/home-manager/email.nix inputs.nixvim.homeManagerModules.nixvim ]; }; diff --git a/hosts/home-personal.nix b/hosts/home-personal.nix index 8f8643b..a48c06e 100644 --- a/hosts/home-personal.nix +++ b/hosts/home-personal.nix @@ -32,10 +32,10 @@ inputs.home-manager.lib.homeManagerConfiguration { imports = [ ../roles/home-manager/terminal.nix ../roles/home-manager/music.nix - ../modules/home-manager/common.nix - ../modules/home-manager/syncthing.nix - ../modules/home-manager/email.nix - ../modules/home-manager/terminal/voice.nix + ../configs/home-manager/common.nix + ../configs/home-manager/syncthing.nix + ../configs/home-manager/email.nix + ../configs/home-manager/terminal/voice.nix ]; }) inputs.nixvim.homeManagerModules.nixvim diff --git a/hosts/home-workstation.nix b/hosts/home-workstation.nix index d4e1b93..e7539e2 100644 --- a/hosts/home-workstation.nix +++ b/hosts/home-workstation.nix @@ -37,8 +37,8 @@ inputs.home-manager.lib.homeManagerConfiguration { home.homeDirectory = /home/gabe; imports = [ ../roles/home-manager/terminal.nix - ../modules/home-manager/common.nix - ../modules/home-manager/syncthing.nix + ../configs/home-manager/common.nix + ../configs/home-manager/syncthing.nix ]; }) ]; diff --git a/hosts/workstation-vm/default.nix b/hosts/workstation-vm/default.nix index 91ce433..54a3e2b 100644 --- a/hosts/workstation-vm/default.nix +++ b/hosts/workstation-vm/default.nix @@ -14,13 +14,12 @@ inputs.nixpkgs.lib.nixosSystem { inputs.home-manager.nixosModules.home-manager ./hardware-configuration.nix ../../roles/nixos/graphical-vm.nix - ../../modules/hostopts.nix - ../../modules/nixos/common.nix - ../../modules/nixos/printing.nix - ../../modules/both/sound.nix - ../../modules/nixos/networking.nix - ../../modules/nixos/nfsv2.nix - ../../modules/both/i3 + ../../configs/nixos/printing.nix + ../../configs/nixos/sound.nix + ../../configs/nixos/networking.nix + ../../configs/nixos/nfsv2.nix + ../../configs/nixos/i3 + ../../configs/nixos/common.nix ({ config, pkgs, @@ -76,7 +75,7 @@ inputs.nixpkgs.lib.nixosSystem { }; imports = [ ../../roles/home-manager/terminal.nix - ../../modules/home-manager/common.nix + ../../configs/home-manager/common.nix inputs.nixvim.homeManagerModules.nixvim ]; }; diff --git a/hosts/wsl-workstation.nix b/hosts/wsl-workstation.nix index 8d5aa5c..9a34603 100644 --- a/hosts/wsl-workstation.nix +++ b/hosts/wsl-workstation.nix @@ -9,8 +9,7 @@ inputs.nixpkgs.lib.nixosSystem { modules = [ inputs.home-manager.nixosModules.home-manager inputs.nixos-wsl.nixosModules.default - ../modules/hostopts.nix - ../modules/nixos/common.nix + ../configs/nixos/common.nix ({ config, pkgs, @@ -56,7 +55,7 @@ inputs.nixpkgs.lib.nixosSystem { }; imports = [ ../roles/home-manager/terminal.nix - ../modules/home-manager/common.nix + ../configs/home-manager/common.nix inputs.nixvim.homeManagerModules.nixvim ]; }; diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix new file mode 100644 index 0000000..cd67cfc --- /dev/null +++ b/modules/home-manager/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./git.nix + ./nvim + ./voice.nix + ]; +} diff --git a/modules/home-manager/terminal/git.nix b/modules/home-manager/git.nix similarity index 97% rename from modules/home-manager/terminal/git.nix rename to modules/home-manager/git.nix index 3161017..ebb95dd 100644 --- a/modules/home-manager/terminal/git.nix +++ b/modules/home-manager/git.nix @@ -6,7 +6,7 @@ }: { options = { user.git = { - enable= lib.mkEnableOption "enable git"; + enable = lib.mkEnableOption "enable git"; workProfile = { enable = lib.mkEnableOption "git work profile"; email = lib.mkOption { diff --git a/modules/home-manager/terminal/btop.nix b/modules/home-manager/terminal/btop.nix deleted file mode 100644 index 12260e6..0000000 --- a/modules/home-manager/terminal/btop.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - options.user.btop.enable = lib.mkEnableOption "enable btop"; - config = lib.mkIf config.user.btop.enable { - programs.btop = { - enable = true; - settings = { - vim_keys = true; - }; - }; - }; -} diff --git a/modules/home-manager/terminal/default.nix b/modules/home-manager/terminal/default.nix deleted file mode 100644 index eabf14d..0000000 --- a/modules/home-manager/terminal/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - imports=[ - ./nushell - ./zellij - ./btop.nix - ./direnv.nix - ./git.nix - ./gpg.nix - ./irssi.nix - ./pass.nix - ./ssh-agent.nix - ./starship.nix - ./tiny-irc.nix - ./voice.nix - ./zsh.nix - ]; -} diff --git a/modules/home-manager/terminal/direnv.nix b/modules/home-manager/terminal/direnv.nix deleted file mode 100644 index 95f53a0..0000000 --- a/modules/home-manager/terminal/direnv.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - pgks, - lib, - ... -}: { - options.user.direnv.enable = lib.mkEnableOption "enable direnv"; - config= lib.mkIf config.user.direnv.enable{ - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; - }; -} diff --git a/modules/home-manager/terminal/gpg.nix b/modules/home-manager/terminal/gpg.nix deleted file mode 100644 index 0c5d138..0000000 --- a/modules/home-manager/terminal/gpg.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - options.user.gpg.enable = lib.mkEnableOption "enable gpg"; - config = lib.mkIf config.user.gpg.enable { - programs.gpg.enable = true; - - services.gpg-agent = { - enable = true; - enableSshSupport = true; - pinentryPackage = lib.mkDefault pkgs.pinentry-tty; - }; - }; -} diff --git a/modules/home-manager/terminal/nushell/default.nix b/modules/home-manager/terminal/nushell/default.nix deleted file mode 100644 index a11fa08..0000000 --- a/modules/home-manager/terminal/nushell/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - options.user.nushell.enable = lib.mkEnableOption "enable nushell"; - config = lib.mkIf config.user.nushell.enable { - home.file = { - ".config/nushell/completions".source = ./completions; - }; - - programs = { - #sessionVariables, sessionPath and shellAliases are not applied to nushell. - nushell = { - enable = true; - configFile.source = ./config.nu; - envFile.source = ./env.nu; - }; - - yazi.enableNushellIntegration = true; - zoxide.enableNushellIntegration = true; - starship.enableNushellIntegration = true; - eza.enableNushellIntegration = true; - carapace = { - enable = true; - enableNushellIntegration = true; - }; - direnv.enableNushellIntegration = true; - }; - services = { - gpg-agent.enableNushellIntegration = true; - pueue = { - enable = true; - settings = { - daemon = { - default_parallel_tasks = 5; - }; - }; - }; - }; - }; -} diff --git a/modules/home-manager/terminal/pass.nix b/modules/home-manager/terminal/pass.nix deleted file mode 100644 index 1ce7bcd..0000000 --- a/modules/home-manager/terminal/pass.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - options.user.pass.enable = lib.mkEnableOption "enable pass password manager"; - config = lib.mkIf config.user.pass.enable { - programs.password-store = { - enable = true; - settings = { - PASSWORD_STORE_DIR = "$HOME/keys/password-store"; - }; - }; - - programs.nushell.extraEnv = '' - $env.PASSWORD_STORE_DIR = ($env.HOME | path join "keys" "password-store") - ''; - }; -} diff --git a/modules/home-manager/terminal/ssh-agent.nix b/modules/home-manager/terminal/ssh-agent.nix deleted file mode 100644 index 8cde305..0000000 --- a/modules/home-manager/terminal/ssh-agent.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - options.user.ssh-agent.enable = lib.mkEnableOption "enable ssh-agent"; - config = lib.mkIf config.user.ssh-agent.enable { - services.ssh-agent.enable = true; - programs.nushell.extraEnv = '' - $env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent" - ''; - }; -} diff --git a/modules/home-manager/terminal/starship.nix b/modules/home-manager/terminal/starship.nix deleted file mode 100644 index 21a5e4e..0000000 --- a/modules/home-manager/terminal/starship.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - options.user.starship.enable = lib.mkEnableOption "enable starship prompt"; - config = lib.mkIf config.user.starship.enable { - programs.starship = { - enable = true; - settings = { - format = lib.concatStrings [ - "[](color_orange)" - "$shell" - "$username" - "[@](bg:color_orange)" - "$hostname" - "[ ](bg:color_orange)" - "[](bg:color_yellow fg:color_orange)" - "$directory" - "[](fg:color_yellow bg:color_aqua)" - "$git_branch" - "$git_status" - "[](fg:color_aqua bg:color_blue)" - "$git_metrics" - "[](fg:color_blue bg:color_bg3)" - "$git_commit" - "[](fg:color_bg3 bg:color_bg1)" - "$time" - "[ ](fg:color_bg1)" - "$line_break" - "$character" - ]; - add_newline = false; - palette = "gruvbox_dark"; - palettes.gruvbox_dark = { - color_fg0 = "#fbf1c7"; - color_bg1 = "#3c3836"; - color_bg3 = "#665c54"; - color_blue = "#458588"; - color_aqua = "#689d6a"; - color_green = "#98971a"; - color_orange = "#d65d0e"; - color_purple = "#b16286"; - color_red = "#cc241d"; - color_yellow = "#d79921"; - }; - hostname = { - ssh_only = false; - ssh_symbol = "🌐"; - format = "[$hostname $ssh_symbol]($style)"; - style = "bg:color_orange"; - }; - shell = { - disabled = false; - bash_indicator = "$"; - fish_indicator = "<><"; - zsh_indicator = "%"; - nu_indicator = ">"; - format = "[$indicator ]($style)"; - style = "bg:color_orange"; - }; - fill = { - symbol = " "; - style = "bg:color_bg3"; - }; - username = { - show_always = true; - style_user = "bg:color_orange fg:color_fg0"; - style_root = "bg:color_orange fg:color_fg0"; - format = "[$user]($style)"; - }; - directory = { - style = "fg:color_fg0 bg:color_yellow"; - format = "[ $path ]($style)"; - fish_style_pwd_dir_length = 3; - truncation_length = 4; - truncation_symbol = "…/"; - }; - git_branch = { - symbol = ""; - style = "bg:color_aqua"; - format = "[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)"; - }; - git_status = { - style = "bg:color_aqua"; - format = "[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)"; - }; - git_metrics = { - disabled = false; - added_style = "bg:color_blue fg:bold green"; - deleted_style = "bg:color_blue fg:bold red"; - format = "([ +$added ]($added_style))([-$deleted ]($deleted_style))"; - }; - git_commit = { - only_detached = false; - tag_disabled = false; - format = "[($hash$tag)]($style)"; - style = "bg:color_bg3"; - }; - time = { - disabled = false; - time_format = "%R"; - style = "bg:color_bg1"; - format = "[[  $time ](fg:color_fg0 bg:color_bg1)]($style)"; - }; - line_break.disabled = false; - character.disabled = false; - }; - }; - }; -} diff --git a/modules/home-manager/terminal/zellij/default.nix b/modules/home-manager/terminal/zellij/default.nix deleted file mode 100644 index 06f64df..0000000 --- a/modules/home-manager/terminal/zellij/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - options.user.zellij.enable = lib.mkEnableOption "enable zellij"; - config = lib.mkIf config.user.zellij.enable { - programs.zellij.enable = true; - home.file = { - ".config/zellij/config.kdl".source = ./config.kdl; - }; - }; -} diff --git a/modules/home-manager/terminal/zsh.nix b/modules/home-manager/terminal/zsh.nix deleted file mode 100644 index e543615..0000000 --- a/modules/home-manager/terminal/zsh.nix +++ /dev/null @@ -1,110 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - options.user.zsh.enable = lib.mkEnableOption "enable zsh"; - config = lib.mkIf config.user.zsh.enable { - programs = { - starship.enableZshIntegration = true; - fzf.enableZshIntegration = true; - zoxide.enableZshIntegration = true; - yazi.enableZshIntegration = true; - eza.enableZshIntegration = true; - direnv.enableZshIntegration = true; - kitty.shellIntegration.enableZshIntegration = true; - carapace.enableZshIntegration = false; - zsh = { - enable = true; - enableCompletion = true; - initExtra = lib.mkMerge [ - '' - #have the menu highlight while we cycle through options - zstyle ':completion:*' menu select - #case insensitive completion - zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' - #allow completion from midword - setopt COMPLETE_IN_WORD - #move cursor to end of word after completing - setopt ALWAYS_TO_END - #complete aliases as well - setopt COMPLETE_ALIASES - #select first item when you press tab the first time. - setopt MENU_COMPLETE - #case insensitive globbing - setopt NO_CASE_GLOB - #sort globs that expand to numbers by number rather than alphabeticly - setopt NUMERIC_GLOB_SORT - #allows for some neat globbing. - setopt EXTENDED_GLOB - #allow backspacing beyond the point you entered insert mode: - bindkey -v '^?' backward-delete-char - bindkey "^W" backward-kill-word - - #cheat.sh is a wonderful tool, the less typing needed the better. - cheat(){ - for i in $*; do; - curl cheat.sh/$i - done - } - '' - (lib.mkIf (!config.programs.starship.enable) '' - autoload -U promptinit - promptinit - autoload -U colors - colors - - #stuff to show git things. - autoload -Uz vcs_info - setopt prompt_subst - precmd_vcs() {vcs_info} - #when not in a repo, show full path to current directory. when in one, show path from base direcory of the repo. - zstyle ':vcs_info:*' nvcsformats '%~' - zstyle ':vcs_info:*' formats '%r/%S %F{green}[%b]%f' - zstyle ':vcs_info:*' actionformats '%r/%S %F{green}[%b] %F{red}<%a>%f' - - #the precmd function, called just before printing the prompt. - function precmd() { - precmd_vcs - } - - #Make the right prompt blank, just to be sure. - RPROMPT="" - - #on the top line, show a whole bunch of info. botton line should be as minimal as possilbe (just a single char to input next to...) - PROMPT=$'%F{cyan}[%n@%m]%f%F{red}├────┤%f$${vcs_info_msg_0_} %F{white}[%D %T]%f\n»' - '') - ]; - autocd = true; - autosuggestion.enable = true; - defaultKeymap = "viins"; - history = { - ignoreAllDups = true; - extended = true; - }; - shellAliases = { - ll = "ls -lh"; - la = "ls -lha"; - please = "sudo $(fc -ln -1)"; - pyactivate = "source ./.venv/bin/activate"; - }; - syntaxHighlighting = { - enable = true; - highlighters = [ - "main" - "brackets" - "pattern" - "regexp" - "root" - "line" - ]; - }; - }; - }; - services.gpg-agent.enableZshIntegration = true; - home.packages = with pkgs; [ - curl - ]; - }; -} diff --git a/modules/home-manager/terminal/voice.nix b/modules/home-manager/voice.nix similarity index 100% rename from modules/home-manager/terminal/voice.nix rename to modules/home-manager/voice.nix diff --git a/roles/home-manager/minimal-terminal.nix b/roles/home-manager/minimal-terminal.nix index c8a42ab..fad9e35 100644 --- a/roles/home-manager/minimal-terminal.nix +++ b/roles/home-manager/minimal-terminal.nix @@ -5,16 +5,14 @@ ... }: { imports = [ - ../../modules/home-manager/terminal - ../../modules/home-manager/nvim + ../../configs/home-manager/btop.nix + ../../configs/home-manager/direnv.nix + ../../configs/home-manager/ssh-agent.nix + ../../configs/home-manager/zsh.nix ]; user = { - btop.enable = true; - direnv.enable = true; git.enable = true; - ssh-agent.enable = true; - zsh.enable = true; nvim.enable = true; }; diff --git a/roles/home-manager/terminal.nix b/roles/home-manager/terminal.nix index 504ba2c..bf5b77f 100644 --- a/roles/home-manager/terminal.nix +++ b/roles/home-manager/terminal.nix @@ -6,15 +6,12 @@ }: { imports = [ ./minimal-terminal.nix - ../../modules/home-manager/terminal/nushell - ../../modules/home-manager/terminal/starship.nix - ../../modules/home-manager/terminal/tiny-irc.nix + ../../configs/home-manager/nushell + ../../configs/home-manager/starship.nix + ../../configs/home-manager/tiny-irc.nix ]; user = { - nushell.enable = true; - starship.enable = true; - tiny.enable = true; nvim = { enable-lsp = true; enable-treesitter = true;