blob: 02de6421038d662c90d21819fc3038175fd06ad3 [file] [log] [blame]
Skyler Grey33e86632024-05-24 23:57:45 +00001{ inputs, config, lib, pkgs, ... }:
Skyler Greya2c02ac2024-03-01 21:10:17 +00002{
Samuel Shuertf5136892024-06-20 21:04:47 -04003 options.chimera.users.minion.enable = lib.mkEnableOption "Enable Chimera options for minion";
Skyler Greya2c02ac2024-03-01 21:10:17 +00004
Samuel Shuertf5136892024-06-20 21:04:47 -04005 config = lib.mkIf config.chimera.users.minion.enable (let
Skyler Greya2c02ac2024-03-01 21:10:17 +00006 git_emails = {
Skyler Grey9574ff32024-05-27 13:01:32 +00007 personal = "sky@a.starrysky.fyi";
Skyler Greya2c02ac2024-03-01 21:10:17 +00008 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 Greyd96338d2024-05-27 13:02:10 +000020 chimera.shell.rebuildFlakePath = "/home/${config.home.username}/Code/chimera/config";
Skyler Greya2c02ac2024-03-01 21:10:17 +000021
Skyler Grey82cc5a42024-05-25 00:06:48 +000022 home.packages = [
Skyler Grey82cc5a42024-05-25 00:06:48 +000023 ];
24
Skyler Greya2c02ac2024-03-01 21:10:17 +000025 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 Grey3883b642024-06-30 23:01:42 +000050 jj.enable = true;
Skyler Greycf0b8562024-10-02 22:14:37 +000051 radicle = {
52 enable = true;
53 unstable = true;
54 };
Skyler Greya2c02ac2024-03-01 21:10:17 +000055 gitReview.enable = true;
56 auth.clicksUsername = "minion";
57 gpg.enable = true;
58 };
59
60 chimera.theme = {
61 font.nerdFontGlyphs.enable = true;
62 catppuccin = {
63 enable = true;
64 style = "Latte";
65 color = "Maroon";
66 };
67 };
68
69 chimera.browser.chromium = {
70 enable = true;
71 extensions = {
72 ublockOrigin.enable = true;
73 bitwarden.enable = true;
74 };
75 };
76
77 chimera.browser.firefox = {
78 enable = true;
79 extensions = {
80 bitwarden.enable = true;
81 youtube = {
82 sponsorBlock.enable = true;
83 returnDislike.enable = true;
84 deArrow.enable = true;
85 };
86 reactDevTools.enable = true;
87 adnauseam.enable = true;
88 };
89 search = {
90 enable = true;
91 extensions.enable = true;
92 bookmarks.enable = true;
93 engines = [
94 "Kagi"
95 "MDN"
96 "NixOS Options"
97 "NixOS Packages"
98 "Home-Manager Options"
99 "Noogle"
100 "GitHub"
101 "Docs.rs"
102 "Crates.io"
103 "Arch Wiki"
104 "Gentoo Wiki"
105 ];
106 };
107 extraExtensions = [
108 config.nur.repos.rycee.firefox-addons.sidebery
Skyler Greyf7f83f42024-05-24 23:48:39 +0000109 config.nur.repos.rycee.firefox-addons.gitpod
110 config.nur.repos.rycee.firefox-addons.refined-github
Skyler Greya2c02ac2024-03-01 21:10:17 +0000111 ];
112 };
Skyler Grey33e86632024-05-24 23:57:45 +0000113 programs.firefox.profiles.chimera.userChrome = ''
114 @import "${inputs.firefox-sidebery-gnome}/userChrome.css";
115
116 #TabsToolbar {
117 display: none;
118 }
119 #sidebar-header {
120 display: none;
121 }
122
123 /* Hide "Sign in to sync" */
124 #PanelUI-fxa-status {
125 display: none !important;
126 }
127 #appMenu-fxa-status2, #appMenu-fxa-separator {
128 display: none !important;
129 }
130 '';
131 programs.firefox.profiles.chimera.userContent = ''
132 @import "${inputs.firefox-sidebery-gnome}/userContent.css";
133
134 @-moz-document url("about:preferences") {
135 #category-sync { display:none!important; }
136 #category-more-from-mozilla { display:none!important; }
137 }
138 '';
139 programs.firefox.profiles.chimera.settings = {
140 "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
141 "svg.context-properties.content.enabled" = true;
142 "browser.uidensity" = 0;
143 "browser.theme.dark-private-windows" = false;
144 "widget.gtk.rounded-bottom-corners.enabled" = true;
145 };
Skyler Greya2c02ac2024-03-01 21:10:17 +0000146
147 chimera.shell = {
Skyler Greyb0700382024-06-30 23:16:17 +0000148 tsStatus.enable = true;
Skyler Greya2c02ac2024-03-01 21:10:17 +0000149 bash.enable = true;
150 defaultAliases.enable = true;
151 replacements.defaultEnable = true;
152 replacements.bat.enable = false;
Samuel Shuertb652b362024-06-20 21:37:38 -0400153 replacements.glow.enable = false;
Skyler Greya2c02ac2024-03-01 21:10:17 +0000154 usefulPackages.enable = true;
155 };
156
157 chimera.editor = {
158 ed = {
159 enable = true;
160 prompt = ":";
161 defaultEditor = false;
162 };
163
164 neovim = {
165 enable = true;
166 defaultEditor = false;
167 };
168
169 emacs.enable = true;
170
171 editorconfig.enable = true;
172 };
173
174 chimera.yubikey.enable = true;
175
176 chimera.input = {
177 keyboard = {
178 layout = "us";
179 variant = "dvorak";
180 };
181 mouse.scrolling.natural = true;
182 };
183
184 chimera.nextcloud.enable = true;
185
186 programs.bash.bashrcExtra = ''
187 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\]"
188 '';
189
190 programs.kitty.extraConfig = ''
191 map kitty_mod+enter launch --cwd=current --type=window
192 map kitty_mod+t launch --cwd=current --type=tab
193 '';
194 });
195}