{ pkgs, lib, fetchurl, hostname, headless, ... }: let cliPackages = with pkgs; [ age direnv elixir_1_17 elixir-ls entr erlang_26 gnumake go gopls jujutsu lua-language-server minisign nb nodejs oh-my-zsh ( let my-python-packages = python-packages: with python-packages; [ tkinter requests ]; python-with-my-packages = python3.withPackages my-python-packages; in python-with-my-packages ) restic rust-analyzer senpai unzip zip zigpkgs."0.14.0" zls ]; guiPackages = with pkgs; [ _1password-cli _1password-gui calibre discord feh fraunces ghostty gimp grim iosevka inkscape # jellyfin-mpv-shim mpv obsidian pamixer pavucontrol playerctl slurp source-code-pro spotify swaylock udiskie wezterm wl-clipboard xclip zathura ]; defaultUser = "daniel"; in { imports = [ ../configs/system ] ++ lib.optionals (!headless) [ ../configs/desktop ] ++ lib.optionals (builtins.pathExists ./host-specific/${hostname}) [ ./host-specific/${hostname} ]; home = { username = defaultUser; homeDirectory = "/home/${defaultUser}"; sessionPath = [ "$HOME/go/bin" ]; file = { ".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/capitaine-cursors"; ".rust".source = pkgs.rustPlatform.rustcSrc; "bin/update" = { source = ../../scripts/update; executable = true; }; "bin/supdate" = { source = ../../scripts/supdate; executable = true; }; }; packages = cliPackages ++ lib.optionals (!headless) guiPackages; keyboard = { layout = "gb"; options = [ "caps:escape" ]; }; stateVersion = "21.05"; }; programs = { # Let Home Manager install and manage itself. home-manager.enable = true; emacs = { enable = true; }; fzf = { enable = true; enableZshIntegration = true; }; git = { enable = true; package = pkgs.gitFull; userName = "Daniel Patterson"; userEmail = "me@danielpatterson.dev"; extraConfig = { pull.rebase = true; init.defaultBranch = "main"; format.signOff = "yes"; sendemail = { smtpUser = "me@danielpatterson.dev"; smtpServer = "smtp.fastmail.com"; smtpEncryption = "tls"; smtpServerPort = 587; }; }; }; lazygit = { enable = true; settings = { gui.theme = { selectedLineBgColor = ["reverse"]; selectedRangeBgColor = ["reverse"]; }; }; }; starship.enable = true; vscode.enable = true; zsh = { enable = true; autosuggestion.enable = true; initExtra = '' eval "$(direnv hook zsh)" ''; oh-my-zsh = { enable = true; plugins = ["git" "fzf"]; theme = "agnoster"; }; }; }; }