2026-11-18 22:28:25 -08:00
|
|
|
# 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
|
2026-11-19 17:32:09 -08:00
|
|
|
../../home-modules/niri
|
2026-11-18 22:28:25 -08:00
|
|
|
../../home-modules/nvim.nix
|
|
|
|
|
../../home-modules/opencode-config.nix
|
|
|
|
|
../../home-modules/starship.nix
|
2026-11-19 17:32:09 -08:00
|
|
|
../../home-modules/wallpapers.nix
|
2026-11-18 22:28:25 -08:00
|
|
|
../../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.
|
2026-11-19 17:32:09 -08:00
|
|
|
# TODO: Turn off if dropping GNOME for niri.
|
2026-11-18 22:28:25 -08:00
|
|
|
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";
|
|
|
|
|
};
|
|
|
|
|
|
2026-11-18 23:41:29 -08:00
|
|
|
# Friendlier names for the built-in SoundWire audio (Intel SOF "sof-soundwire"
|
|
|
|
|
# card), which otherwise shows up as "sof-soundwire Speaker" etc.
|
|
|
|
|
# TODO: X1 Carbon Gen 14 specific (harmless elsewhere: rules only match
|
|
|
|
|
# sof_sdw nodes). Move to a per-machine module when another host lands.
|
|
|
|
|
xdg.configFile."wireplumber/wireplumber.conf.d/51-builtin-audio-names.conf".text = ''
|
|
|
|
|
monitor.alsa.rules = [
|
|
|
|
|
{
|
|
|
|
|
matches = [ { device.name = "~alsa_card.*sof_sdw.*" } ]
|
|
|
|
|
actions = { update-props = { device.description = "Built-in Audio", device.nick = "Built-in Audio" } }
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*Speaker.*" } ]
|
|
|
|
|
actions = { update-props = { node.description = "Speakers" } }
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*Headphones.*" } ]
|
|
|
|
|
actions = { update-props = { node.description = "Headphones" } }
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
matches = [ { node.name = "~alsa_input.*sof_sdw.*Mic.*" } ]
|
|
|
|
|
actions = { update-props = { node.description = "Internal Microphones" } }
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI1.*" } ]
|
|
|
|
|
actions = { update-props = { node.description = "HDMI / DisplayPort 1" } }
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI2.*" } ]
|
|
|
|
|
actions = { update-props = { node.description = "HDMI / DisplayPort 2" } }
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI3.*" } ]
|
|
|
|
|
actions = { update-props = { node.description = "HDMI / DisplayPort 3" } }
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
'';
|
|
|
|
|
|
2026-11-18 22:28:25 -08:00
|
|
|
# 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;
|
|
|
|
|
}
|