blob: 5260535aaf7b918e019d8f2eb41aac347437b614 [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 Greya2c02ac2024-03-01 21:10:17 +000051 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 Greyf7f83f42024-05-24 23:48:39 +0000105 config.nur.repos.rycee.firefox-addons.gitpod
106 config.nur.repos.rycee.firefox-addons.refined-github
Skyler Greya2c02ac2024-03-01 21:10:17 +0000107 ];
108 };
Skyler Grey33e86632024-05-24 23:57:45 +0000109 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 Greya2c02ac2024-03-01 21:10:17 +0000142
143 chimera.shell = {
Skyler Greyb0700382024-06-30 23:16:17 +0000144 tsStatus.enable = true;
Skyler Greya2c02ac2024-03-01 21:10:17 +0000145 bash.enable = true;
146 defaultAliases.enable = true;
147 replacements.defaultEnable = true;
148 replacements.bat.enable = false;
Samuel Shuertb652b362024-06-20 21:37:38 -0400149 replacements.glow.enable = false;
Skyler Greya2c02ac2024-03-01 21:10:17 +0000150 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}