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

266 lines
6.5 KiB
Nix

{ inputs, outputs, lib, config, pkgs, ... }:
let
userName = "nate";
fullName = "Nathan Anderson";
email = "n8r@tuta.io";
davinciDesktop = pkgs.makeDesktopItem {
name = "davinci-resolve-studio";
desktopName = "Davinci Resolve Studio";
exec = "${pkgs.davinci-resolve-studio}";
};
in
{
# nixpkgs.overlays = [
# inputs.nur.overlay
# ];
# nixpkgs.config.allowUnfree = true;
# inputs.nixpkgs-stable.config.allowUnfree = true;
imports = [
../apps/firefox/firefox.nix
];
home.username = userName;
home.homeDirectory = "/home/${userName}";
programs.home-manager.enable = true;
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
firefoxApp.enable = true;
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
# nur.repos.crazazy.js.eslint
# inputs.nixpkgs-stable.legacyPackages.x86_64-linux.corectrl
chromium
#
# Dev Tools
#
dbeaver
cargo
helix
# kakoune
# flutter316
docker
docker-compose
jq
python310
nodejs_21
zig
### LSP's
nil # Nix LSP
openscad-lsp
nodePackages.typescript-language-server
vscode-langservers-extracted # provides eslint, markdown, json, css, and html lsp
rubyPackages.solargraph
python310Packages.python-lsp-server
zls
### Misc
# android-udev-rules
# android-tools
# sdkmanager
usbutils
openscad
#
# Gaming
#
amdgpu_top
mangohud
wine-wayland
inputs.nixpkgs-stable.legacyPackages.x86_64-linux.webcord
#
# Better Unix
#
bat
duf
fd
fzf
lsd
ripgrep
tre-command
gtop
htop
neofetch
# Normies
unzip
#
# Photo / Video
#
davinci-resolve-studio
davinciDesktop
imv
mpv
gimp
ffmpeg
tenacity
yt-dlp
#
# Communication
#
mumble
slack
signal-desktop
#
# Other
#
keepassxc
obs-studio
betaflight-configurator
yubioath-flutter
#
# Style
#
catppuccin-kvantum
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
# Install fonts
(nerdfonts.override { fonts = [ "Hermit" "Overpass" ]; })
recursive
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file."${config.xdg.configHome}" = {
source = ../../dotfiles;
recursive = true;
};
# For applying custom styles
# home.file.".mozilla/firefox/default" = {
# source = ../../misc/firefox_styles;
# recursive = true;
# };
# location where stylus data is kept
# /home/nate/.mozilla/firefox/default/storage/default/moz-extension+++77a1d59f-183c-4439-b249-fdae98b7bd7b/idb
home.sessionVariables = {
# MANPAGER="sh -c 'col -bx | bat -l man -p'";
BAT_THEME="Catppuccin Macchiato";
EDITOR = "hx";
XDG_CURRENT_DESKTOP="sway";
};
# Git setup
programs.git = {
enable = true;
userEmail = email;
userName = fullName;
extraConfig = {
include = { path = "${config.xdg.configHome}/macchiato.gitconfig"; };
init = { defaultBranch = "main"; };
pull = { ff = "only"; };
merge = { conflictStyle="zdiff3"; };
push = { autoSetupRemote="true"; };
delta = { features = "Catppuccin Macchiato"; };
};
delta.enable = true;
};
programs = {
direnv = {
enable = true;
enableZshIntegration = true; # see note on other shells below
nix-direnv.enable = true;
};
bash.enable = true; # see note on other shells below
};
# Zsh setup
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "half-life";
};
initExtra = ''
eval "$(direnv hook zsh)"
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent
# fzf_projects() {
# DIR=`
# fd .git --search-path="$HOME/source/" -H --ignore-file ~/.config/fd-ignore -tdirectory | \
# xargs dirname | \
# sed 's|$HOME||g' | \
# sort | \
# uniq | \
# fzf --preview 'ls $HOME/{}/README.md 2>/dev/null && bat $HOME/{}/README.md || printf "No README.md file found in this directory\n%s" {}' --preview-window=top | \
# xargs printf "$HOME/%s/"
# `
# cd $DIR
# }
# alias p="fzf_projects ~/source/"
yt-audio() {
nix-shell -p yt-dlp --run "yt-dlp -x $1 --audio-format mp3"
}
# Better Unix Aliases
# alias ask="nix-shell -p python310Packages.openai --run 'python ~/source/python/chat.py'"
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"
alias adaptiveoff="swaymsg 'output * adaptive_sync off'"
alias adaptiveon="swaymsg 'output * adaptive_sync on'"
'';
};
qt = {
enable = true;
platformTheme = "qtct";
style.name = "kvantum";
};
gtk = {
enable = true;
cursorTheme = {
package = pkgs.catppuccin-cursors.macchiatoLavender;
name = "Catppuccin-Macchiato-Lavender-Cursors";
};
iconTheme = {
package = pkgs.catppuccin-papirus-folders;
name = "Papirus-Dark";
};
theme = {
name = "Catppuccin-Macchiato-Compact-Lavender-Dark";
package = pkgs.catppuccin-gtk.override {
accents = [ "lavender" ];
size = "compact";
tweaks = [ "rimless" ];
variant = "macchiato";
};
};
};
# Symlink in gtk and kvantum theme to ~/.config
xdg.configFile = {
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
"Kvantum/kvantum.kvconfig".text = ''
[General]
theme=Catppuccin-Frappe-Blue
'';
"Kvantum/Catppuccin-Frappe-Blue".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Frappe-Blue";
};
home.file.".icons/default/index.theme".text = ''
[icon theme]
Inherits=Catppuccin-Macchiato-Lavender-Cursors
'';
}