{ pkgs, unstable, config, lib, ... }: let neovim-unwrapped = import ../../overlays/neovim.nix { pkgs = unstable; }; in { nix = { settings = { experimental-features = [ "nix-command" "flakes" ]; extra-trusted-users = [ "noah" ]; extra-substituters = [ "https://cache.ngp.computer" ]; extra-trusted-public-keys = [ "misaki.packetlost.dev:y5Z/utaVBozpL0UAbUQDWLjpm2sVMOoKzyG76n/167A=" "ngp-upload-1:QX459NA316WkD1gLp3RcRejbX3lNRArLx4JCKwY3FAQ=" ]; }; }; age.identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519_age" "${config.home.homeDirectory}/.ssh/id_ed25519_terminus" "${config.home.homeDirectory}/.ssh/id_ed25519" ]; programs = { home-manager.enable = true; direnv = { enable = true; nix-direnv.enable = true; }; nix-index = { enable = true; enableFishIntegration = true; }; fzf = { enable = true; enableFishIntegration = true; }; pistol.enable = true; neovim = { package = neovim-unwrapped; enable = true; defaultEditor = true; withRuby = true; withNodeJs = true; withPython3 = true; extraPackages = with pkgs; [ unstable.fzf unstable.ripgrep luarocks unstable.tree-sitter ]; }; helix = { enable = true; settings = { theme = "everforest_dark"; editor.cursor-shape = { normal = "block"; insert = "bar"; select = "underline"; }; }; languages.language = [ { name = "nix"; auto-format = true; formatter.command = "${pkgs.nixfmt}/bin/nixfmt"; } { name = "rust"; auto-format = true; formatter.command = "${pkgs.rustfmt}/bin/rustfmt"; } ]; }; jujutsu = { package = unstable.jujutsu; enable = true; settings = { user.name = "Noah Pederson"; user.email = "noah@packetlost.dev"; ui = { diff-formatter = [ "difft" "--color" "always" "$left" "$right" ]; conflict-marker-style = "git"; default-command = "log"; }; git = { default-branch = "master"; }; }; }; git = { enable = true; lfs.enable = true; settings = { user.name = "Noah Pederson"; user.email = "noah@packetlost.dev"; sendemail = { smtpserver = "smtp.migadu.com"; smtpuser = "noah@packetlost.dev"; smtpauth = "plain"; smtpencryption = "tls"; smtpserverport = 465; }; init = { defaultBranch = "master"; # The world isn't ready for sha256 git yet #defaultObjectFormat = "sha256"; }; pull = { rebase = true; }; push = { default = "simple"; autoSetupRemote = true; followTags = true; }; credential = { helper = "cache"; }; alias = { out = "log @{u}.."; }; column = { ui = "auto"; }; branch = { sort = "-committerdate"; }; tag = { sort = "version:refname"; }; diff = { algorithm = "histogram"; colorMoved = "plain"; external = "difft"; mnemonicPrefix = true; renames = true; tool = "difftastic"; }; difftool = { prompt = false; difftastic = { cmd = ''difft "$LOCAL" "$REMOTE"''; }; }; fetch = { prune = true; pruneTags = true; all = true; }; help = { autocorrect = "prompt"; }; commit = { verbose = true; }; rerere = { enabled = true; autoupdate = true; }; rebase = { autoSquash = true; autoStash = true; updateRefs = true; }; merge = { conflictStyle = "zdiff3"; }; }; ignores = [ ".direnv/" ".envrc" ".env/" ".clj-kondo/" ]; }; aerc = { enable = true; }; yazi = let localPkgs = pkgs; inherit (localPkgs) yaziPlugins; plugins = lib.attrsets.getAttrs [ "rsync" "piper" "nord" "mediainfo" "glow" "git" "diff" "duckdb" ] yaziPlugins; in { inherit plugins; enable = true; package = localPkgs.yazi; enableFishIntegration = true; shellWrapperName = "yy"; settings = { preview = { image_quality = 90; }; tasks = { image_bound = [ 0 0 ]; }; }; }; }; # XDG config xdg = { enable = true; configFile = { nvim = { source = ../../config/nvim; recursive = true; }; vis = { source = ../../config/vis; recursive = true; }; fish = { source = ../../config/fish; recursive = true; force = true; }; "fish/completions/nix.fish".source = "${pkgs.nix}/share/fish/vendor_completions.d/nix.fish"; "fish/completions/zellij.fish".source = "${unstable.zellij}/share/fish/vendor_completions.d/zellij.fish"; aerc = { source = ../../config/aerc; recursive = true; }; ghostty = { source = ../../config/ghostty; recursive = true; force = true; }; opencode = { source = ../../config/opencode; recursive = true; }; polytoken = { source = ../../config/polytoken; recursive = true; }; }; dataFile.janet = { source = ../../config/janet; recursive = true; }; }; home.file.".local/bin" = { source = ../../config/scripts; recursive = true; }; home.file.".luacheckrc" = { text = '' globals = { "vim", "vis", } ''; }; age.secrets.catgirl-libera = { file = ../../secrets/catgirl-libera.age; path = "${config.xdg.configHome}/catgirl/libera"; symlink = true; }; manual.manpages.enable = false; }