My NixOS configuration (mirror)

feat: granularize home-manager modules (#6)

* chore: reorganize home-manager modules to subdirectories
* feat: successfully broke out options for all home-manager modules
* home: cleaned up modules with imports and configs
* feat: broke down shell / wayland modules further
* chore: cleaned up scripts directory

authored by

Matthew Hrehirchuk and committed by
GitHub
cd2d121c 1fc29b75

+622 -446
+1 -1
flake.nix
··· 49 49 modules 50 50 ++ [ 51 51 home-manager.nixosModules.home-manager 52 + ./home 52 53 { 53 54 environment.systemPackages = [ 54 55 ghostty.packages.${system}.default ··· 58 59 useGlobalPkgs = true; 59 60 useUserPackages = true; 60 61 extraSpecialArgs = {inherit inputs hostname;}; 61 - users.matthew_hre = import ./home/default.nix; 62 62 }; 63 63 } 64 64 ];
-8
home/bat.nix
··· 1 - { 2 - programs.bat = { 3 - enable = true; 4 - config = { 5 - theme = "Dracula"; 6 - }; 7 - }; 8 - }
-25
home/btop.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - ... 5 - }: { 6 - programs.btop = { 7 - enable = true; 8 - package = pkgs.btop.overrideAttrs (old: rec { 9 - buildInputs = (old.buildInputs or []) ++ [pkgs.rocmPackages.rocm-smi]; 10 - postFixup = lib.concatStringsSep "\n" [ 11 - (old.postFixup or "") 12 - '' 13 - patchelf --add-rpath ${lib.getLib pkgs.rocmPackages.rocm-smi}/lib \ 14 - $out/bin/btop 15 - '' 16 - ]; 17 - }); 18 - 19 - settings = { 20 - color_theme = "Dracula"; 21 - theme_background = false; 22 - selected_gpus = "0"; 23 - }; 24 - }; 25 - }
+14
home/configs/bat.nix
··· 1 + { 2 + osConfig, 3 + lib, 4 + ... 5 + }: { 6 + config = lib.mkIf osConfig.users.matthew_hre.configs.bat { 7 + programs.bat = { 8 + enable = true; 9 + config = { 10 + theme = "Dracula"; 11 + }; 12 + }; 13 + }; 14 + }
+28
home/configs/btop.nix
··· 1 + { 2 + osConfig, 3 + pkgs, 4 + lib, 5 + ... 6 + }: { 7 + config = lib.mkIf osConfig.users.matthew_hre.configs.btop { 8 + programs.btop = { 9 + enable = true; 10 + package = pkgs.btop.overrideAttrs (old: rec { 11 + buildInputs = (old.buildInputs or []) ++ [pkgs.rocmPackages.rocm-smi]; 12 + postFixup = lib.concatStringsSep "\n" [ 13 + (old.postFixup or "") 14 + '' 15 + patchelf --add-rpath ${lib.getLib pkgs.rocmPackages.rocm-smi}/lib \ 16 + $out/bin/btop 17 + '' 18 + ]; 19 + }); 20 + 21 + settings = { 22 + color_theme = "Dracula"; 23 + theme_background = false; 24 + selected_gpus = "0"; 25 + }; 26 + }; 27 + }; 28 + }
+21
home/configs/direnv.nix
··· 1 + { 2 + osConfig, 3 + lib, 4 + ... 5 + }: { 6 + config = lib.mkIf osConfig.users.matthew_hre.configs.direnv { 7 + programs.direnv = { 8 + enable = true; 9 + nix-direnv.enable = true; 10 + config = { 11 + global = { 12 + disable_stdin = true; 13 + hide_env_diff = true; 14 + warn_timeout = "0ms"; 15 + }; 16 + }; 17 + }; 18 + 19 + programs.git.ignores = [".direnv/"]; 20 + }; 21 + }
+78
home/configs/fastfetch/default.nix
··· 1 + { 2 + osConfig, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + config = lib.mkIf osConfig.users.matthew_hre.configs.fastfetch { 8 + programs.fastfetch = { 9 + enable = true; 10 + package = pkgs.fastfetch; 11 + 12 + settings = { 13 + "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; 14 + logo = { 15 + source = "/home/matthew_hre/nix-config/home/fastfetch/logo_nix.txt"; 16 + color = { 17 + "1" = "blue"; 18 + }; 19 + padding = { 20 + top = 1; 21 + }; 22 + }; 23 + display = { 24 + color = { 25 + keys = "green"; 26 + title = "blue"; 27 + }; 28 + percent = { 29 + type = 9; 30 + }; 31 + separator = " "; 32 + }; 33 + modules = [ 34 + { 35 + type = "title"; 36 + format = " "; 37 + } 38 + { 39 + type = "title"; 40 + format = "{user-name-colored}{at-symbol-colored}{host-name-colored}"; 41 + } 42 + { 43 + type = "os"; 44 + key = "os "; 45 + format = "{3}"; 46 + keyColor = "green"; 47 + } 48 + { 49 + type = "host"; 50 + key = "host "; 51 + format = "{0}"; 52 + keyColor = "green"; 53 + } 54 + { 55 + type = "kernel"; 56 + key = "kernel "; 57 + keyColor = "green"; 58 + } 59 + { 60 + type = "uptime"; 61 + key = "uptime "; 62 + keyColor = "green"; 63 + } 64 + { 65 + type = "packages"; 66 + key = "pkgs "; 67 + keyColor = "green"; 68 + } 69 + { 70 + type = "memory"; 71 + key = "memory "; 72 + keyColor = "green"; 73 + } 74 + ]; 75 + }; 76 + }; 77 + }; 78 + }
+34
home/configs/fuzzel.nix
··· 1 + { 2 + osConfig, 3 + lib, 4 + ... 5 + }: { 6 + config = lib.mkIf osConfig.users.matthew_hre.configs.fuzzel { 7 + programs.fuzzel = { 8 + enable = true; 9 + settings = { 10 + main = { 11 + width = 40; 12 + lines = 8; 13 + line-height = 30; 14 + icon-theme = "Papirus"; 15 + prompt = ''" "''; 16 + font = "FiraCode Nerd Font:size=14"; 17 + }; 18 + colors = { 19 + background = "282A36FF"; 20 + text = "f8f8f2ff"; 21 + match = "8be9fdff"; 22 + selection-match = "8be9fdff"; 23 + selection = "BD93F9FF"; 24 + selection-text = "282A36ff"; 25 + border = "44475Aff"; 26 + }; 27 + border = { 28 + width = 2; 29 + radius = 20; 30 + }; 31 + }; 32 + }; 33 + }; 34 + }
+28
home/configs/garbage.nix
··· 1 + { 2 + osConfig, 3 + inputs, 4 + lib, 5 + ... 6 + }: 7 + lib.optionalAttrs osConfig.users.matthew_hre.configs.garbage { 8 + imports = [ 9 + inputs.dustpan.homeManagerModules.dustpan 10 + ]; 11 + 12 + config = { 13 + nix = { 14 + gc = { 15 + automatic = true; 16 + dates = "monthly"; 17 + }; 18 + }; 19 + 20 + services.dustpan = { 21 + enable = true; 22 + roots = ["$HOME/Projects"]; 23 + targets = ["node_modules" ".next" ".zig-cache"]; 24 + olderThanDays = 14; 25 + frequency = "weekly"; 26 + }; 27 + }; 28 + }
+44
home/configs/git.nix
··· 1 + { 2 + osConfig, 3 + lib, 4 + ... 5 + }: { 6 + config = lib.mkIf osConfig.users.matthew_hre.configs.git { 7 + programs.git = { 8 + enable = true; 9 + userName = "Matthew Hrehirchuk"; 10 + userEmail = "matthew_hre@outlook.com"; 11 + 12 + extraConfig = { 13 + include = { 14 + path = "/home/matthew_hre/.config/git/themes.gitconfig"; 15 + }; 16 + core = {pager = "bat";}; 17 + blame = {pager = "bat";}; 18 + delta = { 19 + features = "line-numbers decorations"; 20 + hyperlinks = true; 21 + syntax-theme = "Dracula"; 22 + plus-style = ''syntax "#003800"''; 23 + minus-style = ''syntax "#3f0001"''; 24 + }; 25 + url."git@github.com" = { 26 + insteadOf = "gh"; 27 + }; 28 + url."git@github.com:matthew-hre/" = { 29 + insteadOf = "mh:"; 30 + }; 31 + }; 32 + }; 33 + 34 + programs.jujutsu = { 35 + enable = true; 36 + settings = { 37 + user = { 38 + name = "Matthew Hrehirchuk"; 39 + email = "matthew_hre@outlook.com"; 40 + }; 41 + }; 42 + }; 43 + }; 44 + }
+16
home/configs/ssh.nix
··· 1 + { 2 + osConfig, 3 + lib, 4 + ... 5 + }: { 6 + config = 7 + lib.mkIf osConfig.users.matthew_hre.configs.ssh { 8 + programs.ssh = { 9 + enable = true; 10 + extraConfig = " 11 + Host * 12 + IdentityAgent ~/.1password/agent.sock 13 + "; 14 + }; 15 + }; 16 + }
+102 -64
home/default.nix
··· 1 1 { 2 - pkgs, 3 - hostname, 2 + config, 4 3 lib, 5 - inputs, 4 + pkgs, 6 5 ... 7 - }: let 8 - toad = hostname == "toad"; 9 - in { 10 - imports = 11 - [ 12 - ./bat.nix 13 - ./btop.nix 14 - ./direnv.nix 15 - ./fastfetch 16 - ./fuzzel.nix 17 - ./git.nix 18 - ./helix.nix 19 - ./shell 20 - ./ssh.nix 21 - ./nvf 22 - ./vicinae.nix 23 - ] 24 - ++ lib.optional toad ./wayland; 6 + }: { 7 + options.users.matthew_hre = { 8 + enable = lib.mkEnableOption "enable user config"; 25 9 26 - home.username = "matthew_hre"; 27 - home.homeDirectory = "/home/matthew_hre"; 10 + packages = lib.mkOption { 11 + description = "list of packages to install"; 12 + type = lib.types.listOf lib.types.package; 13 + default = []; 14 + }; 28 15 29 - home.packages = with pkgs; [ 30 - zip 31 - xz 32 - unzip 33 - p7zip 16 + configs = { 17 + bat = lib.mkEnableOption "enable bat configuration"; 18 + btop = lib.mkEnableOption "enable btop configuration"; 19 + direnv = lib.mkEnableOption "enable direnv configuration"; 20 + fastfetch = lib.mkEnableOption "enable fastfetch configuration"; 21 + fuzzel = lib.mkEnableOption "enable fuzzel configuration"; 22 + garbage = lib.mkEnableOption "enable garbage configuration"; 23 + git = lib.mkEnableOption "enable git configuration"; 24 + ssh = lib.mkEnableOption "enable ssh configuration"; 25 + vicinae = lib.mkEnableOption "enable vicinae configuration"; 26 + helix = lib.mkEnableOption "enable helix configuration"; 27 + nvf = lib.mkEnableOption "enable nvf (neovim) configuration"; 34 28 35 - ripgrep 36 - eza 37 - fd 29 + shell = { 30 + enable = lib.mkEnableOption "enable shell configuration"; 31 + fish = lib.mkEnableOption "enable fish shell configuration"; 32 + ghostty = lib.mkEnableOption "enable ghostty terminal configuration"; 33 + }; 38 34 39 - television 40 - 41 - gh 42 - lazygit 43 - lazydocker 44 - 45 - alejandra 46 - nix-output-monitor 35 + wayland = { 36 + enable = lib.mkEnableOption "enable wayland configuration"; 37 + dunst = lib.mkEnableOption "enable dunst notification daemon"; 38 + gtk = lib.mkEnableOption "enable gtk configuration"; 39 + hypridle = lib.mkEnableOption "enable hypridle configuration"; 40 + hyprlock = lib.mkEnableOption "enable hyprlock configuration"; 41 + niri = lib.mkEnableOption "enable niri window manager"; 42 + waybar = lib.mkEnableOption "enable waybar configuration"; 43 + wlsunset = lib.mkEnableOption "enable wlsunset (blue light filter)"; 44 + }; 45 + }; 46 + }; 47 47 48 - glow 48 + config = lib.mkIf config.users.matthew_hre.enable { 49 + users.users.matthew_hre = { 50 + isNormalUser = true; 51 + home = "/home/matthew_hre"; 52 + description = "Matthew Hrehirchuk"; 53 + extraGroups = ["wheel" "networkmanager" "docker" "wireshark"]; 54 + shell = pkgs.fish; 55 + }; 49 56 50 - strace 51 - ltrace 52 - pciutils 53 - usbutils 57 + users.defaultUserShell = pkgs.fish; 54 58 55 - xclip 59 + home-manager.users.matthew_hre = { 60 + imports = [ 61 + ./configs/bat.nix 62 + ./configs/btop.nix 63 + ./configs/direnv.nix 64 + ./configs/fastfetch 65 + ./configs/fuzzel.nix 66 + ./configs/garbage.nix 67 + ./configs/git.nix 68 + ./configs/ssh.nix 69 + ./configs/vicinae.nix 70 + ./editors/helix 71 + ./editors/nvf 72 + ./shell 73 + ./wayland 74 + ]; 56 75 57 - wireshark 58 - ]; 76 + home = { 77 + username = "matthew_hre"; 78 + homeDirectory = "/home/matthew_hre"; 79 + stateVersion = "23.11"; 59 80 60 - home.sessionVariables = { 61 - QT_QPA_PLATFORM = "wayland"; 62 - SDL_VIDEODRIVER = "wayland"; 63 - XDG_SESSION_TYPE = "wayland"; 64 - }; 81 + packages = with pkgs; 82 + [ 83 + zip 84 + xz 85 + unzip 86 + p7zip 87 + ripgrep 88 + eza 89 + fd 90 + television 91 + gh 92 + lazygit 93 + lazydocker 94 + alejandra 95 + nix-output-monitor 96 + glow 97 + strace 98 + ltrace 99 + pciutils 100 + usbutils 101 + xclip 102 + wireshark 103 + ] 104 + ++ config.users.matthew_hre.packages; 65 105 66 - programs.vscode.enable = true; 106 + sessionVariables = { 107 + QT_QPA_PLATFORM = "wayland"; 108 + SDL_VIDEODRIVER = "wayland"; 109 + XDG_SESSION_TYPE = "wayland"; 110 + }; 111 + }; 67 112 68 - # This value determines the home Manager release that your 69 - # configuration is compatible with. This helps avoid breakage 70 - # when a new home Manager release introduces backwards 71 - # incompatible changes. 72 - # 73 - # You can update home Manager without changing this value. See 74 - # the home Manager release notes for a list of state version 75 - # changes in each release. 76 - home.stateVersion = "23.11"; 113 + programs.vscode.enable = true; 77 114 78 - # Let home Manager install and manage itself. 79 - programs.home-manager.enable = true; 115 + programs.home-manager.enable = true; 116 + }; 117 + }; 80 118 }
-15
home/direnv.nix
··· 1 - { 2 - programs.direnv = { 3 - enable = true; 4 - nix-direnv.enable = true; 5 - config = { 6 - global = { 7 - disable_stdin = true; 8 - hide_env_diff = true; 9 - warn_timeout = "0ms"; 10 - }; 11 - }; 12 - }; 13 - 14 - programs.git.ignores = [".direnv/"]; 15 - }
+31
home/editors/helix/default.nix
··· 1 + { 2 + osConfig, 3 + lib, 4 + ... 5 + }: { 6 + config = lib.mkIf osConfig.users.matthew_hre.configs.helix { 7 + programs.helix = { 8 + enable = true; 9 + settings = { 10 + theme = "dracula"; 11 + editor = { 12 + color-modes = true; 13 + cursorline = true; 14 + cursor-shape = { 15 + insert = "bar"; 16 + normal = "block"; 17 + select = "underline"; 18 + }; 19 + undercurl = true; 20 + true-color = true; 21 + lsp = { 22 + display-messages = true; 23 + display-inlay-hints = true; 24 + }; 25 + auto-pairs = true; 26 + clipboard-provider = "wayland"; 27 + }; 28 + }; 29 + }; 30 + }; 31 + }
+74
home/editors/nvf/default.nix
··· 1 + { 2 + osConfig, 3 + inputs, 4 + lib, 5 + ... 6 + }: 7 + lib.optionalAttrs osConfig.users.matthew_hre.configs.nvf { 8 + imports = [ 9 + inputs.nvf.homeManagerModules.default 10 + 11 + ./languages.nix 12 + ]; 13 + 14 + config = { 15 + programs.nvf = { 16 + enable = true; 17 + 18 + settings.vim = { 19 + viAlias = true; 20 + vimAlias = true; 21 + 22 + syntaxHighlighting = true; 23 + options = { 24 + tabstop = 2; 25 + shiftwidth = 2; 26 + }; 27 + preventJunkFiles = true; 28 + 29 + clipboard.providers.wl-copy.enable = true; 30 + 31 + keymaps = [ 32 + { 33 + mode = "!"; 34 + key = "<C-l>"; 35 + action = "<c-g>u<Esc>[s1z=`]a<c-g>u"; 36 + } 37 + ]; 38 + 39 + binds.cheatsheet.enable = true; 40 + binds.whichKey.enable = true; 41 + 42 + lsp = { 43 + enable = true; 44 + formatOnSave = true; 45 + }; 46 + 47 + theme = { 48 + enable = true; 49 + name = "dracula"; 50 + }; 51 + 52 + statusline.lualine = { 53 + enable = true; 54 + globalStatus = true; 55 + icons.enable = true; 56 + }; 57 + 58 + telescope.enable = true; 59 + presence.neocord.enable = true; 60 + 61 + autocomplete = { 62 + enableSharedCmpSources = true; 63 + blink-cmp.enable = true; 64 + }; 65 + 66 + ui.noice.enable = true; 67 + 68 + ui.borders.plugins.which-key.style = "solid"; 69 + 70 + visuals.nvim-web-devicons.enable = true; 71 + }; 72 + }; 73 + }; 74 + }
-71
home/fastfetch/default.nix
··· 1 - {pkgs, ...}: { 2 - programs.fastfetch = { 3 - enable = true; 4 - package = pkgs.fastfetch; 5 - 6 - settings = { 7 - "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; 8 - logo = { 9 - source = "/home/matthew_hre/nix-config/home/fastfetch/logo_nix.txt"; 10 - color = { 11 - "1" = "blue"; 12 - }; 13 - padding = { 14 - top = 1; 15 - }; 16 - }; 17 - display = { 18 - color = { 19 - keys = "green"; 20 - title = "blue"; 21 - }; 22 - percent = { 23 - type = 9; 24 - }; 25 - separator = " "; 26 - }; 27 - modules = [ 28 - { 29 - type = "title"; 30 - format = " "; 31 - } 32 - { 33 - type = "title"; 34 - format = "{user-name-colored}{at-symbol-colored}{host-name-colored}"; 35 - } 36 - { 37 - type = "os"; 38 - key = "os "; 39 - format = "{3}"; 40 - keyColor = "green"; 41 - } 42 - { 43 - type = "host"; 44 - key = "host "; 45 - format = "{0}"; 46 - keyColor = "green"; 47 - } 48 - { 49 - type = "kernel"; 50 - key = "kernel "; 51 - keyColor = "green"; 52 - } 53 - { 54 - type = "uptime"; 55 - key = "uptime "; 56 - keyColor = "green"; 57 - } 58 - { 59 - type = "packages"; 60 - key = "pkgs "; 61 - keyColor = "green"; 62 - } 63 - { 64 - type = "memory"; 65 - key = "memory "; 66 - keyColor = "green"; 67 - } 68 - ]; 69 - }; 70 - }; 71 - }
home/fastfetch/logo_nix.txt home/configs/fastfetch/logo_nix.txt
-28
home/fuzzel.nix
··· 1 - { 2 - programs.fuzzel = { 3 - enable = true; 4 - settings = { 5 - main = { 6 - width = 40; 7 - lines = 8; 8 - line-height = 30; 9 - icon-theme = "Papirus"; 10 - prompt = ''" "''; 11 - font = "FiraCode Nerd Font:size=14"; 12 - }; 13 - colors = { 14 - background = "282A36FF"; 15 - text = "f8f8f2ff"; 16 - match = "8be9fdff"; 17 - selection-match = "8be9fdff"; 18 - selection = "BD93F9FF"; 19 - selection-text = "282A36ff"; 20 - border = "44475Aff"; 21 - }; 22 - border = { 23 - width = 2; 24 - radius = 20; 25 - }; 26 - }; 27 - }; 28 - }
-20
home/garbage.nix
··· 1 - {imports, ...}: { 2 - imports = [ 3 - inputs.dustpan.homeManagerModules.dustpan 4 - ]; 5 - 6 - nix = { 7 - gc = { 8 - automatic = true; 9 - dates = "monthly"; 10 - }; 11 - }; 12 - 13 - services.dustpan = { 14 - enable = true; 15 - roots = ["$HOME/Projects"]; 16 - targets = ["node_modules" ".next" ".zig-cache"]; 17 - olderThanDays = 14; 18 - frequency = "weekly"; 19 - }; 20 - }
-38
home/git.nix
··· 1 - { 2 - programs.git = { 3 - enable = true; 4 - userName = "Matthew Hrehirchuk"; 5 - userEmail = "matthew_hre@outlook.com"; 6 - 7 - extraConfig = { 8 - include = { 9 - path = "/home/matthew_hre/.config/git/themes.gitconfig"; 10 - }; 11 - core = {pager = "bat";}; 12 - blame = {pager = "bat";}; 13 - delta = { 14 - features = "line-numbers decorations"; 15 - hyperlinks = true; 16 - syntax-theme = "Dracula"; 17 - plus-style = ''syntax "#003800"''; 18 - minus-style = ''syntax "#3f0001"''; 19 - }; 20 - url."git@github.com" = { 21 - insteadOf = "gh"; 22 - }; 23 - url."git@github.com:matthew-hre/" = { 24 - insteadOf = "mh:"; 25 - }; 26 - }; 27 - }; 28 - 29 - programs.jujutsu = { 30 - enable = true; 31 - settings = { 32 - user = { 33 - name = "Matthew Hrehirchuk"; 34 - email = "matthew_hre@outlook.com"; 35 - }; 36 - }; 37 - }; 38 - }
-25
home/helix.nix
··· 1 - { 2 - programs.helix = { 3 - enable = true; 4 - settings = { 5 - theme = "dracula"; 6 - editor = { 7 - color-modes = true; 8 - cursorline = true; 9 - cursor-shape = { 10 - insert = "bar"; 11 - normal = "block"; 12 - select = "underline"; 13 - }; 14 - undercurl = true; 15 - true-color = true; 16 - lsp = { 17 - display-messages = true; 18 - display-inlay-hints = true; 19 - }; 20 - auto-pairs = true; 21 - clipboard-provider = "wayland"; 22 - }; 23 - }; 24 - }; 25 - }
-66
home/nvf/default.nix
··· 1 - {inputs, ...}: { 2 - imports = [ 3 - inputs.nvf.homeManagerModules.default 4 - 5 - ./languages.nix 6 - ]; 7 - 8 - programs.nvf = { 9 - enable = true; 10 - 11 - settings.vim = { 12 - viAlias = true; 13 - vimAlias = true; 14 - 15 - syntaxHighlighting = true; 16 - options = { 17 - tabstop = 2; 18 - shiftwidth = 2; 19 - }; 20 - preventJunkFiles = true; 21 - 22 - clipboard.providers.wl-copy.enable = true; 23 - 24 - keymaps = [ 25 - { 26 - mode = "!"; 27 - key = "<C-l>"; 28 - action = "<c-g>u<Esc>[s1z=`]a<c-g>u"; 29 - } 30 - ]; 31 - 32 - binds.cheatsheet.enable = true; 33 - binds.whichKey.enable = true; 34 - 35 - lsp = { 36 - enable = true; 37 - formatOnSave = true; 38 - }; 39 - 40 - theme = { 41 - enable = true; 42 - name = "dracula"; 43 - }; 44 - 45 - statusline.lualine = { 46 - enable = true; 47 - globalStatus = true; 48 - icons.enable = true; 49 - }; 50 - 51 - telescope.enable = true; 52 - presence.neocord.enable = true; 53 - 54 - autocomplete = { 55 - enableSharedCmpSources = true; 56 - blink-cmp.enable = true; 57 - }; 58 - 59 - ui.noice.enable = true; 60 - 61 - ui.borders.plugins.which-key.style = "solid"; 62 - 63 - visuals.nvim-web-devicons.enable = true; 64 - }; 65 - }; 66 - }
home/nvf/languages.nix home/editors/nvf/languages.nix
+22 -14
home/shell/default.nix
··· 1 - {...}: { 2 - imports = [ 3 - ./fish.nix 4 - ./ghostty.nix 5 - ]; 1 + { 2 + osConfig, 3 + lib, 4 + ... 5 + }: let 6 + cfg = osConfig.users.matthew_hre.configs.shell; 7 + in 8 + lib.optionalAttrs cfg.enable { 9 + imports = 10 + lib.optional cfg.fish ./fish.nix 11 + ++ lib.optional cfg.ghostty ./ghostty.nix; 6 12 7 - home.sessionVariables = { 8 - EDITOR = "nvim"; 9 - BROWSER = "firefox"; 10 - TERMINAL = "kitty"; 13 + config = { 14 + home.sessionVariables = { 15 + EDITOR = "nvim"; 16 + BROWSER = "firefox"; 17 + TERMINAL = "kitty"; 11 18 12 - DELTA_PAGER = "less -R"; 19 + DELTA_PAGER = "less -R"; 13 20 14 - MANPAGER = "sh -c 'col -bx | bat -l man -p'"; 15 - MANROFFOPT = "-c"; 16 - }; 17 - } 21 + MANPAGER = "sh -c 'col -bx | bat -l man -p'"; 22 + MANROFFOPT = "-c"; 23 + }; 24 + }; 25 + }
-9
home/ssh.nix
··· 1 - { 2 - programs.ssh = { 3 - enable = true; 4 - extraConfig = " 5 - Host * 6 - IdentityAgent ~/.1password/agent.sock 7 - "; 8 - }; 9 - }
+7 -1
home/vicinae.nix home/configs/vicinae.nix
··· 1 - {inputs, ...}: { 1 + { 2 + osConfig, 3 + inputs, 4 + lib, 5 + ... 6 + }: 7 + lib.optionalAttrs osConfig.users.matthew_hre.configs.vicinae { 2 8 imports = [ 3 9 inputs.vicinae.homeManagerModules.default 4 10 ];
+33 -33
home/wayland/default.nix
··· 1 1 { 2 2 inputs, 3 + lib, 4 + osConfig, 3 5 pkgs, 4 6 ... 5 - }: { 6 - imports = [ 7 - inputs.niri.homeModules.niri 8 - 9 - ./dunst 10 - ./gtk.nix 11 - ./hypridle 12 - ./hyprlock 13 - ./niri 14 - ./waybar 15 - ]; 16 - 17 - home.packages = with pkgs; [ 18 - amberol 19 - (celluloid.override {youtubeSupport = true;}) 20 - file-roller 21 - loupe 22 - nautilus 23 - pwvucontrol 7 + }: let 8 + cfg = osConfig.users.matthew_hre.configs.wayland; 9 + in 10 + lib.optionalAttrs cfg.enable { 11 + imports = 12 + lib.optional cfg.niri inputs.niri.homeModules.niri 13 + ++ lib.optional cfg.dunst ./dunst 14 + ++ lib.optional cfg.gtk ./gtk 15 + ++ lib.optional cfg.hypridle ./hypridle 16 + ++ lib.optional cfg.hyprlock ./hyprlock 17 + ++ lib.optional cfg.niri ./niri 18 + ++ lib.optional cfg.waybar ./waybar 19 + ++ lib.optional cfg.wlsunset ./wlsunset; 24 20 25 - wl-clipboard 26 - cliphist 27 - hyprpicker 21 + config = { 22 + home.packages = with pkgs; [ 23 + amberol 24 + (celluloid.override {youtubeSupport = true;}) 25 + file-roller 26 + loupe 27 + nautilus 28 + pwvucontrol 28 29 29 - networkmanagerapplet 30 - brightnessctl 30 + wl-clipboard 31 + cliphist 32 + hyprpicker 31 33 32 - xwayland-satellite 34 + networkmanagerapplet 35 + brightnessctl 33 36 34 - nmgui 35 - ]; 37 + xwayland-satellite 36 38 37 - services.wlsunset = { 38 - enable = true; 39 - latitude = 51; 40 - longitude = -114; 41 - }; 42 - } 39 + nmgui 40 + ]; 41 + }; 42 + }
home/wayland/gtk.nix home/wayland/gtk/default.nix
+20 -2
home/wayland/niri/binds.nix
··· 1 - {config, ...}: { 1 + { 2 + config, 3 + pkgs, 4 + ... 5 + }: { 2 6 programs.niri.settings.binds = with config.lib.niri.actions; let 3 7 sh = spawn "sh" "-c"; 8 + powerMenu = pkgs.writeShellScript "power-menu" '' 9 + choice=$(echo -e " Lock\n Reboot\n⏻ Shutdown" | fuzzel --dmenu -l 7 -p "󰚥 ") 10 + case "$choice" in 11 + *"Lock") 12 + hyprlock 13 + ;; 14 + *"Reboot") 15 + systemctl reboot 16 + ;; 17 + *"Shutdown") 18 + systemctl poweroff 19 + ;; 20 + esac 21 + ''; 4 22 in { 5 23 "Mod+Space".action.spawn = ["vicinae" "vicinae://toggle"]; 6 24 "Mod+Return".action.spawn = ["ghostty" "+new-window"]; ··· 40 58 41 59 "Mod+Shift+Slash".action = show-hotkey-overlay; 42 60 43 - "Ctrl+Alt+Delete".action.spawn = ["~/nix-config/scripts/fuzzel_power.sh"]; 61 + "Ctrl+Alt+Delete".action.spawn = ["${powerMenu}"]; 44 62 45 63 "XF86AudioRaiseVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+" "--limit" "1.0"]; 46 64 "XF86AudioRaiseVolume".allow-when-locked = true;
+7
home/wayland/wlsunset/default.nix
··· 1 + { 2 + services.wlsunset = { 3 + enable = true; 4 + latitude = 51; 5 + longitude = -114; 6 + }; 7 + }
+28 -1
hosts/thwomp/configuration.nix
··· 45 45 }; 46 46 }; 47 47 48 - networking.hostName = "thwomp"; # Define your hostname. 48 + users.matthew_hre = { 49 + enable = true; 50 + configs = { 51 + bat = true; 52 + btop = true; 53 + direnv = true; 54 + fastfetch = true; 55 + fuzzel = true; 56 + garbage = true; 57 + git = true; 58 + ssh = true; 59 + vicinae = false; 60 + helix = true; 61 + nvf = true; 62 + 63 + shell = { 64 + enable = true; 65 + fish = true; 66 + ghostty = true; 67 + }; 68 + 69 + wayland = { 70 + enable = false; 71 + }; 72 + }; 73 + }; 74 + 75 + networking.hostName = "thwomp"; 49 76 50 77 services.xserver.enable = true; 51 78
+34
hosts/toad/configuration.nix
··· 24 24 "${system}/services/power.nix" 25 25 ]; 26 26 27 + users.matthew_hre = { 28 + enable = true; 29 + configs = { 30 + bat = true; 31 + btop = true; 32 + direnv = true; 33 + fastfetch = true; 34 + fuzzel = true; 35 + garbage = true; 36 + git = true; 37 + ssh = true; 38 + vicinae = true; 39 + helix = true; 40 + nvf = true; 41 + 42 + shell = { 43 + enable = true; 44 + fish = true; 45 + ghostty = true; 46 + }; 47 + 48 + wayland = { 49 + enable = true; 50 + dunst = true; 51 + gtk = true; 52 + hypridle = true; 53 + hyprlock = true; 54 + niri = true; 55 + waybar = true; 56 + wlsunset = true; 57 + }; 58 + }; 59 + }; 60 + 27 61 networking.hostName = "toad"; 28 62 29 63 # This value determines the NixOS release from which the default
-13
scripts/fuzzel_power.sh
··· 1 - #!/usr/bin/env fish 2 - 3 - set selection (echo -e " Lock\n Reboot\n⏻ Shutdown" | fuzzel --dmenu -l 7 -p "󰚥 ") 4 - 5 - switch $selection 6 - case "*Lock" 7 - hyprlock 8 - case "*Reboot" 9 - systemctl reboot 10 - case "*Shutdown" 11 - systemctl poweroff 12 - end 13 -
-1
system/core/default.nix
··· 1 1 { 2 2 imports = [ 3 3 ../nix 4 - ./users.nix 5 4 ./security.nix 6 5 ]; 7 6 time.timeZone = "America/Edmonton";
-11
system/core/users.nix
··· 1 - {pkgs, ...}: { 2 - users.users.matthew_hre = { 3 - isNormalUser = true; 4 - home = "/home/matthew_hre"; 5 - description = "Matthew Hrehirchuk"; 6 - extraGroups = ["wheel" "networkmanager" "docker" "wireshark"]; 7 - shell = pkgs.fish; 8 - }; 9 - 10 - users.defaultUserShell = pkgs.fish; 11 - }