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 = [ |
| 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; |
Skyler Grey | 3883b64 | 2024-06-30 23:01:42 +0000 | [diff] [blame^] | 51 | jj.enable = true; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 52 | gitReview.enable = true; |
| 53 | auth.clicksUsername = "minion"; |
| 54 | gpg.enable = true; |
| 55 | }; |
| 56 | |
| 57 | chimera.theme = { |
| 58 | font.nerdFontGlyphs.enable = true; |
| 59 | catppuccin = { |
| 60 | enable = true; |
| 61 | style = "Latte"; |
| 62 | color = "Maroon"; |
| 63 | }; |
| 64 | }; |
| 65 | |
| 66 | chimera.browser.chromium = { |
| 67 | enable = true; |
| 68 | extensions = { |
| 69 | ublockOrigin.enable = true; |
| 70 | bitwarden.enable = true; |
| 71 | }; |
| 72 | }; |
| 73 | |
| 74 | chimera.browser.firefox = { |
| 75 | enable = true; |
| 76 | extensions = { |
| 77 | bitwarden.enable = true; |
| 78 | youtube = { |
| 79 | sponsorBlock.enable = true; |
| 80 | returnDislike.enable = true; |
| 81 | deArrow.enable = true; |
| 82 | }; |
| 83 | reactDevTools.enable = true; |
| 84 | adnauseam.enable = true; |
| 85 | }; |
| 86 | search = { |
| 87 | enable = true; |
| 88 | extensions.enable = true; |
| 89 | bookmarks.enable = true; |
| 90 | engines = [ |
| 91 | "Kagi" |
| 92 | "MDN" |
| 93 | "NixOS Options" |
| 94 | "NixOS Packages" |
| 95 | "Home-Manager Options" |
| 96 | "Noogle" |
| 97 | "GitHub" |
| 98 | "Docs.rs" |
| 99 | "Crates.io" |
| 100 | "Arch Wiki" |
| 101 | "Gentoo Wiki" |
| 102 | ]; |
| 103 | }; |
| 104 | extraExtensions = [ |
| 105 | config.nur.repos.rycee.firefox-addons.sidebery |
Skyler Grey | f7f83f4 | 2024-05-24 23:48:39 +0000 | [diff] [blame] | 106 | config.nur.repos.rycee.firefox-addons.gitpod |
| 107 | config.nur.repos.rycee.firefox-addons.refined-github |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 108 | ]; |
| 109 | }; |
Skyler Grey | 33e8663 | 2024-05-24 23:57:45 +0000 | [diff] [blame] | 110 | programs.firefox.profiles.chimera.userChrome = '' |
| 111 | @import "${inputs.firefox-sidebery-gnome}/userChrome.css"; |
| 112 | |
| 113 | #TabsToolbar { |
| 114 | display: none; |
| 115 | } |
| 116 | #sidebar-header { |
| 117 | display: none; |
| 118 | } |
| 119 | |
| 120 | /* Hide "Sign in to sync" */ |
| 121 | #PanelUI-fxa-status { |
| 122 | display: none !important; |
| 123 | } |
| 124 | #appMenu-fxa-status2, #appMenu-fxa-separator { |
| 125 | display: none !important; |
| 126 | } |
| 127 | ''; |
| 128 | programs.firefox.profiles.chimera.userContent = '' |
| 129 | @import "${inputs.firefox-sidebery-gnome}/userContent.css"; |
| 130 | |
| 131 | @-moz-document url("about:preferences") { |
| 132 | #category-sync { display:none!important; } |
| 133 | #category-more-from-mozilla { display:none!important; } |
| 134 | } |
| 135 | ''; |
| 136 | programs.firefox.profiles.chimera.settings = { |
| 137 | "toolkit.legacyUserProfileCustomizations.stylesheets" = true; |
| 138 | "svg.context-properties.content.enabled" = true; |
| 139 | "browser.uidensity" = 0; |
| 140 | "browser.theme.dark-private-windows" = false; |
| 141 | "widget.gtk.rounded-bottom-corners.enabled" = true; |
| 142 | }; |
Skyler Grey | a2c02ac | 2024-03-01 21:10:17 +0000 | [diff] [blame] | 143 | |
| 144 | chimera.shell = { |
| 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 | } |