{ config, pkgs, ... }: { imports = [ ({lib, ...}: { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "spotify" "zoom" ]; }) ]; # Home Manager needs a bit of information about you and the # paths it should manage. home = { username = "jacob"; homeDirectory = "/home/jacob"; keyboard = { layout = "us"; options = ["caps:swapescape" "ctrl:ralt_rctrl"]; }; packages = with pkgs; [ age bitwarden bitwarden-cli chromium fd feh file #freecad fzf #gnumake gxkb hack-font inconsolata jq keyutils # for keyctl, used by some bitwarden scripts like qute-bitwarden libreoffice logseq mupdf #nyxt #openscad #pandoc pavucontrol ripgrep rofi scli scrot signal-desktop sops speedcrunch spotify spotify-tui sxiv #texlive.combined.scheme-full tree unzip xclip xpra zathura zoom-us ]; sessionVariables = { #QT_ENABLE_HIGHDPI_SCALING = 1; }; # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage # when a new Home Manager release introduces backwards # incompatible changes. # # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. stateVersion = "22.05"; }; xdg = { enable = true; mimeApps = { enable = true; associations.added = { "application/pdf" = ["org.pwmt.zathura-pdf-mupdf.desktop"]; }; defaultApplications = let browser = [ "org.qutebrowser.qutebrowser.desktop" "firefox.desktop" ]; img = [ "sxiv.desktop" "feh.desktop" ]; in { "text/html" = browser; "x-scheme-handler/http" = browser; "x-scheme-handler/https" = browser; "x-scheme-handler/about" = browser; "x-scheme-handler/unknown" = browser; "image/png" = img; }; }; }; accounts.email.accounts = { gmail = { address = "jacob.hinkle@gmail.com"; passwordCommand = "${pkgs.coreutils}/bin/cat /run/secrets/email/gmail/password"; flavor = "gmail.com"; mbsync = { enable = false; create = "maildir"; }; notmuch.enable = false; realName = "Jacob Hinkle"; }; jhink = { address = "jacob.hinkle@jhink.org"; primary = true; imap = { host = "imap.fastmail.com"; tls = { enable = true; useStartTls = false; }; }; smtp = { host = "smtp.fastmail.com"; tls = { enable = true; useStartTls = false; }; }; flavor = "plain"; userName = "jacob.hinkle@jhink.org"; passwordCommand = "${pkgs.coreutils}/bin/cat /run/secrets/email/jhink/password"; mbsync = { enable = true; create = "maildir"; }; notmuch.enable = true; realName = "Jacob Hinkle"; }; }; programs = { bat.enable = true; direnv = { enable = true; nix-direnv.enable = true; enableZshIntegration = true; }; firefox = { enable = true; package = pkgs.firefox.override { cfg = { enableTridactylNative = true; }; }; }; git = { enable = true; userName = "Jacob Hinkle"; userEmail = "jacob@jhink.org"; lfs.enable = true; difftastic = { enable = true; background = "dark"; }; aliases = { ci = "commit"; lg = "log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30"; s = "status"; }; extraConfig = { color.ui = "auto"; init.defaultBranch = "main"; push.default = "simple"; pull.rebase = false; branch.autosetupmerge = true; }; }; htop.enable = true; kitty = { enable = true; font = { name = "Hack"; size = 14; }; }; lazygit.enable = true; mbsync = { enable = true; }; neovim = (import ./neovim.nix) pkgs; notmuch = { enable = true; }; nushell = { enable = true; }; qutebrowser = import ./qutebrowser.nix; rbw = { enable = true; settings.email = "jacob.hinkle@gmail.com"; }; ssh = import ./ssh.nix; tmux = import ./tmux.nix; xmobar = { enable = true; extraConfig = builtins.readFile ./xmobarrc; }; zsh = { enable = true; syntaxHighlighting.enable = true; shellAliases = { lg = "lazygit"; vim = "nvim"; }; sessionVariables = { EDITOR = "nvim"; FZF_DEFAULT_OPTS = "--layout=reverse --inline-info --height=40% --border"; }; oh-my-zsh = { enable = true; plugins = [ "direnv" "git" "sudo" "vi-mode" "fzf" ]; theme = "michelebologna"; # nice clean theme that shows jobs }; initExtra = '' # michelebologna theme doesn't have an RPROMPT, but I like the one from # the clean theme RPROMPT='[%*]' # wrap the fzf command with some killable helpers function vif() { local fname fname=$(fzf) || return vim "$fname" } function fcd() { local dirname dirname=$(find -type d | fzf) || return cd "$dirname" } ''; }; }; services = { betterlockscreen = { enable = true; arguments = [ "--fx ''" # don't apply effects ]; }; dunst = { enable = true; }; flameshot.enable = true; mbsync = { enable = true; verbose = true; }; network-manager-applet.enable = true; spotifyd = { enable = false; settings = { global = { username_cmd = "${pkgs.coreutils}/bin/cat /run/secrets/spotify/username"; password_cmd = "${pkgs.coreutils}/bin/cat /run/secrets/spotify/password"; backend = "pulseaudio"; device = "pipewire"; device_name = "buck"; device_type = "computer"; }; }; }; syncthing = { enable = false; # cause the tray command to wait for the service and tray manager to start extraOptions = [ "--wait" ]; tray.enable = true; }; trayer = { enable = true; settings = { align = "right"; edge = "top"; tint = "black"; transparent = true; # only way i could get color to work widthtype = "percent"; width = "10"; height = "17"; }; }; unclutter = { enable = true; }; }; xsession = { enable = true; windowManager = { i3 = { enable = false; config = import ./i3.nix pkgs; }; xmonad = { enable = true; enableContribAndExtras = true; extraPackages = haskellPackages: with haskellPackages; [ #dbus #List #monad-logger xmonad xmonad-contrib ]; config = ./xmonad.hs; }; }; }; }