this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: Break out into modules

Ovyerus 43ac597b fc25f0ea

+314 -202
-3
files/gfh.txt
··· 1 - 22317870::/Users/ovy/.ssh/id_ed25519_sk 2 - # 22317870::/Users/ovy/.ssh/2bikey 3 - # 15474656::/Users/ovy/.ssh/id_ed25519_sk
+27 -6
flake.lock
··· 7 7 ] 8 8 }, 9 9 "locked": { 10 - "lastModified": 1699660313, 11 - "narHash": "sha256-/nu7oA4Dm5vMbVb+kIJMS02V56h70XPLXoijYiTCpFg=", 10 + "lastModified": 1701609479, 11 + "narHash": "sha256-mcEnMz7XB3K57ZX16VXoEkswljSNGXdMuUu5+g8a8R8=", 12 12 "owner": "nix-community", 13 13 "repo": "home-manager", 14 - "rev": "e27be9db7b4ae5791f53d241b3661353c51a9677", 14 + "rev": "e504e8d01f950776c3a3160ba38c5957a1b89e66", 15 15 "type": "github" 16 16 }, 17 17 "original": { ··· 20 20 "type": "github" 21 21 } 22 22 }, 23 + "nix-index-database": { 24 + "inputs": { 25 + "nixpkgs": [ 26 + "nixpkgs" 27 + ] 28 + }, 29 + "locked": { 30 + "lastModified": 1701572887, 31 + "narHash": "sha256-oCPwQZT0Inis4zcYhtFHUp7Rym1zglKPLDcRird35q8=", 32 + "owner": "nix-community", 33 + "repo": "nix-index-database", 34 + "rev": "41afa8d1c061beda68502bcc67f2788f3a77042b", 35 + "type": "github" 36 + }, 37 + "original": { 38 + "owner": "nix-community", 39 + "repo": "nix-index-database", 40 + "type": "github" 41 + } 42 + }, 23 43 "nixpkgs": { 24 44 "locked": { 25 - "lastModified": 1699099776, 26 - "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", 45 + "lastModified": 1701253981, 46 + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", 27 47 "owner": "nixos", 28 48 "repo": "nixpkgs", 29 - "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", 49 + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", 30 50 "type": "github" 31 51 }, 32 52 "original": { ··· 39 59 "root": { 40 60 "inputs": { 41 61 "home-manager": "home-manager", 62 + "nix-index-database": "nix-index-database", 42 63 "nixpkgs": "nixpkgs" 43 64 } 44 65 }
+16 -2
flake.nix
··· 8 8 url = "github:nix-community/home-manager"; 9 9 inputs.nixpkgs.follows = "nixpkgs"; 10 10 }; 11 + 12 + nix-index-database = { 13 + url = "github:nix-community/nix-index-database"; 14 + inputs.nixpkgs.follows = "nixpkgs"; 15 + }; 11 16 }; 12 17 13 18 outputs = { 19 + home-manager, 20 + nix-index-database, 14 21 nixpkgs, 15 - home-manager, 16 22 ... 17 23 }: let 18 24 system = "aarch64-darwin"; ··· 20 26 in { 21 27 homeConfigurations."ovy" = home-manager.lib.homeManagerConfiguration { 22 28 inherit pkgs; 23 - modules = [./home.nix]; 29 + modules = [ 30 + ./modules/config.nix 31 + ./modules/default.nix 32 + ./modules/editor.nix 33 + ./modules/shell/default.nix 34 + ./modules/shell/tools.nix 35 + ./modules/git.nix 36 + nix-index-database.hmModules.nix-index 37 + ]; 24 38 }; 25 39 }; 26 40 }
-191
home.nix
··· 1 - { 2 - config, 3 - pkgs, 4 - ... 5 - }: { 6 - home.username = "ovy"; 7 - home.homeDirectory = "/Users/ovy"; 8 - 9 - # This value determines the Home Manager release that your configuration is 10 - # compatible with. This helps avoid breakage when a new Home Manager release 11 - # introduces backwards incompatible changes. 12 - # 13 - # You should not change this value, even if you update Home Manager. If you do 14 - # want to update the value, then make sure to first check the Home Manager 15 - # release notes. 16 - home.stateVersion = "23.05"; # Please read the comment before changing. 17 - 18 - # The home.packages option allows you to install Nix packages into your 19 - # environment. 20 - home.packages = with pkgs; [ 21 - age-plugin-yubikey 22 - alejandra 23 - cachix 24 - colmena 25 - du-dust 26 - duf 27 - eza 28 - fd 29 - fzf 30 - jq 31 - macchina 32 - magic-wormhole-rs 33 - nix-your-shell 34 - ripgrep 35 - zellij 36 - mtr 37 - ]; 38 - 39 - # TODO: configure bat, fzf, etc. 40 - # https://github.com/sharkdp/bat/issues/357 41 - 42 - xdg.configFile = { 43 - "karabiner/assets/complex_modifications/meh.json".source = ./files/karabiner/meh.json; 44 - "git/allowed_signers".source = ./files/git/allowed_signers; 45 - }; 46 - 47 - programs.git = { 48 - enable = true; 49 - userName = "Ovyerus"; 50 - userEmail = "ovy@ovyerus.com"; 51 - # delta.enable = true; 52 - difftastic.enable = true; 53 - 54 - extraConfig = { 55 - pull.rebase = true; 56 - init.defaultBranch = "main"; 57 - log.showSignature = true; 58 - 59 - gpg.ssh.allowedSignersFile = "~/.config/git/allowed_signers"; 60 - user.signingKey = "~/.ssh/id_ed25519_sk_rk"; 61 - gpg.format = "ssh"; 62 - commit.gpgsign = true; 63 - tag.gpgsign = true; 64 - # "gpg.ssh.program = "gfh-keygen"; 65 - # "gpg.ssh.defaultKeyCommand = "gfh"; 66 - }; 67 - }; 68 - 69 - # programs.rtx = { 70 - # enable = true; 71 - # enableFishIntegration = true; 72 - # }; 73 - 74 - programs.bat = { 75 - enable = true; 76 - config = { 77 - pager = "never"; 78 - }; 79 - }; 80 - 81 - programs.direnv = { 82 - enable = true; 83 - nix-direnv.enable = true; 84 - config.whitelist.prefix = ["/Users/ovy/Projects/personal"]; 85 - }; 86 - 87 - programs.micro = { 88 - enable = true; 89 - settings = { 90 - clipboard = "terminal"; 91 - scrollbar = true; 92 - tabmovement = true; 93 - tabsize = 2; 94 - tabstospaces = true; 95 - }; 96 - }; 97 - 98 - programs.fish = { 99 - enable = true; 100 - interactiveShellInit = '' 101 - set fish_greeting 102 - nix-your-shell fish | source 103 - ''; 104 - 105 - shellAbbrs = { 106 - gco = "git checkout"; 107 - }; 108 - 109 - shellAliases = { 110 - cat = "bat"; 111 - ls = "eza"; 112 - # TODO: only set if applicable 113 - # code = "code-insiders"; 114 - dc = "docker compose"; 115 - hm = "home-manager"; 116 - ncg = "nix-collect-garbage"; 117 - ze = "zellij"; 118 - }; 119 - 120 - plugins = with pkgs.fishPlugins; [ 121 - # { name = "hydro"; src = hydro.src; } 122 - { 123 - name = "lumin"; 124 - src = pkgs.fetchFromGitHub { 125 - owner = "ovyerus"; 126 - repo = "lumin"; 127 - rev = "dc0b8f57f5b2a58a289ea6088843bd56f8633aa6"; 128 - sha256 = "10aifc1scb9wg9sphvgn602chrf7v7a424h24ip2lzgk37wzlcn3"; 129 - }; 130 - } 131 - { 132 - name = "nix.fish"; 133 - src = pkgs.fetchFromGitHub { 134 - owner = "kidonng"; 135 - repo = "nix.fish"; 136 - rev = "ad57d970841ae4a24521b5b1a68121cf385ba71e"; 137 - sha256 = "13x3bfif906nszf4mgsqxfshnjcn6qm4qw1gv7nw89wi4cdp9i8q"; 138 - }; 139 - } 140 - { 141 - name = "autopair.fish"; 142 - src = pkgs.fetchFromGitHub { 143 - owner = "jorgebucaran"; 144 - repo = "autopair.fish"; 145 - rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2"; 146 - sha256 = "0l2g922gwjd64ar41j7cp09vvvrs30ha55b85nidni4i4bbfvpda"; 147 - }; 148 - } 149 - # { 150 - # name = "sponge"; 151 - # src = pkgs.fetchFromGitHub { 152 - # owner = "meaningful-ooo"; 153 - # repo = "sponge"; 154 - # rev = "384299545104d5256648cee9d8b117aaa9a6d7be"; 155 - # sha256 = "0p4vk6pq858h2v39c41irrgw1fbbcs7gd9cdr9i9fd3d6i81kmri"; 156 - # }; 157 - # } 158 - ]; 159 - }; 160 - 161 - programs.tealdeer = { 162 - enable = true; 163 - settings = { 164 - updates = { 165 - auto_update = true; 166 - }; 167 - }; 168 - }; 169 - 170 - programs.zoxide = { 171 - enable = true; 172 - enableFishIntegration = true; 173 - }; 174 - 175 - programs.gh = { 176 - enable = true; 177 - settings = { 178 - git_protocol = "ssh"; 179 - aliases = { 180 - clone = "repo clone"; 181 - }; 182 - }; 183 - }; 184 - 185 - home.sessionVariables = { 186 - EDITOR = "micro"; 187 - }; 188 - 189 - # Let Home Manager install and manage itself. 190 - programs.home-manager.enable = true; 191 - }
+10
modules/config.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + lib, 5 + ... 6 + }: { 7 + xdg.configFile = { 8 + "karabiner/assets/complex_modifications/meh.json".source = ../files/karabiner/meh.json; 9 + }; 10 + }
+35
modules/default.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + lib, 5 + ... 6 + }: { 7 + programs.home-manager.enable = true; 8 + home.username = "ovy"; 9 + home.homeDirectory = "/Users/ovy"; 10 + 11 + # You should not change this value, even if you update Home Manager. If you do 12 + # want to update the value, then make sure to first check the Home Manager 13 + # release notes. 14 + home.stateVersion = "23.05"; 15 + 16 + # Misc packages 17 + home.packages = with pkgs; [ 18 + age-plugin-yubikey 19 + alejandra 20 + cachix 21 + colmena 22 + du-dust 23 + duf 24 + fd 25 + jq 26 + macchina 27 + magic-wormhole-rs 28 + minisign 29 + mtr 30 + nix-your-shell 31 + rage 32 + ripgrep 33 + xh 34 + ]; 35 + }
+21
modules/editor.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + lib, 5 + ... 6 + }: { 7 + programs.micro = { 8 + enable = true; 9 + settings = { 10 + clipboard = "external"; 11 + hlsearch = true; 12 + parsecursor = true; 13 + scrollbar = true; 14 + tabmovement = true; 15 + tabsize = 2; 16 + tabstospaces = true; 17 + }; 18 + }; 19 + 20 + home.sessionVariables.EDITOR = "code"; 21 + }
+38
modules/git.nix
··· 1 + { 2 + pkgs, 3 + lib, 4 + ... 5 + }: { 6 + xdg.configFile."git/allowed_signers".source = ../files/git/allowed_signers; 7 + 8 + programs.git = { 9 + enable = true; 10 + userName = "Ovyerus"; 11 + userEmail = "ovy@ovyerus.com"; 12 + delta.enable = true; 13 + 14 + extraConfig = { 15 + pull.rebase = true; 16 + init.defaultBranch = "main"; 17 + log.showSignature = true; 18 + 19 + gpg.ssh.allowedSignersFile = "~/.config/git/allowed_signers"; 20 + user.signingKey = "~/.ssh/id_ed25519_sk_rk"; 21 + gpg.format = "ssh"; 22 + commit.gpgsign = true; 23 + tag.gpgsign = true; 24 + # "gpg.ssh.program = "gfh-keygen"; 25 + # "gpg.ssh.defaultKeyCommand = "gfh"; 26 + }; 27 + }; 28 + 29 + programs.gh = { 30 + enable = true; 31 + settings = { 32 + git_protocol = "ssh"; 33 + aliases = { 34 + clone = "repo clone"; 35 + }; 36 + }; 37 + }; 38 + }
+88
modules/shell/default.nix
··· 1 + { 2 + pkgs, 3 + lib, 4 + ... 5 + }: { 6 + # TODO: custom fifc rules (nix shell, nix run, ...) 7 + # TODO: how to customise fifc pane 8 + programs.fish = { 9 + enable = true; 10 + interactiveShellInit = '' 11 + set fish_greeting 12 + set fzf_diff_highlighter delta --paging=never --width=20 13 + set fzf_preview_dir_cmd eza --all --color=always 14 + set fzf_fd_opts --hidden --exclude=.git --exclude=node_modules 15 + 16 + # Because I use the Colemak input source on MacOS, using Alt/Option in 17 + # keybinds is a no-go, due to problems in Alacritty/iTerm's 18 + # (and probably others) input handler, which uses key position codes 19 + # instead of the actual value of the key. For some reason this doesn't 20 + # cause problems in keybinds using only Ctrl. 21 + 22 + fzf_configure_bindings --directory=\cf --git_log=\cl --git_status=\cs --processes=\cp 23 + 24 + nix-your-shell fish | source 25 + ''; 26 + 27 + shellAbbrs = { 28 + gco = "git checkout"; 29 + }; 30 + 31 + shellAliases = { 32 + cat = "bat"; 33 + ls = "eza"; 34 + dc = "docker compose"; 35 + hm = "home-manager"; 36 + ncg = "nix-collect-garbage"; 37 + ze = "zellij"; 38 + }; 39 + 40 + plugins = with pkgs.fishPlugins; [ 41 + { 42 + name = "fzf.fish"; 43 + src = pkgs.fetchFromGitHub { 44 + owner = "PatrickF1"; 45 + repo = "fzf.fish"; 46 + rev = "46c7bc6354494be5d869d56a24a46823a9fdded0"; 47 + hash = "sha256-lxQZo6APemNjt2c21IL7+uY3YVs81nuaRUL7NDMcB6s="; 48 + }; 49 + } 50 + { 51 + name = "fifc"; 52 + src = pkgs.fetchFromGitHub { 53 + owner = "gazorby"; 54 + repo = "fifc"; 55 + rev = "2ee5beec7dfd28101026357633616a211fe240ae"; 56 + hash = "sha256-Nrart7WAh2VQhsDDe0EFI59TqvBO56US2MraqencxgE"; 57 + }; 58 + } 59 + { 60 + name = "lumin"; 61 + src = pkgs.fetchFromGitHub { 62 + owner = "ovyerus"; 63 + repo = "lumin"; 64 + rev = "dc0b8f57f5b2a58a289ea6088843bd56f8633aa6"; 65 + hash = "sha256-wzL6+RnzfSpuJAISQdTZx2XIBDD2bXh1ejwtpgNzUYE="; 66 + }; 67 + } 68 + { 69 + name = "nix.fish"; 70 + src = pkgs.fetchFromGitHub { 71 + owner = "kidonng"; 72 + repo = "nix.fish"; 73 + rev = "ad57d970841ae4a24521b5b1a68121cf385ba71e"; 74 + hash = "sha256-GMV0GyORJ8Tt2S9wTCo2lkkLtetYv0rc19aA5KJbo48="; 75 + }; 76 + } 77 + { 78 + name = "autopair.fish"; 79 + src = pkgs.fetchFromGitHub { 80 + owner = "jorgebucaran"; 81 + repo = "autopair.fish"; 82 + rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2"; 83 + hash = "sha256-qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A="; 84 + }; 85 + } 86 + ]; 87 + }; 88 + }
+79
modules/shell/tools.nix
··· 1 + { 2 + pkgs, 3 + lib, 4 + ... 5 + }: { 6 + programs.aria2.enable = true; 7 + 8 + programs.bat = { 9 + enable = true; 10 + extraPackages = [pkgs.bat-extras.batgrep]; 11 + config = { 12 + theme = "DarkNeon"; 13 + italic-text = "always"; 14 + }; 15 + }; 16 + home.sessionVariables.MANPAGER = "sh -c 'col -bx | bat -l man -p'"; 17 + home.sessionVariables.MANROFFOPT = "-c"; 18 + 19 + programs.direnv = { 20 + enable = true; 21 + nix-direnv.enable = true; 22 + config.whitelist.prefix = ["/Users/ovy/Projects/personal"]; 23 + }; 24 + 25 + # TODO: decide on this vs lsd? 26 + programs.eza.enable = true; 27 + 28 + # TODO 29 + # Investigate preview stuff as default command 30 + # https://github.com/kidonng/preview.fish 31 + # Explore fzf search modes 32 + programs.fzf = { 33 + enable = true; 34 + enableFishIntegration = false; 35 + defaultOptions = [ 36 + "--ansi" 37 + "--cycle" 38 + "--layout=reverse" 39 + "--border" 40 + "--height=90%" 41 + "--marker=\"*\"" 42 + "--preview 'bat --color=always --style=header,numbers --line-range :300 {}'" 43 + # I usually use a vertical term so this is more practical. 44 + # TODO: possible to dynamically change based on terminal dimensinns? 45 + "--preview-window='bottom:50%:wrap'" 46 + ]; 47 + defaultCommand = "fd --color=always --type file --follow --hidden --exclude .git --exclude node_modules"; 48 + }; 49 + home.sessionVariables.FZF_CTRL_T_COMMAND = "fd --color=always --follow"; 50 + 51 + programs.nix-index.enable = true; 52 + 53 + programs.tealdeer = { 54 + enable = true; 55 + settings = { 56 + updates = { 57 + auto_update = true; 58 + }; 59 + }; 60 + }; 61 + 62 + programs.zellij = { 63 + enable = true; 64 + enableFishIntegration = false; 65 + settings = { 66 + mouse_mode = true; 67 + # TODO: unsure what characters they use but the arrows are unaligned. 68 + # simplified_ui = true; 69 + theme = "catppuccin-mocha"; 70 + ui.pane_frames.rounded_corners = true; 71 + ui.pane_frames.hide_session_name = true; 72 + }; 73 + }; 74 + 75 + programs.zoxide = { 76 + enable = true; 77 + enableFishIntegration = true; 78 + }; 79 + }