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 | { |
Samuel Shuert | f513689 | 2024-06-20 21:04:47 -0400 | [diff] [blame] | 3 | options.chimera.users.minion.enable = lib.mkEnableOption "Enable Chimera options for minion"; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 4 | |
Samuel Shuert | f513689 | 2024-06-20 21:04:47 -0400 | [diff] [blame] | 5 | config = lib.mkIf config.chimera.users.minion.enable (let |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 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 { |
Skyler Grey | d96338d | 2024-05-27 13:02:10 +0000 | [diff] [blame] | 20 | chimera.shell.rebuildFlakePath = "/home/${config.home.username}/Code/chimera/config"; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 21 | |
Skyler Grey | 82cc5a4 | 2024-05-25 00:06:48 +0000 | [diff] [blame] | 22 | home.packages = [ |
Skyler Grey | 82cc5a4 | 2024-05-25 00:06:48 +0000 | [diff] [blame] | 23 | ]; |
| 24 | |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 25 | programs.git.includes = |
| 26 | lib.mapAttrsToList |
| 27 | git_email_to_include_option |
| 28 | git_emails; |
| 29 | |
| 30 | programs.git.extraConfig.alias = { |
| 31 | recommit = "!git commit --verbose -eF $(git rev-parse --git-dir)/COMMIT_EDITMSG"; |
| 32 | graph = "log --graph --oneline --decorate"; |
| 33 | hash = "rev-parse HEAD"; |
| 34 | |
| 35 | 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''; |
| 36 | } // (builtins.mapAttrs (_name: email: git_email_to_alias_value email) git_emails); |
| 37 | |
| 38 | home.shellAliases = { |
| 39 | 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;''; |
| 40 | }; |
| 41 | |
| 42 | programs.git.extraConfig.user = { |
| 43 | name = "Skyler Grey"; |
| 44 | signingkey = "7C868112B5390C5C"; |
| 45 | }; |
| 46 | |
| 47 | chimera.git = { |
| 48 | delta.enable = true; |
| 49 | stgit.enable = true; |
Skyler Grey | 3883b64 | 2024-06-30 23:01:42 +0000 | [diff] [blame] | 50 | jj.enable = true; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 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 = { |
Skyler Grey | b070038 | 2024-06-30 23:16:17 +0000 | [diff] [blame] | 144 | tsStatus.enable = true; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 145 | bash.enable = true; |
| 146 | defaultAliases.enable = true; |
| 147 | replacements.defaultEnable = true; |
| 148 | replacements.bat.enable = false; |
Samuel Shuert | b652b36 | 2024-06-20 21:37:38 -0400 | [diff] [blame] | 149 | replacements.glow.enable = false; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 150 | usefulPackages.enable = true; |
| 151 | }; |
| 152 | |
| 153 | chimera.editor = { |
| 154 | ed = { |
| 155 | enable = true; |
| 156 | prompt = ":"; |
| 157 | defaultEditor = false; |
| 158 | }; |
| 159 | |
| 160 | neovim = { |
| 161 | enable = true; |
| 162 | defaultEditor = false; |
| 163 | }; |
| 164 | |
| 165 | emacs.enable = true; |
| 166 | |
| 167 | editorconfig.enable = true; |
| 168 | }; |
| 169 | |
| 170 | chimera.yubikey.enable = true; |
| 171 | |
| 172 | chimera.input = { |
| 173 | keyboard = { |
| 174 | layout = "us"; |
| 175 | variant = "dvorak"; |
| 176 | }; |
| 177 | mouse.scrolling.natural = true; |
| 178 | }; |
| 179 | |
| 180 | chimera.nextcloud.enable = true; |
| 181 | |
| 182 | programs.bash.bashrcExtra = '' |
| 183 | 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\]" |
| 184 | ''; |
| 185 | |
| 186 | programs.kitty.extraConfig = '' |
| 187 | map kitty_mod+enter launch --cwd=current --type=window |
| 188 | map kitty_mod+t launch --cwd=current --type=tab |
| 189 | ''; |
| 190 | }); |
| 191 | } |