tangled
alpha
login
or
join now
bwc9876.dev
/
nixos-config
1
fork
atom
Flake for my NixOS devices
1
fork
atom
overview
issues
pulls
pipelines
Remove Dolphin, Add Yazi
bwc9876.dev
8 months ago
64f3b9b3
f30a0d6b
verified
This commit was signed with the committer's
known signature
.
bwc9876.dev
SSH Key Fingerprint:
SHA256:DanMEP/RNlSC7pAVbnXO6wzQV00rqyKj053tz4uH5gQ=
+376
-355
10 changed files
expand all
collapse all
unified
split
nixosModules
base
base.nix
yazi.nix
dev
haskell.nix
nvim.nix
graphics
apps.nix
floorp.nix
shell.nix
xdg.nix
imperm.nix
res
rofi
rofi-places.nu
+4
nixosModules/base/base.nix
···
1
{
0
2
inputs,
3
config,
4
...
5
}: {
6
environment.variables."HOSTNAME" = config.networking.hostName;
0
0
0
7
environment.etc."flake-src".source = inputs.self;
8
home-manager.useGlobalPkgs = true;
9
home-manager.useUserPackages = true;
···
1
{
2
+
pkgs,
3
inputs,
4
config,
5
...
6
}: {
7
environment.variables."HOSTNAME" = config.networking.hostName;
8
+
environment.systemPackages = with pkgs; [
9
+
uutils-coreutils-noprefix
10
+
];
11
environment.etc."flake-src".source = inputs.self;
12
home-manager.useGlobalPkgs = true;
13
home-manager.useUserPackages = true;
+136
nixosModules/base/yazi.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{pkgs, ...}: {
2
+
environment.systemPackages = with pkgs; [
3
+
yazi
4
+
mediainfo
5
+
exiftool
6
+
];
7
+
8
+
home-manager.users.bean.programs.yazi = {
9
+
enable = true;
10
+
enableBashIntegration = true;
11
+
enableNushellIntegration = true;
12
+
13
+
settings = {
14
+
open.prepend_rules = [
15
+
{
16
+
mime = "video/*";
17
+
use = "open";
18
+
}
19
+
{
20
+
mime = "audio/*";
21
+
use = "open";
22
+
}
23
+
];
24
+
};
25
+
26
+
keymap.mgr.prepend_keymap = [
27
+
{
28
+
run = "plugin mount";
29
+
on = ["M"];
30
+
desc = "Disk Mounting";
31
+
}
32
+
{
33
+
run = "plugin chmod";
34
+
on = [
35
+
"c"
36
+
"m"
37
+
];
38
+
desc = "Run Chmod On Selected";
39
+
}
40
+
];
41
+
42
+
plugins = {
43
+
inherit
44
+
(pkgs.yaziPlugins)
45
+
ouch
46
+
mount
47
+
chmod
48
+
bypass
49
+
mediainfo
50
+
wl-clipboard
51
+
yatline
52
+
yatline-catppuccin
53
+
;
54
+
};
55
+
56
+
initLua = ''
57
+
local catppuccin_theme = require("yatline-catppuccin"):setup("mocha")
58
+
59
+
require("yatline"):setup({
60
+
theme = catppuccin_theme,
61
+
section_separator = { open = "", close = "" },
62
+
part_separator = { open = "", close = "" },
63
+
inverse_separator = { open = "", close = "" },
64
+
65
+
tab_width = 20,
66
+
tab_use_inverse = false,
67
+
68
+
selected = { icon = "", fg = "yellow" },
69
+
copied = { icon = "", fg = "green" },
70
+
cut = { icon = "", fg = "red" },
71
+
72
+
total = { icon = "", fg = "yellow" },
73
+
succ = { icon = "", fg = "green" },
74
+
fail = { icon = "", fg = "red" },
75
+
found = { icon = "", fg = "blue" },
76
+
processed = { icon = "", fg = "green" },
77
+
78
+
show_background = true,
79
+
80
+
display_header_line = true,
81
+
display_status_line = true,
82
+
83
+
component_positions = { "header", "tab", "status" },
84
+
85
+
header_line = {
86
+
left = {
87
+
section_a = {
88
+
{type = "line", custom = false, name = "tabs", params = {"left"}},
89
+
},
90
+
section_b = {
91
+
},
92
+
section_c = {
93
+
}
94
+
},
95
+
right = {
96
+
section_a = {
97
+
{type = "string", custom = false, name = "date", params = {"%A, %d %B %Y"}},
98
+
},
99
+
section_b = {
100
+
{type = "string", custom = false, name = "date", params = {"%X"}},
101
+
},
102
+
section_c = {
103
+
}
104
+
}
105
+
},
106
+
107
+
status_line = {
108
+
left = {
109
+
section_a = {
110
+
{type = "string", custom = false, name = "tab_mode"},
111
+
},
112
+
section_b = {
113
+
{type = "string", custom = false, name = "hovered_size"},
114
+
},
115
+
section_c = {
116
+
{type = "string", custom = false, name = "hovered_path"},
117
+
{type = "coloreds", custom = false, name = "count"},
118
+
}
119
+
},
120
+
right = {
121
+
section_a = {
122
+
{type = "string", custom = false, name = "cursor_position"},
123
+
},
124
+
section_b = {
125
+
{type = "string", custom = false, name = "cursor_percentage"},
126
+
},
127
+
section_c = {
128
+
{type = "string", custom = false, name = "hovered_file_extension", params = {true}},
129
+
{type = "coloreds", custom = false, name = "permissions"},
130
+
}
131
+
}
132
+
},
133
+
})
134
+
'';
135
+
};
136
+
}
+7
-3
nixosModules/dev/haskell.nix
···
1
-
{
0
0
0
0
2
home-manager.users.bean.xdg.configFile."ghc/ghci.conf".text = ''
3
-
:set prompt "\ESC[1;35m\x03BB> \ESC[m"
4
-
:set prompt-cont "\ESC[1;35m > \ESC[m"
5
'';
6
}
···
1
+
{pkgs, ...}: {
2
+
environment.systemPackages = with pkgs; [
3
+
haskell.compiler.ghc912
4
+
];
5
+
6
home-manager.users.bean.xdg.configFile."ghc/ghci.conf".text = ''
7
+
:set prompt "\ESC[1;35m\x03BB> \ESC[m"
8
+
:set prompt-cont "\ESC[1;35m > \ESC[m"
9
'';
10
}
+7
-1
nixosModules/dev/nvim.nix
···
869
870
servers = {
871
astro.enable = true;
872
-
hls.enable = true;
0
0
0
0
0
0
873
sqls.enable = true;
874
mdx_analyzer = {
875
enable = true;
···
869
870
servers = {
871
astro.enable = true;
872
+
hls = {
873
+
enable = true;
874
+
installGhc = false;
875
+
876
+
ghcPackage = pkgs.haskell.compiler.ghc912;
877
+
package = pkgs.haskell.packages.ghc912.haskell-language-server;
878
+
};
879
sqls.enable = true;
880
mdx_analyzer = {
881
enable = true;
-2
nixosModules/graphics/apps.nix
···
149
};
150
151
environment.systemPackages = with pkgs; [
152
-
chromium
153
-
154
# Office
155
libreoffice-qt6
156
···
149
};
150
151
environment.systemPackages = with pkgs; [
0
0
152
# Office
153
libreoffice-qt6
154
+206
-215
nixosModules/graphics/floorp.nix
···
2
lib,
3
pkgs,
4
...
5
-
}:
6
-
{
7
-
8
nixpkgs.overlays = [
9
(final: prev: {
10
floorp-unwrapped =
···
16
# https://github.com/NixOS/nixpkgs/issues/418473
17
ltoSupport = false;
18
}).overrideAttrs
19
-
(prev: {
20
-
MOZ_DATA_REPORTING = "";
21
-
MOZ_TELEMETRY_REPORTING = "";
22
-
});
23
})
24
];
25
···
70
EmailTracking = true;
71
};
72
73
-
Preferences =
74
-
let
75
-
lock = val: {
76
-
Value = val;
77
-
Status = "locked";
78
-
};
79
-
in
80
-
{
81
-
# General
82
-
"browser.aboutConfig.showWarning" = lock false;
83
-
"media.eme.enabled" = lock true; # Encrypted Media Extensions (DRM)
84
-
"layout.css.prefers-color-scheme.content-override" = lock 0;
85
-
"browser.startup.page" = 3; # Restore previous session
86
-
"toolkit.telemetry.server" = lock "";
87
88
-
# New Tab
89
-
"browser.newtabpage.activity-stream.showSponsored" = lock false;
90
-
"browser.newtabpage.activity-stream.system.showSponsored" = lock false;
91
-
"browser.newtabpage.activity-stream.feeds.section.topstories" = lock false;
92
-
"browser.newtabpage.activity-stream.feeds.topsites" = lock false;
93
-
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock false;
94
-
"browser.newtabpage.activity-stream.showWeather" = lock false;
95
-
"browser.newtabpage.activity-stream.system.showWeather" = lock false;
96
-
"browser.newtabpage.activity-stream.feeds.weatherfeed" = lock false;
97
-
"browser.newtabpage.activity-stream.feeds.telemetry" = lock false;
98
-
"browser.newtabpage.activity-stream.telemetry" = lock false;
99
-
"browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint" = lock "";
100
-
"browser.newtabpage.pinned" = lock [ ];
101
-
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = lock "";
102
-
"browser.urlbar.suggest.weather" = lock false;
103
-
"browser.urlbar.quicksuggest.scenario" = lock "offline";
104
-
"browser.urlbar.suggest.quicksuggest.nonsponsored" = lock false;
105
-
"browser.urlbar.suggest.quicksuggest.sponsored" = lock false;
106
107
-
# Devtools
108
-
"devtools.theme" = lock "dark";
109
-
"devtools.dom.enabled" = lock true;
110
-
"devtools.command-button-rulers.enabled" = lock true;
111
-
"devtools.command-button-measure.enabled" = lock true;
112
-
"devtools.command-button-screenshot.enabled" = lock true;
113
-
"devtools.toolbox.host" = lock "right";
114
-
"devtools.webconsole.persistlog" = lock true;
115
-
"devtools.webconsole.timestampMessages" = lock true;
116
117
-
# Privacy
118
-
"dom.private-attribution.submission.enabled" = lock false;
119
-
"privacy.globalprivacycontrol.enabled" = lock true;
120
-
};
121
122
Extensions.Install =
123
map (x: "https://addons.mozilla.org/firefox/downloads/latest/${x}/latest.xpi")
124
-
[
125
-
# Appearance
126
-
"catppuccin-mocha-green"
127
-
"darkreader"
128
-
"material-icons-for-github"
129
-
"refined-github-"
130
131
-
# Security / Privacy
132
-
"privacy-badger17"
133
-
"decentraleyes"
134
-
"canvasblocker"
135
-
"facebook-container"
136
137
-
## Ads / Youtube
138
-
"adnauseam"
139
-
"sponsorblock"
140
-
"youtube-shorts-block"
141
-
"dearrow"
142
143
-
# Information
144
-
"flagfox"
145
-
"awesome-rss"
146
147
-
# Devtools
148
-
"react-devtools"
149
-
"open-graph-preview-and-debug"
150
-
"wave-accessibility-tool"
151
-
"styl-us"
152
153
-
# Misc
154
-
"plasma-integration" # integration with MPRIS & KDE Connect
155
-
"keepassxc-browser" # integration with KeepassXC
156
-
"meowad" # Replace ads on Twitter with :3
157
-
];
158
159
ExtensionSettings."*" = {
160
default_area = "menupanel";
···
164
force = true;
165
default = "ddg@search.mozilla.orgdefault";
166
privateDefault = "ddg@search.mozilla.orgdefault";
167
-
engines =
168
-
let
169
-
mkEngineForceFavicon = aliases: queryUrl: iconUrl: {
170
-
definedAliases = aliases;
171
-
icon = iconUrl;
172
-
urls = [ { template = queryUrl; } ];
173
-
};
174
-
mkEngine =
175
-
aliases: queryUrl: iconExt:
176
-
(mkEngineForceFavicon aliases queryUrl (
177
-
let
178
-
noPath = lib.strings.concatStrings (
179
-
lib.strings.intersperse "/" (lib.lists.take 3 (lib.strings.splitString "/" queryUrl))
180
-
);
181
-
in
182
-
"${noPath}/favicon.${iconExt}"
183
-
));
184
-
in
185
-
{
186
-
# Dev
187
-
"GitHub Repos" =
188
-
mkEngineForceFavicon [ "@gh" "@github" ]
189
-
"https://github.com/search?type=repositories&q={searchTerms}"
190
-
"https://github.githubassets.com/favicons/favicon-dark.svg";
191
-
"SourceGraph" = mkEngine [
192
-
"@sg"
193
-
"@sourcegraph"
194
-
] "https://sourcegraph.com/search?q={searchTerms}" "png";
195
196
-
## Web
197
-
"MDN Web Docs" = mkEngine [
198
-
"@mdn"
199
-
] "https://developer.mozilla.org/en-US/search?q={searchTerms}" "ico";
200
-
"Web.Dev" =
201
-
mkEngineForceFavicon [ "@webdev" "@lighthouse" ] "https://web.dev/s/results?q={searchTerms}"
202
-
"https://www.gstatic.com/devrel-devsite/prod/vc7080045e84cd2ce1faf7f7a3876037748d52d088e5100df2e949d051a784791/web/images/favicon.png";
203
-
"Can I Use" = mkEngineForceFavicon [
204
-
"@ciu"
205
-
"@baseline"
206
-
] "https://caniuse.com/?search={searchTerms}" "https://caniuse.com/img/favicon-128.png";
207
-
"NPM" =
208
-
mkEngineForceFavicon [ "@npm" ] "https://www.npmjs.com/search?q={searchTerms}"
209
-
"https://static-production.npmjs.com/3dc95981de4241b35cd55fe126ab6b2c.png";
210
-
"Iconify" = mkEngine [
211
-
"@iconify"
212
-
"@icons"
213
-
] "https://icon-sets.iconify.design/?query={searchTerms}" "ico";
214
-
"Astro" = mkEngineForceFavicon [
215
-
"@astro"
216
-
] "https://a.stro.cc/{searchTerms}" "https://docs.astro.build/favicon.svg";
217
-
"Porkbun" = mkEngine [ "@porkbun" ] "https://porkbun.com/checkout/search?q={searchTerms}" "ico";
218
-
"Http.Cat" = mkEngine [ "@cat" "@hcat" "@httpcat" ] "https://http.cat/{searchTerms}" "ico";
219
220
-
## Rust
221
-
"Crates.io" = mkEngine [
222
-
"@crates"
223
-
"@cratesio"
224
-
"@cargo"
225
-
] "https://crates.io/search?q={searchTerms}" "ico";
226
-
"Rust Docs" =
227
-
mkEngineForceFavicon [ "@rust" "@rustdocs" "@ruststd" ]
228
-
"https://doc.rust-lang.org/std/index.html?search={searchTerms}"
229
-
"https://doc.rust-lang.org/static.files/favicon-2c020d218678b618.svg";
230
-
"Docsrs" = mkEngine [ "@docsrs" ] "https://docs.rs/releases/search?query={searchTerms}" "ico";
231
232
-
## Python
233
-
"PyPI" = mkEngineForceFavicon [
234
-
"@pypi"
235
-
"@pip"
236
-
] "https://pypi.org/search/?q={searchTerms}" "https://pypi.org/static/images/favicon.35549fe8.ico";
237
238
-
## .NET
239
-
"NuGet" = mkEngine [ "@nuget" ] "https://www.nuget.org/packages?q={searchTerms}" "ico";
240
241
-
## Linux Stuff
242
-
"Kernel Docs" = mkEngine [
243
-
"@lnx"
244
-
"@linux"
245
-
"@kernel"
246
-
] "https://www.kernel.org/doc/html/latest/search.html?q={searchTerms}" "ico";
247
-
"Arch Wiki" = mkEngine [
248
-
"@aw"
249
-
"@arch"
250
-
] "https://wiki.archlinux.org/index.php?title=Special%3ASearch&search={searchTerms}" "ico";
251
-
"Nerd Fonts" =
252
-
mkEngineForceFavicon [ "@nf" "@nerdfonts" ] "https://www.nerdfonts.com/cheat-sheet?q={searchTerms}"
253
-
"https://www.nerdfonts.com/assets/img/favicon.ico";
254
255
-
### Nix
256
-
"Nix Packages" = mkEngine [
257
-
"@nixpkgs"
258
-
] "https://search.nixos.org/packages?channel=unstable&size=500&query={searchTerms}" "png";
259
-
"NixOS Options" = mkEngine [
260
-
"@nixos"
261
-
] "https://search.nixos.org/options?channel=unstable&size=500&query={searchTerms}" "png";
262
-
"NixOS Wiki" = mkEngine [ "@nixwiki" ] "https://nixos.wiki/index.php?search={searchTerms}" "png";
263
-
"Home Manager Options" =
264
-
mkEngineForceFavicon [ "@hm" ]
265
-
"https://home-manager-options.extranix.com/?release=master&query={searchTerms}"
266
-
"https://home-manager-options.extranix.com/images/favicon.png";
267
-
"Noogle" = mkEngine [
268
-
"@noogle"
269
-
"@nixlib"
270
-
] "https://noogle.dev/q?limit=100&term={searchTerms}" "png";
271
-
"SourceGraph Nix" =
272
-
mkEngine [ "@sgn" "@yoink" ]
273
-
"https://sourcegraph.com/search?q=lang:Nix+-repo:NixOS/*+-repo:nix-community/*+{searchTerms}"
274
-
"png";
275
-
"Nixpkgs Issues" =
276
-
mkEngineForceFavicon [ "@nixissues" ]
277
-
"https://github.com/NixOS/nixpkgs/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+{searchTerms}"
278
-
"https://github.githubassets.com/favicons/favicon-dark.svg";
279
-
"NixVim Options" =
280
-
mkEngineForceFavicon [ "@nixvim" ]
281
-
"https://nix-community.github.io/nixvim/search/?option_scope=0&query={searchTerms}"
282
-
"https://nix-community.github.io/nixvim/search/favicon.ico";
283
284
-
# Media
285
-
"youtube" = mkEngine [ "@yt" ] "https://www.youtube.com/results?search_query={searchTerms}" "ico";
286
-
"Spotify" =
287
-
mkEngineForceFavicon [ "@sp" "@spotify" ] "https://open.spotify.com/search/{searchTerms}"
288
-
"https://open.spotifycdn.com/cdn/images/favicon16.1c487bff.png";
289
-
"Netflix" = mkEngine [ "@nfx" ] "https://www.netflix.com/search?q={searchTerms}" "ico";
290
-
"IMDb" = mkEngine [ "@imdb" ] "https://www.imdb.com/find?q={searchTerms}" "ico";
291
292
-
# Misc
293
-
"Firefox Add-ons" = mkEngine [
294
-
"@addons"
295
-
] "https://addons.mozilla.org/en-US/firefox/search/?q={searchTerms}" "ico";
296
-
"Urban Dictionary" = mkEngine [
297
-
"@ud"
298
-
"@urban"
299
-
] "https://www.urbandictionary.com/define.php?term={searchTerms}" "ico";
300
301
-
# Overrides
302
-
"History".metaData.alias = "@h";
303
-
"Bookmarks".metaData.alias = "@b";
304
-
"Tabs".metaData.alias = "@t";
305
-
"bing@search.mozilla.orgdefault".metaData.hidden = true;
306
-
"amazondotcom-us@search.mozilla.orgdefault".metaData.alias = "@amz";
307
-
"google@search.mozilla.orgdefault".metaData.alias = "@g";
308
-
"wikipedia@search.mozilla.orgdefault".metaData.alias = "@w";
309
-
};
310
};
311
};
312
};
···
2
lib,
3
pkgs,
4
...
5
+
}: {
0
0
6
nixpkgs.overlays = [
7
(final: prev: {
8
floorp-unwrapped =
···
14
# https://github.com/NixOS/nixpkgs/issues/418473
15
ltoSupport = false;
16
}).overrideAttrs
17
+
(prev: {
18
+
MOZ_DATA_REPORTING = "";
19
+
MOZ_TELEMETRY_REPORTING = "";
20
+
});
21
})
22
];
23
···
68
EmailTracking = true;
69
};
70
71
+
Preferences = let
72
+
lock = val: {
73
+
Value = val;
74
+
Status = "locked";
75
+
};
76
+
in {
77
+
# General
78
+
"browser.aboutConfig.showWarning" = lock false;
79
+
"media.eme.enabled" = lock true; # Encrypted Media Extensions (DRM)
80
+
"layout.css.prefers-color-scheme.content-override" = lock 0;
81
+
"browser.startup.page" = 3; # Restore previous session
82
+
"toolkit.telemetry.server" = lock "";
0
0
83
84
+
# New Tab
85
+
"browser.newtabpage.activity-stream.showSponsored" = lock false;
86
+
"browser.newtabpage.activity-stream.system.showSponsored" = lock false;
87
+
"browser.newtabpage.activity-stream.feeds.section.topstories" = lock false;
88
+
"browser.newtabpage.activity-stream.feeds.topsites" = lock false;
89
+
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock false;
90
+
"browser.newtabpage.activity-stream.showWeather" = lock false;
91
+
"browser.newtabpage.activity-stream.system.showWeather" = lock false;
92
+
"browser.newtabpage.activity-stream.feeds.weatherfeed" = lock false;
93
+
"browser.newtabpage.activity-stream.feeds.telemetry" = lock false;
94
+
"browser.newtabpage.activity-stream.telemetry" = lock false;
95
+
"browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint" = lock "";
96
+
"browser.newtabpage.pinned" = lock [];
97
+
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = lock "";
98
+
"browser.urlbar.suggest.weather" = lock false;
99
+
"browser.urlbar.quicksuggest.scenario" = lock "offline";
100
+
"browser.urlbar.suggest.quicksuggest.nonsponsored" = lock false;
101
+
"browser.urlbar.suggest.quicksuggest.sponsored" = lock false;
102
103
+
# Devtools
104
+
"devtools.theme" = lock "dark";
105
+
"devtools.dom.enabled" = lock true;
106
+
"devtools.command-button-rulers.enabled" = lock true;
107
+
"devtools.command-button-measure.enabled" = lock true;
108
+
"devtools.command-button-screenshot.enabled" = lock true;
109
+
"devtools.toolbox.host" = lock "right";
110
+
"devtools.webconsole.persistlog" = lock true;
111
+
"devtools.webconsole.timestampMessages" = lock true;
112
113
+
# Privacy
114
+
"dom.private-attribution.submission.enabled" = lock false;
115
+
"privacy.globalprivacycontrol.enabled" = lock true;
116
+
};
117
118
Extensions.Install =
119
map (x: "https://addons.mozilla.org/firefox/downloads/latest/${x}/latest.xpi")
120
+
[
121
+
# Appearance
122
+
"catppuccin-mocha-green"
123
+
"darkreader"
124
+
"material-icons-for-github"
125
+
"refined-github-"
126
127
+
# Security / Privacy
128
+
"privacy-badger17"
129
+
"decentraleyes"
130
+
"canvasblocker"
131
+
"facebook-container"
132
133
+
## Ads / Youtube
134
+
"adnauseam"
135
+
"sponsorblock"
136
+
"youtube-shorts-block"
137
+
"dearrow"
138
139
+
# Information
140
+
"flagfox"
141
+
"awesome-rss"
142
143
+
# Devtools
144
+
"react-devtools"
145
+
"open-graph-preview-and-debug"
146
+
"wave-accessibility-tool"
147
+
"styl-us"
148
149
+
# Misc
150
+
"plasma-integration" # integration with MPRIS & KDE Connect
151
+
"keepassxc-browser" # integration with KeepassXC
152
+
"meowad" # Replace ads on Twitter with :3
153
+
];
154
155
ExtensionSettings."*" = {
156
default_area = "menupanel";
···
160
force = true;
161
default = "ddg@search.mozilla.orgdefault";
162
privateDefault = "ddg@search.mozilla.orgdefault";
163
+
engines = let
164
+
mkEngineForceFavicon = aliases: queryUrl: iconUrl: {
165
+
definedAliases = aliases;
166
+
icon = iconUrl;
167
+
urls = [{template = queryUrl;}];
168
+
};
169
+
mkEngine = aliases: queryUrl: iconExt: (mkEngineForceFavicon aliases queryUrl (
170
+
let
171
+
noPath = lib.strings.concatStrings (
172
+
lib.strings.intersperse "/" (lib.lists.take 3 (lib.strings.splitString "/" queryUrl))
173
+
);
174
+
in "${noPath}/favicon.${iconExt}"
175
+
));
176
+
in {
177
+
# Dev
178
+
"GitHub Repos" =
179
+
mkEngineForceFavicon ["@gh" "@github"]
180
+
"https://github.com/search?type=repositories&q={searchTerms}"
181
+
"https://github.githubassets.com/favicons/favicon-dark.svg";
182
+
"SourceGraph" = mkEngine [
183
+
"@sg"
184
+
"@sourcegraph"
185
+
] "https://sourcegraph.com/search?q={searchTerms}" "png";
0
0
0
0
0
186
187
+
## Web
188
+
"MDN Web Docs" = mkEngine [
189
+
"@mdn"
190
+
] "https://developer.mozilla.org/en-US/search?q={searchTerms}" "ico";
191
+
"Web.Dev" =
192
+
mkEngineForceFavicon ["@webdev" "@lighthouse"] "https://web.dev/s/results?q={searchTerms}"
193
+
"https://www.gstatic.com/devrel-devsite/prod/vc7080045e84cd2ce1faf7f7a3876037748d52d088e5100df2e949d051a784791/web/images/favicon.png";
194
+
"Can I Use" = mkEngineForceFavicon [
195
+
"@ciu"
196
+
"@baseline"
197
+
] "https://caniuse.com/?search={searchTerms}" "https://caniuse.com/img/favicon-128.png";
198
+
"NPM" =
199
+
mkEngineForceFavicon ["@npm"] "https://www.npmjs.com/search?q={searchTerms}"
200
+
"https://static-production.npmjs.com/3dc95981de4241b35cd55fe126ab6b2c.png";
201
+
"Iconify" = mkEngine [
202
+
"@iconify"
203
+
"@icons"
204
+
] "https://icon-sets.iconify.design/?query={searchTerms}" "ico";
205
+
"Astro" = mkEngineForceFavicon [
206
+
"@astro"
207
+
] "https://a.stro.cc/{searchTerms}" "https://docs.astro.build/favicon.svg";
208
+
"Porkbun" = mkEngine ["@porkbun"] "https://porkbun.com/checkout/search?q={searchTerms}" "ico";
209
+
"Http.Cat" = mkEngine ["@cat" "@hcat" "@httpcat"] "https://http.cat/{searchTerms}" "ico";
210
211
+
## Rust
212
+
"Crates.io" = mkEngine [
213
+
"@crates"
214
+
"@cratesio"
215
+
"@cargo"
216
+
] "https://crates.io/search?q={searchTerms}" "ico";
217
+
"Rust Docs" =
218
+
mkEngineForceFavicon ["@rust" "@rustdocs" "@ruststd"]
219
+
"https://doc.rust-lang.org/std/index.html?search={searchTerms}"
220
+
"https://doc.rust-lang.org/static.files/favicon-2c020d218678b618.svg";
221
+
"Docsrs" = mkEngine ["@docsrs"] "https://docs.rs/releases/search?query={searchTerms}" "ico";
222
223
+
## Python
224
+
"PyPI" = mkEngineForceFavicon [
225
+
"@pypi"
226
+
"@pip"
227
+
] "https://pypi.org/search/?q={searchTerms}" "https://pypi.org/static/images/favicon.35549fe8.ico";
228
229
+
## .NET
230
+
"NuGet" = mkEngine ["@nuget"] "https://www.nuget.org/packages?q={searchTerms}" "ico";
231
232
+
## Linux Stuff
233
+
"Kernel Docs" = mkEngine [
234
+
"@lnx"
235
+
"@linux"
236
+
"@kernel"
237
+
] "https://www.kernel.org/doc/html/latest/search.html?q={searchTerms}" "ico";
238
+
"Arch Wiki" = mkEngine [
239
+
"@aw"
240
+
"@arch"
241
+
] "https://wiki.archlinux.org/index.php?title=Special%3ASearch&search={searchTerms}" "ico";
242
+
"Nerd Fonts" =
243
+
mkEngineForceFavicon ["@nf" "@nerdfonts"] "https://www.nerdfonts.com/cheat-sheet?q={searchTerms}"
244
+
"https://www.nerdfonts.com/assets/img/favicon.ico";
245
246
+
### Nix
247
+
"Nix Packages" = mkEngine [
248
+
"@nixpkgs"
249
+
] "https://search.nixos.org/packages?channel=unstable&size=500&query={searchTerms}" "png";
250
+
"NixOS Options" = mkEngine [
251
+
"@nixos"
252
+
] "https://search.nixos.org/options?channel=unstable&size=500&query={searchTerms}" "png";
253
+
"NixOS Wiki" = mkEngine ["@nixwiki"] "https://nixos.wiki/index.php?search={searchTerms}" "png";
254
+
"Home Manager Options" =
255
+
mkEngineForceFavicon ["@hm"]
256
+
"https://home-manager-options.extranix.com/?release=master&query={searchTerms}"
257
+
"https://home-manager-options.extranix.com/images/favicon.png";
258
+
"Noogle" = mkEngine [
259
+
"@noogle"
260
+
"@nixlib"
261
+
] "https://noogle.dev/q?limit=100&term={searchTerms}" "png";
262
+
"SourceGraph Nix" =
263
+
mkEngine ["@sgn" "@yoink"]
264
+
"https://sourcegraph.com/search?q=lang:Nix+-repo:NixOS/*+-repo:nix-community/*+{searchTerms}"
265
+
"png";
266
+
"Nixpkgs Issues" =
267
+
mkEngineForceFavicon ["@nixissues"]
268
+
"https://github.com/NixOS/nixpkgs/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+{searchTerms}"
269
+
"https://github.githubassets.com/favicons/favicon-dark.svg";
270
+
"NixVim Options" =
271
+
mkEngineForceFavicon ["@nixvim"]
272
+
"https://nix-community.github.io/nixvim/search/?option_scope=0&query={searchTerms}"
273
+
"https://nix-community.github.io/nixvim/search/favicon.ico";
274
275
+
# Media
276
+
"youtube" = mkEngine ["@yt"] "https://www.youtube.com/results?search_query={searchTerms}" "ico";
277
+
"Spotify" =
278
+
mkEngineForceFavicon ["@sp" "@spotify"] "https://open.spotify.com/search/{searchTerms}"
279
+
"https://open.spotifycdn.com/cdn/images/favicon16.1c487bff.png";
280
+
"Netflix" = mkEngine ["@nfx"] "https://www.netflix.com/search?q={searchTerms}" "ico";
281
+
"IMDb" = mkEngine ["@imdb"] "https://www.imdb.com/find?q={searchTerms}" "ico";
282
283
+
# Misc
284
+
"Firefox Add-ons" = mkEngine [
285
+
"@addons"
286
+
] "https://addons.mozilla.org/en-US/firefox/search/?q={searchTerms}" "ico";
287
+
"Urban Dictionary" = mkEngine [
288
+
"@ud"
289
+
"@urban"
290
+
] "https://www.urbandictionary.com/define.php?term={searchTerms}" "ico";
291
292
+
# Overrides
293
+
"History".metaData.alias = "@h";
294
+
"Bookmarks".metaData.alias = "@b";
295
+
"Tabs".metaData.alias = "@t";
296
+
"bing@search.mozilla.orgdefault".metaData.hidden = true;
297
+
"amazondotcom-us@search.mozilla.orgdefault".metaData.alias = "@amz";
298
+
"google@search.mozilla.orgdefault".metaData.alias = "@g";
299
+
"wikipedia@search.mozilla.orgdefault".metaData.alias = "@w";
300
+
};
301
};
302
};
303
};
+1
-26
nixosModules/graphics/shell.nix
···
28
## Waybar
29
qt6.qttools # For component
30
31
-
## Dolphin
32
-
kdePackages.dolphin
33
-
kdePackages.ark
34
-
kdePackages.kio-extras
35
-
kdePackages.kservice # Dolphin stupid?
36
-
libsForQt5.kservice
37
-
kdePackages.kdegraphics-thumbnailers
38
-
kdePackages.kimageformats
39
-
kdePackages.taglib
40
-
nufraw-thumbnailer
41
-
kdePackages.phonon
42
-
kdePackages.ffmpegthumbs
43
-
ffmpegthumbnailer
44
-
45
pavucontrol
46
47
wf-recorder
···
114
Service = service;
115
};
116
in {
117
-
dolphin = mkShellService {
118
-
desc = "Dolphin File Manager Daemon";
119
-
120
-
service = {
121
-
ExecStart = "${pkgs.kdePackages.dolphin}/bin/dolphin --daemon";
122
-
Restart = "on-failure";
123
-
RestartSec = "10";
124
-
BusName = "org.freedesktop.FileManager1";
125
-
};
126
-
};
127
-
128
battery-notif = mkShellService {
129
desc = "Battery Notification Service";
130
···
340
"SUPER ALT,C,exec,uwsm app -- rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | wl-copy\""
341
"SUPER,B,exec,uwsm app -- ${pkgs.rofi-bluetooth}/bin/rofi-bluetooth"
342
"SUPER,Tab,exec,uwsm app -- rofi -show window -show-icons"
343
-
"SUPER,E,exec,uwsm app -- ${pkgs.nushell}/bin/nu ${../../res/rofi/rofi-places.nu}"
344
"SUPER,N,exec,uwsm app -- ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"
345
"SUPER,A,exec,uwsm app -- pavucontrol --tab 5"
346
''SUPER,V,exec,cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy''
···
28
## Waybar
29
qt6.qttools # For component
30
0
0
0
0
0
0
0
0
0
0
0
0
0
0
31
pavucontrol
32
33
wf-recorder
···
100
Service = service;
101
};
102
in {
0
0
0
0
0
0
0
0
0
0
0
103
battery-notif = mkShellService {
104
desc = "Battery Notification Service";
105
···
315
"SUPER ALT,C,exec,uwsm app -- rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | wl-copy\""
316
"SUPER,B,exec,uwsm app -- ${pkgs.rofi-bluetooth}/bin/rofi-bluetooth"
317
"SUPER,Tab,exec,uwsm app -- rofi -show window -show-icons"
318
+
"SUPER,E,exec,uwsm app -- yazi.desktop"
319
"SUPER,N,exec,uwsm app -- ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"
320
"SUPER,A,exec,uwsm app -- pavucontrol --tab 5"
321
''SUPER,V,exec,cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy''
+12
-68
nixosModules/graphics/xdg.nix
···
3
lib,
4
...
5
}: {
0
0
0
0
0
0
0
0
0
0
0
0
6
home-manager.users.bean.xdg = {
7
enable = true;
8
userDirs = let
···
18
extraConfig = {
19
"XDG_SCREENSHOTS_DIR" = "${homeDirectory}/Pictures/Screenshots";
20
};
21
-
};
22
-
mimeApps = {
23
-
enable = true;
24
-
defaultApplications = let
25
-
types = {
26
-
browser = [
27
-
"text/html"
28
-
"application/pdf"
29
-
"x-scheme-handler/http"
30
-
"x-scheme-handler/https"
31
-
"x-scheme-handler/ftp"
32
-
"x-scheme-handler/about"
33
-
"x-scheme-handler/unknown"
34
-
];
35
-
code = [
36
-
"application/json"
37
-
"application/xml"
38
-
"application/yaml"
39
-
"text/english"
40
-
"text/plain"
41
-
"text/x-makefile"
42
-
"text/x-c++hdr"
43
-
"text/x-c++src"
44
-
"text/x-chdr"
45
-
"text/x-csrc"
46
-
"text/x-java"
47
-
"text/x-moc"
48
-
"text/x-pascal"
49
-
"text/x-tcl"
50
-
"text/x-tex"
51
-
"text/x-rust"
52
-
"application/x-shellscript"
53
-
"text/x-c"
54
-
"text/x-c++"
55
-
];
56
-
image = ["image/*"];
57
-
av = [
58
-
"video/*"
59
-
"audio/*"
60
-
];
61
-
dir = ["inode/directory"];
62
-
};
63
-
fileBrowsers = ["org.kde.dolphin.desktop"];
64
-
textEditors = [
65
-
"neovide.desktop"
66
-
"nvim.desktop"
67
-
];
68
-
browsers = [
69
-
"floorp.desktop"
70
-
"chromium.desktop"
71
-
];
72
-
imageViewers =
73
-
[
74
-
"org.gnome.Loupe.desktop"
75
-
]
76
-
++ browsers;
77
-
avPlayers =
78
-
[
79
-
"QMPlay2.desktop"
80
-
]
81
-
++ browsers;
82
-
genTypeHandler = type: handlers: lib.genAttrs type (_: handlers);
83
-
in
84
-
(genTypeHandler types.code textEditors)
85
-
// (genTypeHandler types.av avPlayers)
86
-
// (genTypeHandler types.image imageViewers)
87
-
// (genTypeHandler types.dir fileBrowsers)
88
-
// (genTypeHandler types.browser browsers);
89
};
90
};
91
}
···
3
lib,
4
...
5
}: {
6
+
xdg.mime = {
7
+
removedAssociations = {
8
+
"inode/directory" = ["QMPlay2.desktop" "QMPlay2_enqueue.desktop"];
9
+
};
10
+
defaultApplications = {
11
+
"application/pdf" = "floorp.desktop";
12
+
"image/*" = ["org.gnome.Loupe.desktop" "floorp.desktop" "chromium-browser.desktop"];
13
+
"text/*" = "neovide.desktop";
14
+
"inode/directory" = "yazi.desktop";
15
+
};
16
+
};
17
+
18
home-manager.users.bean.xdg = {
19
enable = true;
20
userDirs = let
···
30
extraConfig = {
31
"XDG_SCREENSHOTS_DIR" = "${homeDirectory}/Pictures/Screenshots";
32
};
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
33
};
34
};
35
}
+3
-8
nixosModules/imperm.nix
···
77
++ (preShare [
78
"Steam"
79
"Trash"
80
-
"dolphin"
81
])
82
++ (preConf [
83
"gh"
···
136
"nvim"
137
"Cemu"
138
]);
139
-
files =
140
-
(preConf [
141
-
"nushell/history.txt"
142
-
])
143
-
++ (preShare [
144
-
"user-places.xbel"
145
-
]);
146
};
147
};
148
}
···
77
++ (preShare [
78
"Steam"
79
"Trash"
0
80
])
81
++ (preConf [
82
"gh"
···
135
"nvim"
136
"Cemu"
137
]);
138
+
files = preConf [
139
+
"nushell/history.txt"
140
+
];
0
0
0
0
141
};
142
};
143
}
-32
res/rofi/rofi-places.nu
···
1
-
#!/usr/bin/env nu
2
-
3
-
let contents = open ~/.local/share/user-places.xbel
4
-
5
-
let hash = $contents | hash md5
6
-
7
-
let cache = ['~' '.cache' 'rofi-places' $hash] | path join | path expand
8
-
let dataPath = [$cache "data.nuon"] | path join
9
-
10
-
let display_loc = {|it| (if ($it | str starts-with "file://") { $it | str substring 7.. } else { $it } | str replace $"/home/($env.USER)" "~")}
11
-
12
-
let places = if ($dataPath | path exists) {
13
-
open $dataPath
14
-
} else {
15
-
let places = $contents | lines | skip 2 | str join "\n" | from xml | get content | where tag == "bookmark" | where attributes.href != "" | each {|it| {loc: $it.attributes.href, disp_loc: ($it.attributes.href | each $display_loc), name: ($it.content | where tag == "title" | get content.0.content.0), icon: ($it.content | where tag == "info" | get content.0.content.0 | where tag == "icon" | get attributes.name.0 )} }
16
-
mkdir $cache
17
-
$places | to nuon | save $dataPath
18
-
$places
19
-
}
20
-
21
-
let menu = $places | each {|it| $"($it.name) <span color=\"#A2A2A2\"><i><small>\(($it.disp_loc)\)</small></i></span> \u{0}icon\u{1f}($it.icon)" } | str join "\n"
22
-
23
-
let res = ($menu | rofi -dmenu -i -markup-rows -show-icons -p "Dolphin" | complete)
24
-
25
-
if $res.exit_code == 1 {
26
-
echo "Cancelled"
27
-
} else {
28
-
let name = $res.stdout | split row " <span color=\"#A2A2A2\">" | get 0
29
-
let loc = $places | where name == $name | get 0.loc
30
-
echo $"Opening ($loc)"
31
-
dolphin --new-window $loc
32
-
}
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0