Skyler Grey | 33e8663 | 2024-05-24 23:57:45 +0000 | [diff] [blame] | 1 | { inputs, config, lib, pkgs, ... }: |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 2 | { |
| 3 | options.chimera.minion.enable = lib.mkEnableOption "Enable Chimera options for minion"; |
| 4 | |
| 5 | config = lib.mkIf config.chimera.minion.enable (let |
| 6 | git_emails = { |
Skyler Grey | 9574ff3 | 2024-05-27 13:01:32 +0000 | [diff] [blame^] | 7 | personal = "sky@a.starrysky.fyi"; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 8 | collabora = "skyler.grey@collabora.com"; |
| 9 | transplace = "minion@trans.gg"; |
| 10 | clicks = "minion@clicks.codes"; |
| 11 | }; |
| 12 | |
| 13 | git_email_to_include_option = name: email: { |
| 14 | condition = "gitdir:~/Code/${name}/"; |
| 15 | contents.user.email = email; |
| 16 | }; |
| 17 | |
| 18 | git_email_to_alias_value = email: "config user.email ${email}"; |
| 19 | in { |
| 20 | chimera.shell.rebuildFlakePath = "/home/skyler/Code/nix/configs/personal"; |
| 21 | |
Skyler Grey | 82cc5a4 | 2024-05-25 00:06:48 +0000 | [diff] [blame] | 22 | home.packages = [ |
| 23 | pkgs.logseq |
| 24 | ]; |
| 25 | |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 26 | programs.git.includes = |
| 27 | lib.mapAttrsToList |
| 28 | git_email_to_include_option |
| 29 | git_emails; |
| 30 | |
| 31 | programs.git.extraConfig.alias = { |
| 32 | recommit = "!git commit --verbose -eF $(git rev-parse --git-dir)/COMMIT_EDITMSG"; |
| 33 | graph = "log --graph --oneline --decorate"; |
| 34 | hash = "rev-parse HEAD"; |
| 35 | |
| 36 | stg-clean = ''!for PATCH in $(stg series -PU); do CHANGE_ID=$(git show -s --format="%(trailers:key=Change-Id,valueonly,separator=%x2C )" $(stg id $PATCH)); git log --format="%(trailers:key=Change-Id,valueonly,separator=%x2C )" | grep -qFx "$CHANGE_ID" && stg delete $PATCH; done''; |
| 37 | } // (builtins.mapAttrs (_name: email: git_email_to_alias_value email) git_emails); |
| 38 | |
| 39 | home.shellAliases = { |
| 40 | gpg-card-switch = ''for keygrip in $(gpg --with-keygrip --list-secret-keys 76E0B09A741C4089522111E5F27E3E5922772E7A | grep Keygrip | sed "1d" | sed "s/ *Keygrip = //"); do gpg-connect-agent "delete_key $keygrip" /bye > /dev/null; done; gpg --card-status;''; |
| 41 | }; |
| 42 | |
| 43 | programs.git.extraConfig.user = { |
| 44 | name = "Skyler Grey"; |
| 45 | signingkey = "7C868112B5390C5C"; |
| 46 | }; |
| 47 | |
| 48 | chimera.git = { |
| 49 | delta.enable = true; |
| 50 | stgit.enable = true; |
| 51 | gitReview.enable = true; |
| 52 | auth.clicksUsername = "minion"; |
| 53 | gpg.enable = true; |
| 54 | }; |
| 55 | |
| 56 | chimera.theme = { |
| 57 | font.nerdFontGlyphs.enable = true; |
| 58 | catppuccin = { |
| 59 | enable = true; |
| 60 | style = "Latte"; |
| 61 | color = "Maroon"; |
| 62 | }; |
| 63 | }; |
| 64 | |
| 65 | chimera.browser.chromium = { |
| 66 | enable = true; |
| 67 | extensions = { |
| 68 | ublockOrigin.enable = true; |
| 69 | bitwarden.enable = true; |
| 70 | }; |
| 71 | }; |
| 72 | |
| 73 | chimera.browser.firefox = { |
| 74 | enable = true; |
| 75 | extensions = { |
| 76 | bitwarden.enable = true; |
| 77 | youtube = { |
| 78 | sponsorBlock.enable = true; |
| 79 | returnDislike.enable = true; |
| 80 | deArrow.enable = true; |
| 81 | }; |
| 82 | reactDevTools.enable = true; |
| 83 | adnauseam.enable = true; |
| 84 | }; |
| 85 | search = { |
| 86 | enable = true; |
| 87 | extensions.enable = true; |
| 88 | bookmarks.enable = true; |
| 89 | engines = [ |
| 90 | "Kagi" |
| 91 | "MDN" |
| 92 | "NixOS Options" |
| 93 | "NixOS Packages" |
| 94 | "Home-Manager Options" |
| 95 | "Noogle" |
| 96 | "GitHub" |
| 97 | "Docs.rs" |
| 98 | "Crates.io" |
| 99 | "Arch Wiki" |
| 100 | "Gentoo Wiki" |
| 101 | ]; |
| 102 | }; |
| 103 | extraExtensions = [ |
| 104 | config.nur.repos.rycee.firefox-addons.sidebery |
Skyler Grey | f7f83f4 | 2024-05-24 23:48:39 +0000 | [diff] [blame] | 105 | config.nur.repos.rycee.firefox-addons.gitpod |
| 106 | config.nur.repos.rycee.firefox-addons.refined-github |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 107 | ]; |
| 108 | }; |
Skyler Grey | 33e8663 | 2024-05-24 23:57:45 +0000 | [diff] [blame] | 109 | programs.firefox.profiles.chimera.userChrome = '' |
| 110 | @import "${inputs.firefox-sidebery-gnome}/userChrome.css"; |
| 111 | |
| 112 | #TabsToolbar { |
| 113 | display: none; |
| 114 | } |
| 115 | #sidebar-header { |
| 116 | display: none; |
| 117 | } |
| 118 | |
| 119 | /* Hide "Sign in to sync" */ |
| 120 | #PanelUI-fxa-status { |
| 121 | display: none !important; |
| 122 | } |
| 123 | #appMenu-fxa-status2, #appMenu-fxa-separator { |
| 124 | display: none !important; |
| 125 | } |
| 126 | ''; |
| 127 | programs.firefox.profiles.chimera.userContent = '' |
| 128 | @import "${inputs.firefox-sidebery-gnome}/userContent.css"; |
| 129 | |
| 130 | @-moz-document url("about:preferences") { |
| 131 | #category-sync { display:none!important; } |
| 132 | #category-more-from-mozilla { display:none!important; } |
| 133 | } |
| 134 | ''; |
| 135 | programs.firefox.profiles.chimera.settings = { |
| 136 | "toolkit.legacyUserProfileCustomizations.stylesheets" = true; |
| 137 | "svg.context-properties.content.enabled" = true; |
| 138 | "browser.uidensity" = 0; |
| 139 | "browser.theme.dark-private-windows" = false; |
| 140 | "widget.gtk.rounded-bottom-corners.enabled" = true; |
| 141 | }; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 142 | |
| 143 | chimera.shell = { |
| 144 | bash.enable = true; |
| 145 | defaultAliases.enable = true; |
| 146 | replacements.defaultEnable = true; |
| 147 | replacements.bat.enable = false; |
| 148 | usefulPackages.enable = true; |
| 149 | }; |
| 150 | |
| 151 | chimera.editor = { |
| 152 | ed = { |
| 153 | enable = true; |
| 154 | prompt = ":"; |
| 155 | defaultEditor = false; |
| 156 | }; |
| 157 | |
| 158 | neovim = { |
| 159 | enable = true; |
| 160 | defaultEditor = false; |
| 161 | }; |
| 162 | |
| 163 | emacs.enable = true; |
| 164 | |
| 165 | editorconfig.enable = true; |
| 166 | }; |
| 167 | |
| 168 | chimera.yubikey.enable = true; |
| 169 | |
| 170 | chimera.input = { |
| 171 | keyboard = { |
| 172 | layout = "us"; |
| 173 | variant = "dvorak"; |
| 174 | }; |
| 175 | mouse.scrolling.natural = true; |
| 176 | }; |
| 177 | |
| 178 | chimera.nextcloud.enable = true; |
| 179 | |
| 180 | programs.bash.bashrcExtra = '' |
| 181 | export PS1="\[\e]133;k;start_kitty\a\]\[\e]133;A\a\]\[\e]133;k;end_kitty\a\]\n\[\e]133;k;start_secondary_kitty\a\]\[\e]133;A;k=s\a\]\[\e]133;k;end_secondary_kitty\a\]\[\033[1;35m\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\$\[\033[0m\] \[\e]133;k;start_suffix_kitty\a\]\[\e[5 q\]\[\e]2;\w\a\]\[\e]133;k;end_suffix_kitty\a\]" |
| 182 | ''; |
| 183 | |
| 184 | programs.kitty.extraConfig = '' |
| 185 | map kitty_mod+enter launch --cwd=current --type=window |
| 186 | map kitty_mod+t launch --cwd=current --type=tab |
| 187 | ''; |
| 188 | }); |
| 189 | } |