{ pkgs, lib, config, inputs, ... }: { config = { home-manager.users.tzlil = { pkgs, config, nixosConfig, ... }: { imports = [ inputs.viper-nix-common.homeModules.xdg ]; home = { packages = with pkgs; [ rsync curl ripgrep bat croc # 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; [relude pretty-simple pointfree]); in pkgs.writeShellScriptBin "hs" '' exec ${hs}/bin/ghci -ghci-script ${pkgs.writeText "ghci.conf" '' :set -XNoImplicitPrelude :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 ++ "\"" import Relude''} '' ) ]; #sessionVariables = { #EDITOR = "nvim"; #}; }; 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"; l = "ls -alh"; b = "bat"; }; functions = { fish_greeting = ""; ns = '' set -l p for a in $argv set p $p "nixpkgs#$a" end nix shell $p ''; fish_command_not_found = "nix shell nixpkgs#(command-not-found $argv[1] &| sed -nr 's/.*-p (.*)$/\\1/p' | ${lib.getExe pkgs.fzf}) -c $argv[1]"; }; }; neovim = { enable = true; viAlias = true; vimAlias = true; defaultEditor = true; extraConfig = '' set clipboard+=unnamedplus ''; }; # 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"]; # }; }; }; }