{ config, pkgs, ... }: { home.username = "kjtsanaktsidis"; home.homeDirectory = "/home/kjtsanaktsidis"; home.stateVersion = "25.05"; programs.home-manager.enable = true; # Install packages home.packages = with pkgs; [ htop git zellij tmux ]; # Configure sops for home-manager sops = { age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; defaultSopsFile = ./secrets.yaml; secrets = { kj_id_ed25519 = { path = "${config.home.homeDirectory}/.ssh/id_ed25519"; }; kj_gpg_private_key = { path = "${config.home.homeDirectory}/.gnupg/private-key.asc"; }; }; }; # SSH public key (private key is managed by sops) home.file.".ssh/id_ed25519.pub" = { text = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMtGcEXu5S/0zsF6Suxc65DmGFGt1JWRnqadoVhErOed kjtsanaktsidis@KJMacbookGroq.local"; }; # Zsh configuration programs.zsh = { enable = true; history = { size = 1000000; save = 1000000; append = true; extended = true; ignoreSpace = false; ignoreDups = false; }; initContent = '' # Initialize completion system autoload -Uz compinit compinit # Initialize prompt system autoload -Uz promptinit promptinit # Set options setopt extendedglob nomatch notify # Define gentoo prompt theme prompt_gentoo_help () { cat <<'EOF' This prompt is color-scheme-able. You can invoke it thus: prompt gentoo [ [ []]] EOF } prompt_gentoo_setup () { local prompt_gentoo_prompt=''${1:-'blue'} local prompt_gentoo_user=''${2:-'green'} local prompt_gentoo_root=''${3:-'red'} if [ "$USER" = 'root' ] then local base_prompt="%B%F{$prompt_gentoo_root}%m%k " else local base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k " fi local post_prompt="%b%f%k" local path_prompt="%B%F{$prompt_gentoo_prompt}%1~" typeset -g PS1="$base_prompt$path_prompt %# $post_prompt" typeset -g PS2="$base_prompt$path_prompt %_> $post_prompt" typeset -g PS3="$base_prompt$path_prompt ?# $post_prompt" } # Register the prompt with promptinit prompt_themes+=( gentoo ) # Use the gentoo prompt prompt gentoo ''; }; # FZF with standard keybindings programs.fzf = { enable = true; enableZshIntegration = true; }; programs.gpg = { enable = true; homedir = "${config.home.homeDirectory}/.gnupg"; }; services.gpg-agent = { enable = true; }; home.activation.importGpgPrivateKey = config.lib.dag.entryAfter ["sops-nix" "onFilesChange"] '' export GNUPGHOME="${config.programs.gpg.homedir}" $DRY_RUN_CMD ${pkgs.gnupg}/bin/gpg --batch --verbose --trust-model always --import "${config.sops.secrets.kj_gpg_private_key.path}" echo "GPG private key imported from sops secret" ''; }