nixos/jaci/modules/home-manager/home.nix

261 lines
5.9 KiB
Nix

{ inputs, config, pkgs, lib, unstablePkgs, ... }:
let
userName = "jaci";
fullName = "Jaci Anderson";
email = "jaci.s.anderson@gmail.com";
in
{
imports = [
../../../shared/modules/apps/firefox/firefox.nix
../../../shared/modules/home-manager/git-autosync.nix
../niri/niri_home.nix
./programs.nix
];
home.username = userName;
home.homeDirectory = "/home/${userName}";
programs.home-manager.enable = true;
home.stateVersion = "23.11"; # Please read the comment before changing.
firefoxApp.enable = true;
fonts.fontconfig.enable = true;
# Stylix auto-theming - applies to all programs.<name>.enable apps
stylix.autoEnable = true;
# Enable niri home configuration
nirihome = {
enable = true;
homePackages = [ ];
};
# Additional user packages
# Note: Programs with Stylix theming are in programs.nix
home.packages = with pkgs; [
#
# Dev Tools
#
jq
python3
unstablePkgs.claude-code
unstablePkgs.opencode
### LSP's
nil
nodePackages_latest.bash-language-server
vscode-langservers-extracted # provides eslint, markdown, json, css, html lsp
python313Packages.python-lsp-server
#
# Gaming
#
mangohud
wine-wayland
webcord
mumble
#
# Unix tools
#
duf
dust
fd
lsd
ripgrep
tre-command
gtop
htop
neofetch
unzip
gnupg
pinentry-tty
#
# Photo / Video
#
imv
ffmpeg
yt-dlp
gimp
#
# Other
#
keepassxc
#
# Style
#
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
# Additional fonts (main fonts managed by Stylix)
unstablePkgs.nerd-fonts.hurmit
unstablePkgs.nerd-fonts.overpass
recursive
];
#
# Dotfiles
#
# Static symlinks
home.file = lib.mkMerge [
# Shared dotfiles
(let
sharedDotfilesPath = ../../../shared/dotfiles;
in
if builtins.pathExists sharedDotfilesPath then
builtins.listToAttrs (map (name: {
name = "${config.xdg.configHome}/${name}";
value = { source = lib.mkDefault (sharedDotfilesPath + "/${name}"); };
}) (builtins.attrNames (builtins.readDir sharedDotfilesPath)))
else {})
# Add local dotfiles, overriding from local over shared
(let
localDotfilesPath = ../../dotfiles;
in
if builtins.pathExists localDotfilesPath && builtins.readDir localDotfilesPath != {} then
builtins.listToAttrs (map (name: {
name = "${config.xdg.configHome}/${name}";
value = { source = localDotfilesPath + "/${name}"; };
}) (builtins.attrNames (builtins.readDir localDotfilesPath)))
else {})
];
# Active symlinks for live-edited config
xdg.configFile = {
"niri".source = config.lib.file.mkOutOfStoreSymlink "/home/${userName}/nixos/jaci/linked-dotfiles/niri";
};
# Override Flatpak Steam to disable GPU acceleration (fixes black window on Niri)
xdg.desktopEntries."com.valvesoftware.Steam" = {
name = "Steam";
exec = "flatpak run com.valvesoftware.Steam -cef-disable-gpu %U";
icon = "steam";
terminal = false;
categories = [ "Game" ];
mimeType = [ "x-scheme-handler/steam" "x-scheme-handler/steamlink" ];
};
home.sessionVariables = {
EDITOR = "hx";
# For electron apps
NIXOS_OZONE_WL = "1";
};
# Git setup
programs.git = {
enable = true;
settings = {
user.name = fullName;
user.email = email;
init = { defaultBranch = "main"; };
pull = { ff = "only"; };
merge = { conflictStyle = "zdiff3"; };
push = { autoSetupRemote = "true"; };
};
};
programs = {
direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
bash.enable = true;
delta = {
enable = true;
enableGitIntegration = true;
};
};
# enable saving ssh secrets (needed for private repos)
services.gnome-keyring.enable = true;
services.gnome-keyring.components = [ "ssh" "secrets" ];
# Zsh setup
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "half-life";
};
initContent = ''
# History
HISTSIZE=10000
SAVEHIST=10000
setopt SHARE_HISTORY
setopt APPEND_HISTORY
# integrate ssh-agent from gnome keyring
export SSH_AUTH_SOCK=/run/user/$UID/gcr/ssh
eval "$(direnv hook zsh)"
yt-audio() {
nix-shell -p yt-dlp --run "yt-dlp -x $1 --audio-format mp3"
}
# Better Unix Aliases
alias ls="lsd"
alias l="lsd --almost-all --long"
alias llm="lsd --timesort --long"
alias lS="lsd --oneline --classic"
alias lt="lsd --tree --depth=2"
alias grep="rg"
alias cat="bat --paging=never"
alias rm="rm -i"
'';
profileExtra = ''
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share
'';
syntaxHighlighting = {
enable = true;
};
};
# Stylix handles Qt and GTK theming
services.wlsunset = {
enable = true;
sunrise = "07:00";
sunset = "17:00";
temperature.night = 3500;
};
services.kdeconnect = {
enable = true;
indicator = true;
};
# Enable bluetooth headphone controls
services.mpris-proxy.enable = true;
# SwayOSD - on-screen display for volume, brightness, caps lock
services.swayosd = {
enable = true;
topMargin = 0.9;
};
# SwayNC - notification center (Stylix auto-themes this)
services.swaync = {
enable = true;
settings = {
positionX = "center";
positionY = "top";
notification-window-width = 800;
};
};
# Git autosync for Documents
services.git-autosync = {
enable = true;
repos.documents = {
path = "/home/${userName}/Documents";
gitName = fullName;
gitEmail = email;
};
};
}