Kieran's opinionated (and probably slightly dumb) nix config
1# This is your home-manager configuration file 2# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) 3{ 4 inputs, 5 lib, 6 config, 7 pkgs, 8 ... 9}: { 10 # You can import other home-manager modules here 11 imports = [ 12 # If you want to use home-manager modules from other flakes (such as nix-colors): 13 # inputs.nix-colors.homeManagerModule 14 15 # You can also split up your configuration and import pieces of it here: 16 # ./nvim.nix 17 18 # spicetify 19 inputs.spicetify-nix.homeManagerModules.default 20 21 # catpuccin 22 inputs.catppuccin.homeManagerModules.catppuccin 23 24 # inputs.Hyprnix.homeManagerModules.hyprland 25 26 ./hyprland.nix 27 # ./hyprland 28 29 ./waybar.nix 30 ]; 31 32 nixpkgs = { 33 # Configure your nixpkgs instance 34 config = { 35 # Disable if you don't want unfree packages 36 allowUnfree = true; 37 # Workaround for https://github.com/nix-community/home-manager/issues/2942 38 allowUnfreePredicate = _: true; 39 }; 40 }; 41 42 home = { 43 username = "kierank"; 44 homeDirectory = "/home/kierank"; 45 }; 46 47 # Add stuff for your user as you see fit: 48 # programs.neovim.enable = true; 49 # home.packages = with pkgs; [ steam ]; 50 51 # Enable home-manager and git 52 programs.home-manager.enable = true; 53 54 # catppuccin 55 catppuccin = { 56 enable = true; 57 accent = "green"; 58 flavor = "macchiato"; 59 pointerCursor = { 60 enable = true; 61 accent = "blue"; 62 flavor = "macchiato"; 63 }; 64 }; 65 66 qt = { 67 style.name = "kvantum"; 68 platformTheme.name = "kvantum"; 69 enable = true; 70 }; 71 72 # git config 73 programs.git = { 74 enable = true; 75 userName = "Kieran Klukas"; 76 userEmail = "92754843+kcoderhtml@users.noreply.github.com"; 77 aliases = { 78 c = "commit"; 79 p = "push"; 80 }; 81 extraConfig = { 82 commit.gpgsign = true; 83 gpg.format = "ssh"; 84 gpg.ssh.allowedSignersFile = "~/.ssh/allowedSigners"; 85 user.signingKey = "~/.ssh/id_rsa.pub"; 86 pull.rebase = true; 87 }; 88 }; 89 90 programs.spicetify = 91 let 92 spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; 93 in 94 { 95 enable = true; 96 enabledExtensions = with spicePkgs.extensions; [ 97 adblock 98 hidePodcasts 99 shuffle # shuffle+ (special characters are sanitized out of extension names) 100 ]; 101 theme = spicePkgs.themes.catppuccin; 102 colorScheme = "macchiato"; 103 }; 104 105 programs.starship = { 106 enable = true; 107 enableZshIntegration = true; 108 # Configuration written to ~/.config/starship.toml 109 settings = { 110 add_newline = false; 111 112 # Change command timeout from 500 to 1000 ms 113 command_timeout = 1000; 114 115 format = lib.concatStrings [ 116 "\n" 117 "$env_var" 118 "$all$character" 119 ]; 120 121 character = { 122 success_symbol = "[](bold purple)"; 123 error_symbol = "[](bold red)"; 124 }; 125 126 username = { 127 style_user = "green"; 128 style_root = "red"; 129 format = "[󱄅 $user]($style) "; 130 disabled = false; 131 show_always = true; 132 }; 133 134 hostname = { 135 ssh_only = false; 136 format = "on [$hostname](bold yellow) "; 137 disabled = false; 138 }; 139 140 directory = { 141 truncation_length = 1; 142 truncation_symbol = "/"; 143 home_symbol = " ~"; 144 read_only_style = "197"; 145 read_only = " "; 146 format = "at [$path]($style)[$read_only]($read_only_style) "; 147 }; 148 149 git_branch = { 150 symbol = "󰊢 "; 151 format = "via [$symbol$branch]($style) "; 152 truncation_length = 6; 153 truncation_symbol = "/"; 154 style = "bold green"; 155 }; 156 157 git_status = { 158 format = "[$all_status$ahead_behind]($style) "; 159 style = "bold green"; 160 conflicted = " "; 161 up_to_date = " "; 162 untracked = " "; 163 ahead = "$count "; 164 diverged = "$ahead_count$behind_count "; 165 behind = "$count "; 166 stashed = "󱑿 "; 167 modified = " "; 168 staged = "[++$count ](green)"; 169 renamed = "󱅄 "; 170 deleted = " "; 171 }; 172 173 docker_context = { 174 symbol = " "; 175 disabled = false; 176 }; 177 178 python = { 179 symbol = "󰌠 "; 180 python_binary = "python3"; 181 disabled = false; 182 }; 183 184 nodejs = { 185 symbol = " "; 186 detect_files = ["package.json" ".node-version" "!bunfig.toml" "!bun.lockb"]; 187 disabled = false; 188 }; 189 190 bun = { 191 symbol = "󰟈 "; 192 disabled = false; 193 }; 194 }; 195 }; 196 197 programs.zsh = { 198 enable = true; 199 enableCompletion = true; 200 syntaxHighlighting.enable = true; 201 202 shellAliases = { 203 ll = "ls -l"; 204 la = "ls -la"; 205 update = "sudo nixos-rebuild switch"; 206 gc = "git commit"; 207 gp = "git push"; 208 }; 209 history = { 210 size = 10000; 211 path = "${config.xdg.dataHome}/zsh/history"; 212 }; 213 214 oh-my-zsh = { 215 enable = true; 216 plugins = [ "git" "sudo" "docker" "git" "command-not-found" "colored-man-pages" ]; 217 }; 218 219 plugins = [ 220 { 221 # will source zsh-autosuggestions.plugin.zsh 222 name = "zsh-autosuggestions"; 223 src = pkgs.fetchFromGitHub { 224 owner = "zsh-users"; 225 repo = "zsh-autosuggestions"; 226 rev = "v0.7.0"; 227 sha256 = "sha256-KLUYpUu4DHRumQZ3w59m9aTW6TBKMCXl2UcKi4uMd7w="; 228 }; 229 } 230 { 231 # will source zsh-sytax-highlighting 232 name = "zsh-sytax-highlighting"; 233 src = pkgs.fetchFromGitHub { 234 owner = "zsh-users"; 235 repo = "zsh-syntax-highlighting"; 236 rev = "0.8.0"; 237 sha256 = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo="; 238 }; 239 } 240 ]; 241 }; 242 243 # alacritty 244 programs.alacritty = { 245 enable = true; 246 settings = { 247 live_config_reload = true; 248 cursor = { 249 unfocused_hollow = true; 250 style = { 251 blinking = "On"; 252 }; 253 }; 254 window = { 255 opacity = 0.75; 256 padding = { 257 x = 12; 258 y = 12; 259 }; 260 }; 261 font = { 262 size = 13; 263 normal = { 264 family = "JetBrainsMono Nerd Font"; 265 }; 266 }; 267 colors = { 268 primary = { 269 background = lib.mkForce "#1E2128"; 270 }; 271 }; 272 }; 273 }; 274 275 services.mako = { 276 enable = true; 277 defaultTimeout = 4000; 278 margin = "58,6"; 279 font = "Fira Sans 12"; 280 borderRadius = 5; 281 }; 282 283 # Nicely reload system units when changing configs 284 systemd.user.startServices = "sd-switch"; 285 286 # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion 287 home.stateVersion = "23.05"; 288}