{ pkgs, lib, fetchurl, hostname, headless, ... }: let idea = with pkgs; symlinkJoin { name = "idea-ultimate"; paths = [ jetbrains.idea-ultimate ]; buildInputs = [makeWrapper]; postBuild = '' wrapProgram $out/bin/idea-ultimate --prefix PATH : ${symlinkJoin { name = "rust-toolchain"; paths = [rustc cargo rustfmt]; }}/bin ''; }; cliPackages = with pkgs; [ age direnv elixir elixir_ls entr erlang go gopls minisign 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 ]; guiPackages = with pkgs; [ _1password _1password-gui discord feh iosevka idea jellyfin-mpv-shim mpv obsidian pamixer pavucontrol playerctl spotify udiskie wofi 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; 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; }; starship.enable = false; vscode.enable = true; zsh = { enable = true; enableAutosuggestions = true; initExtra = '' if [ -n "$TMUX" ]; then setopt ignoreeof fi eval "$(direnv hook zsh)" ''; oh-my-zsh = { enable = true; plugins = ["git" "fzf"]; theme = "agnoster"; }; }; }; services = { dunst.enable = true; }; }