From eae706c649944eb02848fbc23300b485d4142b25 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 1 Jun 2026 12:58:15 -0700 Subject: [PATCH] update flake --- flake.nix | 7 +++++++ home.nix | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ shell/.zshrc | 4 +++- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 flake.nix create mode 100644 home.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b7abb44 --- /dev/null +++ b/flake.nix @@ -0,0 +1,7 @@ +{ + description = "matt's dotfiles — Home Manager modules"; + + outputs = { self }: { + homeManagerModules.default = import ./home.nix; + }; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..3091245 --- /dev/null +++ b/home.nix @@ -0,0 +1,50 @@ +{ config, pkgs, lib, ... }: + +{ + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + oh-my-zsh = { + enable = true; + plugins = [ "git" ]; + theme = ""; + }; + + plugins = [ + { + name = "powerlevel10k"; + src = pkgs.zsh-powerlevel10k; + file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; + } + ]; + + initContent = lib.mkMerge [ + (lib.mkOrder 500 '' + [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]] \ + && source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" + '') + (lib.mkOrder 1500 '' + [[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh + + ${builtins.readFile ./shell/.mattrc} + + # work / sensitive overrides (gitignored, not in repo) + [[ -f ~/.allenairc ]] && source ~/.allenairc + [[ -f ~/.wwurc ]] && source ~/.wwurc + + [[ -f ~/.fzf.zsh ]] && source ~/.fzf.zsh + + [[ -d "$HOME/.bun" ]] && { + export BUN_INSTALL="$HOME/.bun" + export PATH="$BUN_INSTALL/bin:$PATH" + [[ -s "$BUN_INSTALL/_bun" ]] && source "$BUN_INSTALL/_bun" + } + + export PATH="/nix/var/nix/profiles/default/bin:$PATH" + '') + ]; + }; +} diff --git a/shell/.zshrc b/shell/.zshrc index ecb5344..f0fa318 100644 --- a/shell/.zshrc +++ b/shell/.zshrc @@ -13,7 +13,7 @@ plugins=(git) # personal rc files [[ -f ~/.mattrc ]] && source ~/.mattrc -[[ -f ~/.musicrc ]] && source ~/.musicrc +# [[ -f ~/.musicrc ]] && source ~/.musicrc # work / sensitive overrides (gitignored, not in repo) [[ -f ~/.allenairc ]] && source ~/.allenairc @@ -28,3 +28,5 @@ plugins=(git) export PATH="$BUN_INSTALL/bin:$PATH" [[ -s "$BUN_INSTALL/_bun" ]] && source "$BUN_INSTALL/_bun" } + +export PATH="/nix/var/nix/profiles/default/bin:$PATH"