{ pkgs, lib, config, inputs, ... }: { config = { home-manager.users.tzlil = { imports = [ inputs.viper-nix-common.homeModules.xdg inputs.nix-index-database.hmModules.nix-index ]; home = { packages = with pkgs; [ rsync curl ripgrep bat jq file # p2p file transfer croc nix-output-monitor # crap i need in my shell for general usage, mostly data science (pkgs.python3.withPackages (ps: with ps; [ requests numpy networkx more-itertools ])) ( let hs = pkgs.ghc.withPackages (p: with p; [pretty-simple pointfree parsec]); in pkgs.writeShellScriptBin "hs" '' exec ${hs}/bin/ghci -ghci-script ${pkgs.writeText "ghci.conf" '' :set -XFlexibleContexts :set -XFlexibleInstances :set -XOverloadedStrings :set -XAllowAmbiguousTypes :set prompt "\ESC[38;5;208m\STXλ>\ESC[m\STX " :set -ferror-spans -freverse-errors -fprint-expanded-synonyms :set -interactive-print Text.Pretty.Simple.pPrint :def pf \str -> return $ ":! ${hs}/bin/pointfree \"" ++ str ++ "\""''} '' ) ]; }; programs = { git = { userName = "tzlil"; userEmail = "tzlils@protonmail.com"; enable = true; extraConfig = { push.autoSetupRemote = true; init.defaultBranch = "master"; }; }; direnv = { enable = true; nix-direnv.enable = true; }; fish = { enable = true; shellAliases = { gc = "git clone"; gs = "git status"; ga = "git add"; gm = "git commit -m" l = "ls -alh"; b = "bat"; alv = "ping -c 1 -W 1"; }; functions = { fish_greeting = ""; ns = '' set -l p for a in $argv set p $p "nixpkgs#$a" end nix shell $p ''; nr = "nix run nixpkgs#$argv[1] $argv[2..]"; tmp = "cd (mktemp -d --suffix -$argv[1])"; py = ''python -c "print(eval(\"\"\"$argv\"\"\"))"''; # fish_command_not_found = "nix shell nixpkgs#(command-not-found $argv[1] &| sed -nr 's/.*-p (.*)$/\\1/p' | ${lib.getExe pkgs.fzf} || return 0) -c $argv[1]"; }; }; neovim = { enable = true; viAlias = true; vimAlias = true; defaultEditor = true; extraConfig = '' set clipboard+=unnamedplus ''; }; # nix-locate command-not-found.enable = lib.mkForce false; nix-index = { enable = true; enableFishIntegration = true; }; # gpg = { # enable = true; # mutableKeys = false; # mutableTrust = false; # settings = { # default-key = "E989 C39F 5AE8 2790 F41E AD50 5FEF 5315 1562 A6CD"; # default-recipient-self = true; # auto-key-locate = "local,wkd,keyserver"; # keyserver = "hkps://keys.openpgp.org"; # auto-key-retrieve = true; # auto-key-import = true; # keyserver-options = "honor-keyserver-url"; # no-autostart = true; # }; # }; }; # services.gpg-agent = let # m = 60; # h = 60 * m; # d = 24 * h; # y = 365 * d; # in { # enable = true; # enableSshSupport = true; # enableFishIntegration = true; # defaultCacheTtl = 6 * h; # defaultCacheTtlSsh = 6 * h; # maxCacheTtl = 100 * y; # effectively unlimited # maxCacheTtlSsh = 100 * y; # effectively unlimited # sshKeys = ["E989C39F5AE82790F41EAD505FEF53151562A6CD"]; # }; }; }; }