# Ubuntu desktop. User config only. # OS packages and /etc files are handled by ../../ubuntu/bootstrap.sh. { inputs, pkgs, homeConfigurationName, ... } : let homeDirectory = "/home/jmug"; in { imports = [ ../../home-modules/default.nix ../../home-modules/ubuntu.nix ../../home-modules/direnv.nix ../../home-modules/ghostty-config.nix ../../home-modules/git.nix ../../home-modules/herdr.nix ../../home-modules/lazygit.nix ../../home-modules/nvim.nix ../../home-modules/opencode-config.nix ../../home-modules/starship.nix ../../home-modules/zsh.nix inputs.nix-flatpak.homeManagerModules.nix-flatpak ]; # TODO(yubikey): Port the yubikey setup (sops-managed key handles in ~/.ssh, # id_yubikey symlink via udev, ykman/pcscd from apt, yubikey public keys). # See modules/nixos/yubikey and home-modules/sops.nix. nvim = { enable = true; package = pkgs.neovim; # pkgs is already nixpkgs-unstable. }; ghostty = { font-size = "14"; # GNOME needs server-side decorations to move/resize windows. # TODO: Could turn off if moving to niri. window-decoration = true; }; fonts.fontconfig.enable = true; home = { username = "jmug"; inherit homeDirectory; sessionVariables = { EDITOR = "nvim"; }; packages = with pkgs; [ # Fonts (ghostty uses BigBlueTermPlus). nerd-fonts.bigblue-terminal nerd-fonts.fira-code nerd-fonts.caskaydia-cove # Languages / toolchains. The C toolchain (gcc, clang, cmake) comes from # apt so native builds link against the system's libraries. bun rustup nodejs_24 # eas-cli # Cloud / infra. awscli2 google-cloud-sdk flyctl ngrok gh # Secrets. sops age # Serial consoles. minicom picocom tio # Misc CLI. opencode glow pipx watchman exercism fastfetch btop tree bluetui ]; stateVersion = "25.11"; }; # Desktop apps. Installed per-user from flathub on activation. services.flatpak = { enable = true; packages = [ "app.zen_browser.zen" "com.slack.Slack" "com.obsproject.Studio" "org.videolan.VLC" ]; }; programs.ssh = { enable = true; enableDefaultConfig = false; # Keys: ~/.ssh/id_* defaults, served by GNOME's agent. # TODO(yubikey): IdentityFile id_yubikey / id_jmug like hosts/nixbox. settings = { "*" = { AddKeysToAgent = "no"; Compression = false; ServerAliveInterval = 0; ServerAliveCountMax = 3; HashKnownHosts = false; UserKnownHostsFile = "~/.ssh/known_hosts"; ControlMaster = "no"; ControlPath = "~/.ssh/master-%r@%n:%p"; ControlPersist = "no"; }; "github.com" = { User = "git"; AddKeysToAgent = "yes"; }; "code.jmug.me" = { User = "git"; AddKeysToAgent = "yes"; }; homeserver = { User = "jmug"; HostName = "100.122.244.59"; ForwardAgent = true; }; devbox = { User = "jmug"; HostName = "100.102.140.44"; ForwardAgent = true; }; handmade = { User = "jmug"; HostName = "82.180.160.149"; ForwardAgent = true; }; handmade-gitea = { User = "jmug"; HostName = "40.160.241.66"; ForwardAgent = true; }; racknerd = { User = "jmug"; HostName = "155.94.155.137"; AddKeysToAgent = "yes"; ForwardAgent = false; }; beefy = { User = "jmug"; HostName = "100.127.115.24"; AddKeysToAgent = "yes"; ForwardAgent = true; }; mid = { User = "jmug"; HostName = "100.82.115.89"; AddKeysToAgent = "yes"; ForwardAgent = true; }; }; }; programs.zsh.shellAliases = { flakeconf = "nvim ${homeDirectory}/nixos/flake.nix"; homeconf = "nvim ${homeDirectory}/nixos/hosts/ubuntu/home.nix"; nvconf = "nvim ${homeDirectory}/nixos/home-modules/explicit-configs/nvim/init.lua"; rshellconf = "source ${homeDirectory}/.zshrc"; # Home Manager only. homesw = "home-manager switch -b hm-backup --flake ${homeDirectory}/nixos#${homeConfigurationName}"; # apt packages, repos, /etc files, then Home Manager. syssw = "${homeDirectory}/nixos/ubuntu/bootstrap.sh"; }; # mise is installed by `ubuntu/bootstrap.sh tools`. programs.zsh.initContent = '' if [ -x "$HOME/.local/bin/mise" ]; then eval "$("$HOME/.local/bin/mise" activate zsh)" fi ''; programs.home-manager.enable = true; }