Compare commits

...

265 Commits

Author SHA1 Message Date
422c7c50f7 dev(vscode): use gruvbox theme 2025-01-27 09:37:43 -05:00
3108fe8da8 pkgs(dev): use nodejs 22 2025-01-27 09:37:34 -05:00
f3d4eea2d3 TEMP: disable broken modules 2025-01-10 20:44:17 -05:00
d50b07e1b4 fix(vscode): replace nil with nix_d 2025-01-10 20:44:17 -05:00
e73d4cb442 fix(overlays): use unstable ghostscript 2025-01-10 20:44:17 -05:00
877a149127 feat: add nushell module 2025-01-10 20:43:32 -05:00
7a381aa807 dev: add pandoc for R 2025-01-10 20:43:32 -05:00
88f4b1b6c4 machines: add work machine 2025-01-03 22:35:41 -05:00
9214e48791 refactor(zsh): migrate to new configuration format 2025-01-03 22:35:41 -05:00
a1e088fb35 feat: upgrade to nixos 24.11 2024-12-22 15:03:43 -05:00
b4ea5e4085 fix(mealie): use unstable module for mealie v2 2024-12-22 14:38:01 -05:00
3fe1ca3cce fix: remove flatpak from common config 2024-12-22 14:36:03 -05:00
0db64b9a93 chore: update flake inputs 2024-12-22 14:35:53 -05:00
efe3619c3d dev: add quarto and python tools 2024-12-14 12:00:14 -05:00
fa9f5cf943 machines(terra): decrease mouse sensitivity 2024-12-14 11:59:29 -05:00
aedbd9e196 machines(terra): add thunderbird 2024-12-14 11:59:29 -05:00
c4178a70b7 dev: update to deno v2 2024-10-23 10:50:03 -04:00
1542463b39 chore: update lockfile 2024-10-23 10:49:54 -04:00
7a7cc45082 fix(latex): add additional packages 2024-10-11 11:57:28 -04:00
791d764ff6 fix(dev): add lazygit, improve rust 2024-10-11 11:57:21 -04:00
b518a4dc85 chore: update lockfile 2024-09-24 13:15:57 -04:00
f356dd720d feat(nvim/python): add language config 2024-09-23 13:45:38 -04:00
06c3702067 refactor(nvim/latex): switch from vimtex to texlab 2024-09-23 13:45:38 -04:00
8ef4737491 feat(dev): add R packages 2024-09-23 13:45:36 -04:00
ec6cceb9ae Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-09-22 15:01:33 -04:00
f78d27890f feat: add nextcloud module 2024-09-22 15:01:31 -04:00
224b97e6aa feat(vscode): add R packages & settings 2024-09-09 12:14:04 -04:00
15974e98d3 fix(machines/terra): add michael to networkmanager group 2024-09-07 11:59:12 -04:00
bee3f439db feat(machines/terra): add inkscape 2024-09-07 11:59:12 -04:00
be818373d5 fix(ags): move hyprpicker to general dependencies 2024-09-07 11:59:12 -04:00
33e4d5b28b feat(nvim): add flutter development tools 2024-09-07 11:59:12 -04:00
9716079bb9 refactor(mac): use nvim-custom for nvim 2024-09-06 14:15:06 -04:00
64a8b8cde2 feat: add latex language support 2024-09-06 14:15:06 -04:00
a2654d7fdd fix(markdown-preview): set default browser to firefox 2024-09-06 14:15:06 -04:00
b80a9583ef fix(nvim/mdx): use updated extraFiles syntax 2024-09-06 14:15:06 -04:00
b4f42c62ce Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-09-06 13:30:27 -04:00
b605f49af6 feat(machines/nova): enable mealie module 2024-09-06 13:30:22 -04:00
454081de9e refactor(environments/nixos-server): switch to nvim-custom 2024-09-06 13:30:02 -04:00
aaeabb1f3f refactor: move zoxide to the zsh module 2024-09-06 13:29:44 -04:00
05531ae666 feat(services/mealie): init module 2024-09-06 13:29:14 -04:00
98dc94d2a7 chore(nvim): upgrade eslint_d to v14 to support eslint v9 2024-08-09 13:17:29 -04:00
eabc8c0582 feat(nvim): add mdx language support 2024-08-09 13:17:29 -04:00
fb4a7ee2a3 fix(nvim): make typescript vue work 2024-08-09 13:17:29 -04:00
030cbaf9ba fix(nvim/luasnip): update to new settings schema 2024-08-05 17:21:50 -04:00
d2ebcb83de chore: update lockfile 2024-08-05 17:19:32 -04:00
01ed5d6093 feat(environments/nixos): replace lazyvim with nixvim 2024-08-05 16:57:39 -04:00
da87dc6380 feat(machines/terra): configuration updates 2024-08-05 16:57:39 -04:00
cd971466a2 fix(hyprland): make electron apps use wayland for proper fractional scaling 2024-08-05 16:57:39 -04:00
8496a112ba fix(hyprland): use hyprland from nixpkgs, fixing mesa issues 2024-08-05 16:57:39 -04:00
10a5f8e136 fix(hyprland): add mouse bindings for move and resize 2024-08-05 16:57:20 -04:00
739b1ae6c5 refactor(hyprland): move from wofi to fuzzel 2024-08-05 16:57:20 -04:00
722f98834a fix(nvim): add some additional keybindings 2024-08-05 16:57:20 -04:00
2eb6fd6341 fix(nvim/lazygit): add lazygit to extraPackages 2024-08-05 16:57:20 -04:00
a051d107da feat(nvim/lualine): add command and mode 2024-08-05 16:57:20 -04:00
e7c5986b79 feat(nvim): upgrade to nvim v10 and nixvim unstable 2024-08-05 16:57:20 -04:00
cd45accb8a refactor(machines) rename tower -> nova 2024-08-02 17:19:20 -04:00
3d9bab034b fix(tower): add static IP configuration 2024-08-02 16:43:52 -04:00
faa11b525a fix(dev): add necessary deps for rust on darwin 2024-08-02 09:46:53 -04:00
c887677560 fix(mac): install spicetify from nixpkgs master 2024-08-02 09:46:53 -04:00
c843170b5d feat(nvim): add neoconf.nvim 2024-08-02 09:46:53 -04:00
2ed0bfc81a fix(nvim): make closing buffers work as expected 2024-08-02 09:46:53 -04:00
8da217aee3 fix(nvim): remove disable arrow keys bindings 2024-08-02 09:46:53 -04:00
eb0b879bea fix(nvim): re-enable luasnip 2024-07-18 21:54:27 -04:00
aa240a91d1 fix(nvim/conform): add formatters to extraPackages 2024-07-17 09:09:02 -04:00
5f6b41face feat: add tower machine 2024-07-17 09:08:16 -04:00
7bbc60225f Merge pull request 'refactor: new configuration structure using flake-parts' (#1) from refactor/flake-parts into main
Reviewed-on: #1
2024-07-17 08:24:03 -04:00
7d06a33d77 chore: remove unused home configurations 2024-07-04 14:34:32 -04:00
8a9b7280c6 refactor: move nix settings to system module, remove unused modules 2024-07-04 14:34:32 -04:00
573020d857 refactor: migrate darwin configurations to flake-parts 2024-07-04 14:34:32 -04:00
bf813fab5b refactor(server): move module to new directory 2024-07-04 14:34:10 -04:00
1251761da2 refactor(steam): migrate to options module 2024-07-04 14:34:10 -04:00
7ed2e62180 refactor(ags): migrate to options module 2024-07-04 14:34:10 -04:00
e23da5d12c refactor(hyprland): migrate to options module 2024-07-04 14:34:10 -04:00
ee47690a8f refactor: migrate nixos configurations to flake-parts configuration structure 2024-07-04 14:34:10 -04:00
0c4d9ea95f chore: format 2024-07-04 13:56:44 -04:00
60a95afd3b chore(ironbar): remove unused module 2024-07-04 13:51:44 -04:00
b2e61f97f1 chore: remove unused wsl work config 2024-07-04 13:15:09 -04:00
2977e8319a feat(nvim): add language servers and formatters for web dev 2024-07-04 12:46:37 -04:00
8e4958ef0a fix(nvim/toggleterm): temporarily disable unsupported options 2024-07-04 12:44:03 -04:00
18e7c1ccda Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-07-04 12:41:45 -04:00
777d9ed9d7 fix(zellij): disable zsh integration 2024-07-04 12:40:56 -04:00
30085af9c1 fix(nvim): update settings 2024-07-04 12:40:35 -04:00
f32dcf243a chore: update lockfile 2024-07-04 12:06:03 -04:00
a12483560a fix(nvim): use stable nixpkgs 2024-07-04 12:05:48 -04:00
2449eabf7c chore(vscode): remove deprecated plugin 2024-07-04 12:03:18 -04:00
9bba7b5da5 feat(hyprland): update configuration for ags, swaybg, hypridle, and hyprlock 2024-07-04 12:03:17 -04:00
bde31cc496 chore(waybar): remove unused module 2024-07-04 11:00:06 -04:00
70132fb2ab Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-07-04 10:29:22 -04:00
9da230845a chore(lazyvim): update and enable neoconf 2024-07-04 10:28:40 -04:00
f49de13212 feat(nvim): use stable release channel 2024-07-04 10:24:30 -04:00
c1e881e49a feat(nvim): add useful shortcuts from lazyvim 2024-07-04 10:23:55 -04:00
48e223e5f0 feat(nvim): add astro and vue to lsp config 2024-07-04 10:23:23 -04:00
3420f6aa04 fix(nvim/wilder): add necessary plugins & packages 2024-06-29 14:19:19 -04:00
e22a20f503 fix(nvim): disable unused plugins 2024-06-29 14:18:47 -04:00
84179a714d feat(nvim): add statuscol plugin 2024-06-29 14:18:25 -04:00
2a456cf0ea chore(vscode): reorder settings 2024-06-29 11:23:37 -04:00
1a73589d28 fix(yabai): change padding 2024-06-29 11:23:06 -04:00
a8a7ac2f89 fix(services/forgejo): add default value for submodule 2024-06-26 19:08:05 -04:00
45d5270526 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-26 18:56:35 -04:00
41122b7b5f fix(services/forgejo): enable notification emails 2024-06-26 18:56:20 -04:00
caf74e5636 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-26 18:52:29 -04:00
30fc7bf0a8 feat(lazyvim): add json to lint config 2024-06-26 18:52:27 -04:00
5bb8c34862 feat(nvim/lsp): do not install rustc and cargo 2024-06-26 18:52:01 -04:00
8463239b39 feat(applications): add libreoffice 2024-06-26 18:51:45 -04:00
b68ab3883d chore(lazyvim): update lockfile 2024-06-26 18:50:45 -04:00
147b659960 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-26 18:49:35 -04:00
8446d263da feat(lazyvim): update config 2024-06-26 18:48:58 -04:00
40722d84c5 feat(nvim/neo-tree): enable and configure 2024-06-26 18:47:53 -04:00
fb42002a18 fix(services/forgejo): set runner capacity to 1 2024-06-19 10:47:57 -04:00
785cf77e89 feat(services/forgejo): configure mailer with sendgrid 2024-06-19 10:10:12 -04:00
5c816c5b0a chore(nvim): update lockfile 2024-06-18 16:34:06 -04:00
976942c353 feat(services/forgejo): add nix label for forgejo actions 2024-06-18 16:33:37 -04:00
6fd64b0a68 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-17 09:40:55 -04:00
b746ec813f chore: update lockfile 2024-06-16 15:15:15 -04:00
26d749fa04 fix(thinkcentre): migrate to new syntax for xkb options 2024-06-16 15:14:41 -04:00
9059e76b26 fix: do not merge modules incorrectly 2024-06-16 15:07:20 -04:00
068376e3a6 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-16 12:26:25 -04:00
e7d91950d2 feat: add ags module 2024-06-16 12:25:51 -04:00
b8efbc8f7d fix(nvim/cmp): reorganize and comment 2024-06-14 17:13:46 -04:00
629b5ce741 chore(nvim/toggleterm): remove debug print 2024-06-14 17:13:29 -04:00
43e6060c90 chore(nvim): remove autopairs module 2024-06-14 17:13:14 -04:00
69b0d77b38 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-14 16:59:06 -04:00
962917fd6c chore: update lockfile 2024-06-14 16:58:52 -04:00
0257c9f30b chore(nvim): remove unused modules 2024-06-14 16:41:23 -04:00
553a0f269c feat(nvim): update configuration 2024-06-13 01:27:57 +02:00
f5b275385c feat(nvim/toggleterm): position based on screen size 2024-06-13 01:27:20 +02:00
7908f337e3 feat(nvim/alpha): update dashboard to match lazyvim mostly 2024-06-13 01:23:24 +02:00
4281afe9cf wip(nvim/lualine): make similar to lazyvim bar 2024-06-13 01:23:01 +02:00
b64dd718c1 fix(nvim/lspsaga): disable breadcrumbs 2024-06-13 01:22:37 +02:00
18ba939e26 fix(nvim/lsp): use correct icons 2024-06-13 01:22:16 +02:00
04fa8c1ab2 feat(nvim/bufferline): use lazyvim style and icons 2024-06-13 01:21:50 +02:00
b25a89b471 fix(nvim): typo in nix linter name 2024-06-13 01:21:15 +02:00
730b589fd1 fix(nvim): disable unwanted modules, add gruvbox 2024-06-13 01:20:59 +02:00
d04ce5cca4 feat(nvim): add icons globals 2024-06-13 01:20:27 +02:00
063cf3e619 fix: add baseHomeModule to outer scope for mac config 2024-06-08 02:17:17 -04:00
4f3c9ee48f Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-08 01:51:25 -04:00
b6f165fd3d chore(nvim): update lockfile 2024-06-08 01:49:40 -04:00
e0bf71ef63 fix(forgejo): add labels for regularly used container images 2024-06-08 01:48:58 -04:00
26abc8c1f3 fix(oracle): use correct home module 2024-06-07 05:20:16 +00:00
ff29e743d9 wip(homer): add gruvbox theme colors 2024-06-06 20:27:27 +00:00
52922f8efa fix(forgejo): use correct caddyfile syntax 2024-06-06 20:27:11 +00:00
898f440a69 feat: add neptune as a wireguard client 2024-06-06 20:26:56 +00:00
e4d7402948 fix(nvim-custom): update toggleterm config 2024-06-03 20:23:09 -04:00
b9955a947f fix(nvim-custom): change modules 2024-06-03 20:22:40 -04:00
5c50fa6379 fix(nvim-custom): add dependencies to lint config 2024-06-03 20:21:01 -04:00
4d876ac1cf feat(yabai): add shortcut for alacritty 2024-06-03 17:58:01 -04:00
3162e64534 chore: remove unused emacs module 2024-06-03 17:57:21 -04:00
1b8b451999 fix(mac): remove emacs module 2024-06-03 17:56:56 -04:00
e413da516b chore(dev): remove unused kubernetes packages 2024-06-03 17:56:35 -04:00
82479daa4c fix(alacritty): use new config format 2024-06-03 17:56:16 -04:00
6f61595b35 fix(nixvim): use correct telescope keybinds 2024-06-03 17:25:49 -04:00
e64b39b896 feat: initial nixvim configuration 2024-06-03 17:25:35 -04:00
a4947f9b71 feat: upgrade to nixos 24.05 2024-06-03 15:30:53 -04:00
5814fa8ec1 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-03 15:25:23 -04:00
febc9ee925 feat(nvim): disable rust extra, manually configure lsp 2024-06-03 15:24:11 -04:00
9c9960d630 fix(git): add venus server as oauth provider 2024-06-03 11:49:57 -04:00
a9dc2f0f4b chore(nvim): update lockfile 2024-06-03 11:49:42 -04:00
ece337586c feat(hyprland): move to ironbar
might ultimately move to ags, this is just a stopgap
2024-06-03 11:49:05 -04:00
c6cc3d79b8 fix(hyprland): support steam 2024-06-03 11:48:35 -04:00
66b68354e0 feat(terra): add applications for hypermath development 2024-06-03 11:48:05 -04:00
1bf2f49707 fix(terra): set nvim as default editor 2024-06-03 11:47:35 -04:00
b4b50ab8ae chore(terra): format 2024-06-03 11:47:20 -04:00
f4c8294ded refactor: use shared module for home environments 2024-06-03 11:46:47 -04:00
780ef66712 fix(nvim): add prettier as css formatter 2024-06-03 11:44:08 -04:00
63ac50fa23 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-06-03 11:43:55 -04:00
0bb07cba5a feat(ironbar): add module 2024-06-03 11:43:54 -04:00
f09894d0dc fix(forgejo): add caddy error message 2024-05-30 08:21:16 -04:00
d855614811 chore: update lockfile 2024-05-29 23:48:14 -04:00
f5ca1dd665 fix(forgejo): redirect to Keycloak login page automatically 2024-05-27 13:35:36 -04:00
28cc9c48b2 feat(forgejo): add actions runner 2024-05-20 19:32:35 -04:00
ac6c8ef84d fix(nixos): use correct path to zellij module 2024-05-20 14:25:08 -04:00
42fe45ad98 feat(keycloak): use unstable package 2024-05-20 14:24:45 -04:00
363a40a814 feat(keywind): dark mode 2024-05-20 14:24:35 -04:00
678563cffe chore(firefox): update firefox-gnome-theme 2024-05-16 15:54:07 -04:00
7b20ca3586 feat(nixos): add zellij module 2024-05-16 15:53:52 -04:00
62b7e88709 feat(hyprland): add keyd config 2024-05-16 15:53:43 -04:00
daeb06b7a2 feat(hyprland): move to tuigreet 2024-05-16 15:53:34 -04:00
809f3267e1 fix(hyprland): match mesa version to hyprland version 2024-05-16 15:52:56 -04:00
d554c8fbf2 fix(hyprland): use correct cursor theme in all apps 2024-05-16 15:52:35 -04:00
7bcda9193b feat(applications): add steam 2024-05-15 22:37:19 -04:00
33866181e7 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-05-15 22:36:21 -04:00
03377050f6 feat(machines): add terra 2024-05-15 22:36:15 -04:00
6d6252c5f8 chore: update lockfile 2024-05-15 22:33:01 -04:00
6f5fd7b0d3 fix(mac): do not use defaultModules 2024-05-15 22:32:56 -04:00
a976e9ed8e chore: remove loft system 2024-05-15 22:32:45 -04:00
1c3fcb00b2 feat(zellij): add configuration 2024-05-15 22:28:21 -04:00
4482f8aaa8 fix(homer): add description option 2024-05-10 01:29:47 +00:00
1ecaac36e4 fix(forgejo): move dashboard config to proxy section 2024-05-09 11:14:53 -04:00
6f29e619bf fix(homer): add file name to pkgs.writeText 2024-05-09 09:33:16 -04:00
6646e8f99d wip: homer config module 2024-05-09 09:31:21 -04:00
d9743ef273 feat: initial homer support 2024-05-09 12:27:42 +00:00
d3e4d34ea6 wip: add homer service 2024-05-08 20:43:47 -04:00
6b07f32e6c feat(pkgs): add homer 2024-05-08 20:43:39 -04:00
cd2f42a344 feat(homepage-dashboard): add services option 2024-05-08 20:11:04 -04:00
ef434f6dcf fix(oracle): use correct proxy ip 2024-05-08 16:14:27 -04:00
d1ef7bc3ea fix(forgejo): use domain instead of full url 2024-05-08 16:02:53 -04:00
117c5d6ef9 chore(oracle): remove unused virtual hosts 2024-05-08 16:00:52 -04:00
c8d2a40b01 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-05-08 15:49:45 -04:00
b73ee34bef feat: add homepage-dashboard module 2024-05-08 15:48:15 -04:00
fc16b83011 chore(thinkcentre): remove comment 2024-05-08 15:34:04 -04:00
75eb7da5a7 fix(oracle): add domain 2024-05-08 18:59:30 +00:00
5c6270a5d7 fix(forgejo): convert port to string 2024-05-08 14:56:14 -04:00
3fd4e28a2e refactor: move forgejo to new server module structure 2024-05-08 14:49:54 -04:00
646d15f8ee fix(oracle): typo 2024-05-08 11:02:38 -04:00
f65babd85a feat(oracle): update configuration.nix 2024-05-08 14:41:21 +00:00
0da02d747a fix(nix): use new configuration syntax 2024-05-07 20:53:47 -04:00
129531432f feat(thinkcentre): add forgejo 2024-05-07 20:53:33 -04:00
7e6b142517 feat(keycloak): add keywind theme 2024-05-07 20:53:09 -04:00
a345fb7849 feat: overhaul overlays module 2024-05-07 20:52:31 -04:00
5cf5528307 chore: remove unused overlays 2024-05-07 20:51:54 -04:00
b34a820a9e feat(pkgs/keycloak-theme-keywind): add package 2024-05-07 20:33:27 -04:00
c849583f7a fix(dev): add devenv, make direnv quieter 2024-05-07 11:26:09 -04:00
1cf1717608 fix(nvim): disable dumb root_spec default 2024-05-07 11:25:30 -04:00
23fdaae3e5 fix(nvim): add prettier as formatter for yaml files 2024-05-07 11:25:15 -04:00
6b9ca1f09d fix(nix): add michael as trusted nix user 2024-05-07 11:24:34 -04:00
815cc42d75 feat(user): add zellij module 2024-05-07 11:23:54 -04:00
1e2ed24b4f Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-05-06 21:42:25 -04:00
0421364706 chore: remove unused p10k config 2024-05-06 21:42:15 -04:00
b03c42e9dd fix(thinkcentre): allow traggo through firewall 2024-05-06 21:38:36 -04:00
0870c20e4e feat: add traggo container 2024-05-06 21:23:33 -04:00
af4e9f6de4 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-05-02 12:50:18 -04:00
f372494546 fix(yabai): format 2024-05-02 12:48:59 -04:00
09fa25b88f chore(nvim): update lockfile 2024-05-01 12:00:55 -04:00
f716ef2719 fix(nvim): add separator to lualine 2024-05-01 11:59:26 -04:00
9392a7904a Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-05-01 11:43:43 -04:00
05212ed159 feat: customize vim configuration 2024-05-01 11:43:40 -04:00
451df03f73 Merge branch 'main' of https://git.thomasfamily.duckdns.org/michael/nix-dots 2024-05-01 11:05:22 -04:00
ef506252b9 fix(nixos): enable home-manager module in home-manager 2024-05-01 11:05:18 -04:00
9bd4e580c7 fix(fonts): add zedmono nerd font 2024-05-01 00:45:43 -04:00
72c91a682a feat(mac): add alacritty module 2024-05-01 00:42:28 -04:00
4f2121798e feat(applications): add alacritty 2024-05-01 00:41:10 -04:00
6d620fe0cd chore: update lockfile 2024-04-28 23:03:28 -04:00
49832454dc fix(latex): add 'exam' package 2024-04-28 23:00:20 -04:00
d71614ac07 fix(zsh): enable 'correct' option 2024-04-28 22:59:59 -04:00
3067d96eba fix(dev): update java to v21 2024-04-28 22:59:28 -04:00
bf7cc65df3 feat(nvim): upgrade lazyvim to v3 2024-04-28 18:19:10 -04:00
32a7404a02 fix(zsh): do not load global nixos config 2024-04-28 18:12:03 -04:00
5d0d5f7fb1 feat(zsh): remove prezto for faster start times 2024-04-28 16:45:32 -04:00
71f2e67235 chore: update lazy.nvim 2024-04-17 09:27:54 -04:00
e0a19056d2 feat: add hosts module 2024-04-17 09:26:51 -04:00
a487049887 chore: remove unnecessary comment 2024-04-17 09:26:40 -04:00
d90a4fb372 feat(venus): add keycloak 2024-04-16 17:11:04 -04:00
440fd28d28 fix(thinkcentre): add oracle as authorized ssh user 2024-04-16 10:31:03 -04:00
86679ffcc8 fix(thinkcentre): add wireguard keepalive 2024-04-16 10:30:47 -04:00
007969cdb5 fix(git_nixos): move to git-credential-manager 2024-04-16 10:30:36 -04:00
99dde2f4f2 fix(oracle): rekey wireguard secret 2024-04-16 13:34:01 +00:00
0ed08e8f0c fix(oracle): correct syntax and open firewall 2024-04-16 13:33:45 +00:00
0691019f49 chore: add thinkcentre wireguard secret 2024-04-15 20:10:27 -04:00
c59cebdc32 fix(thinkcentre): corect syntax 2024-04-15 20:10:08 -04:00
392e4ed24d Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-04-15 19:53:24 -04:00
77eac934bf chore(thinkcentre): enable ssh access 2024-04-15 19:52:45 -04:00
8754bea418 wip: wireguard tunnel configurations 2024-04-15 23:51:39 +00:00
e3020dd7b5 fix(oracle): make neovim default editor 2024-04-15 23:32:15 +00:00
f413a786b8 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-04-14 17:41:26 -04:00
7af13cdccb fix(agenix): pass keys as lists 2024-04-14 17:41:23 -04:00
1ed8d522ae fix(oracle): change hostname 2024-04-14 21:36:01 +00:00
680c0d90fb feat(oracle): add agenix 2024-04-14 21:35:47 +00:00
f6c8c07a75 Merge branch 'main' of https://git.thomasfmly.org/michael/nix-dots 2024-04-14 17:28:13 -04:00
ab6070b63b wip: add agenix 2024-04-14 17:28:07 -04:00
70116909c6 chore: update lockfile 2024-04-11 22:29:12 +00:00
7b1a8d3afc packages(nixos-server): add lazygit 2024-04-11 22:29:06 +00:00
640fe6418b fix(oracle): add nix module 2024-04-11 22:28:46 +00:00
1ca1f7edac chore: update .editorconfig 2024-04-11 21:50:24 +00:00
d5adb7f0b1 feat: add oracle machine 2024-04-11 21:50:14 +00:00
6db28375b8 fix(hyprland): enable gvfs for nautilus 2024-04-10 20:00:29 -04:00
185 changed files with 7814 additions and 2020 deletions

View File

@ -1,5 +1,6 @@
root=true
[*]
indent_style: tab
indent_style: space
indent_size: 2
end_of_line: lf

23
common/default.nix Normal file
View File

@ -0,0 +1,23 @@
{
inputs,
config,
lib,
...
}: {
imports =
[
(lib.mkAliasOptionModule ["hm"] [
"home-manager"
"users"
config.my.user
])
]
++ lib.my.getModules [./.];
hm.imports = [./home.nix];
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.useGlobalPkgs = true;
}

18
common/home.nix Normal file
View File

@ -0,0 +1,18 @@
{
inputs,
lib,
pkgs,
...
}: {
imports = lib.my.getHmModules [./.];
my = {
nushell.enable = true;
};
# let standalone home-manager and home-manager in nixos/nix-darwin use the same derivation
home.packages = [
(pkgs.callPackage (inputs.home-manager + /home-manager) {path = inputs.home-manager;})
];
# home.stateVersion = "23.11";
}

26
common/my/default.nix Normal file
View File

@ -0,0 +1,26 @@
{lib, ...}: let
inherit (lib) mkOption types;
in {
options.my = {
user = mkOption {type = types.str;};
name = mkOption {type = types.str;};
email = mkOption {type = types.str;};
uid = mkOption {type = types.int;};
keys = mkOption {type = types.listOf types.singleLineStr;};
};
config = {
my = {
user = "michael";
name = "Michael Thomas";
email = "michaelhthomas@outlook.com";
uid = 1000;
keys = [
# Neptune
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune"
# Oracle
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPc/HYsbpVsyoU2n0EiqQ4+3aSiFPtddjPCGK187W24f michael@oracle"
];
};
};
}

1
common/my/home.nix Symbolic link
View File

@ -0,0 +1 @@
default.nix

23
common/nushell/home.nix Normal file
View File

@ -0,0 +1,23 @@
{
config,
lib,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.nushell;
in {
options.my.nushell = {
enable = mkEnableOption "nushell";
};
config = mkIf cfg.enable {
programs.nushell = {
enable = true;
extraConfig = ''
$env.config = {
edit_mode: vi
}
'';
};
};
}

27
common/system/default.nix Normal file
View File

@ -0,0 +1,27 @@
{
config,
pkgs,
...
}: {
nix.gc = {
automatic = true;
options = "--delete-older-than 30d";
};
nix.optimise.automatic = true;
nix.settings = {
extra-experimental-features = [
"flakes"
"nix-command"
];
keep-outputs = true;
log-lines = 25;
tarball-ttl = 43200;
trusted-users = [
"root"
config.my.user
];
};
nix.package = pkgs.nix;
programs.zsh.enable = true;
time.timeZone = "America/New_York";
}

25
common/zsh/default.nix Normal file
View File

@ -0,0 +1,25 @@
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.zsh;
in {
options.my.zsh = {
enable = mkEnableOption "zsh";
};
config = mkIf cfg.enable {
hm.my.zsh.enable = true;
programs.zsh = {
enable = true;
};
environment.variables.EDITOR = "nvim";
users.users."${config.my.user}".shell = pkgs.zsh;
};
}

64
common/zsh/home.nix Normal file
View File

@ -0,0 +1,64 @@
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.zsh;
in {
options.my.zsh = {
enable = mkEnableOption "zsh";
};
config = mkIf cfg.enable {
programs.zsh = {
enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
historySubstringSearch.enable = true;
autocd = true;
enableCompletion = true;
# Enable pure prompt
initExtra = ''
fpath+=${pkgs.pure-prompt}/share/zsh/site-functions
autoload -U promptinit;
promptinit
prompt pure
'';
envExtra = ''
# Do not load global configuration
setopt no_global_rcs
'';
loginExtra = ''
setopt correct
'';
sessionVariables = {
# Make ls colorful on MacOS
CLICOLOR = 1;
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.8.0";
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
};
}
];
};
programs.zoxide = {
enable = true;
};
};
}

18
darwin/default.nix Normal file
View File

@ -0,0 +1,18 @@
{
inputs,
inputs',
lib,
...
}: {
imports =
[
inputs.agenix.darwinModules.default
inputs.home-manager.darwinModules.home-manager
../common
]
++ lib.my.getModules [./.];
hm.imports = [./home.nix];
environment.systemPackages = [inputs'.agenix.packages.default];
}

3
darwin/home.nix Normal file
View File

@ -0,0 +1,3 @@
{lib, ...}: {
imports = lib.my.getHmModules [./.];
}

716
flake.lock generated
View File

@ -1,17 +1,81 @@
{
"nodes": {
"darwin": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"ags": {
"inputs": {
"astal": "astal",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1734091628,
"narHash": "sha256-8O3i8zESjHVsGzyXb8gEpLztvANq3Ot5bwo60YKJc7k=",
"owner": "Aylur",
"repo": "ags",
"rev": "27cd93147aba09142fa585fd16f13c56268b696c",
"type": "github"
},
"original": {
"owner": "Aylur",
"repo": "ags",
"type": "github"
}
},
"astal": {
"inputs": {
"nixpkgs": [
"ags",
"nixpkgs"
]
},
"locked": {
"lastModified": 1706581965,
"narHash": "sha256-1H7dRdK9LJ7+2X1XQtbwXr+QMqtVVo/ZF0/LIvkjdK8=",
"lastModified": 1733520119,
"narHash": "sha256-6K07ZJTnFu1xASBCMtVc9cFTbBEauwSc7gGBmjLkLSk=",
"owner": "aylur",
"repo": "astal",
"rev": "4c19d8d06fa25cc6389f37abe8839b4d8be5c0d6",
"type": "github"
},
"original": {
"owner": "aylur",
"repo": "astal",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "91b9daf672c957ef95a05491a75f62e6a01d5aaf",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"type": "github"
},
"original": {
@ -21,23 +85,49 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"darwin_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"lastModified": 1733570843,
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"flake-compat_2": {
"devshell": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1728330715,
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
"owner": "numtide",
"repo": "devshell",
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -53,16 +143,106 @@
"type": "github"
}
},
"flake-utils": {
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": {
"inputs": {
"systems": "systems"
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@ -73,14 +253,14 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -91,14 +271,14 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -107,57 +287,197 @@
"type": "github"
}
},
"flake-utils_4": {
"git-hooks": {
"inputs": {
"systems": "systems_5"
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"lastModified": 1734797603,
"narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1705659542,
"narHash": "sha256-WA3xVfAk1AYmFdwghT7mt/erYpsU6JPu9mdTEP/e9HQ=",
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1734366194,
"narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
"owner": "rycee",
"repo": "home-manager",
"rev": "10cd9c53115061aa6a0a90aad0b0dde6a999cdb9",
"rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
"type": "github"
},
"original": {
"owner": "rycee",
"ref": "release-23.11",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1734862405,
"narHash": "sha256-bXZJvUMJ2A6sIpYcCUAGjYCD5UDzmpmQCdmJSkPhleU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cb27edb5221d2f2920a03155f8becc502cf60e35",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729958008,
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.6",
"repo": "ixx",
"type": "github"
}
},
"master": {
"locked": {
"lastModified": 1734892047,
"narHash": "sha256-85aPEsOxviepQc526USyeqpQQQE3F9u9LpiPCGWGRnM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2cf41595ff64bcda9e3e1ed1cac217b5a023a82d",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733570843,
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nix-vscode-extensions": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1706663720,
"narHash": "sha256-nPstfigc9FdWIwbtZcwfAjEP5fsI171CDMQ7rJdg0ok=",
"lastModified": 1734832456,
"narHash": "sha256-gyp5aVMSA83OV8kP/a1FBA6KGJqNkswUK9VdAh1hLS4=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "129d9ddaf92f8a0942037aebf99dfa09d31e0dde",
"rev": "c567c5f3bc53723d726f286ea94d5aebac55d4c5",
"type": "github"
},
"original": {
@ -170,62 +490,58 @@
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1706608109,
"narHash": "sha256-Yc7pmonKJX/dOFm+qEInE+JlskMiN9OmOwUd/EKp4a0=",
"lastModified": 1733854371,
"narHash": "sha256-K9qGHniYBbjqVcEiwXyiofj/IFf78L5F0/FCf+CKyr0=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "0b52d9e7a6c779f8b88c6e3bdfe6064fad648dcf",
"rev": "dee4425dcee3149475ead0cb6a616b8a028c5888",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "main",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1684570954,
"narHash": "sha256-FX5y4Sm87RWwfu9PI71XFvuRpZLowh00FQpIJ1WfXqE=",
"owner": "NixOS",
"lastModified": 1733581040,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3005f20ce0aaa58169cdee57c8aa12e5f1b6e1b3",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs-lib": {
"locked": {
"lastModified": 1706515015,
"narHash": "sha256-eFfY5A7wlYy3jD/75lx6IJRueg4noE+jowl0a8lIlVo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4",
"type": "github"
"lastModified": 1733096140,
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.11",
"type": "indirect"
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
}
},
"nixpkgs_3": {
"nixpkgs_2": {
"locked": {
"lastModified": 1706487304,
"narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
"lastModified": 1713805509,
"narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
"rev": "1e1dc66fe68972a76679644a5577828b6a7e8be4",
"type": "github"
},
"original": {
@ -235,13 +551,125 @@
"type": "github"
}
},
"nur": {
"nixpkgs_3": {
"locked": {
"lastModified": 1706665018,
"narHash": "sha256-NtvxIQhRxavrL7PQ1ZURqWr15XM1Dc98yv4U5gTbJhk=",
"lastModified": 1733384649,
"narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1734737257,
"narHash": "sha256-GIMyMt1pkkoXdCq9un859bX6YQZ/iYtukb9R5luazLM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1c6e20d41d6a9c1d737945962160e8571df55daa",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.11",
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1734649271,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1728538411,
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1733097829,
"narHash": "sha256-9hbb1rqGelllb4kVUCZ307G2k3/UhmA8PPGBoyuWaSw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2c15aa59df0017ca140d9ba302412298ab4bf22a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_3",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"home-manager": "home-manager_3",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"unstable"
],
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1734880727,
"narHash": "sha256-bQfaaYoH8kSdw2UWb8RLZoa/2jPvDjaw87nvj+pO5lE=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "450cccf472f40ae8e3b92eec9e5f4b071693ac85",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_5",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1734891997,
"narHash": "sha256-MXE+6AV6HJfUTwKAaNPR5+WsejO02Q5JNNhz0yMUyVw=",
"owner": "nix-community",
"repo": "NUR",
"rev": "98930fb5cf79e652111ed531e6ce777618b1c898",
"rev": "b8deab92e4f1bc950ef7b2273b8b5c3a764c2e77",
"type": "github"
},
"original": {
@ -250,31 +678,58 @@
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_3",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733773348,
"narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=",
"owner": "NuschtOS",
"repo": "search",
"rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"agenix": "agenix",
"ags": "ags",
"darwin": "darwin_2",
"flake-parts": "flake-parts",
"home-manager": "home-manager_2",
"master": "master",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_4",
"nixvim": "nixvim",
"nur": "nur",
"rust-overlay": "rust-overlay",
"treefmt-nix": "treefmt-nix_3",
"unstable": "unstable",
"utils": "utils",
"vscode-server": "vscode-server"
"utils": "utils"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1706634984,
"narHash": "sha256-xn7lGPE8gRGBe3Lt8ESoN/uUHm7IrbiV7siupwjHX1o=",
"lastModified": 1734834660,
"narHash": "sha256-bm8V+Cu8rWJA+vKQnc94mXTpSDgvedyoDKxTVi/uJfw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "883b84c426107a8ec020e7124f263d7c35a5bb9f",
"rev": "b070e6030118680977bc2388868c4b3963872134",
"type": "github"
},
"original": {
@ -358,13 +813,73 @@
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1734704479,
"narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1734704479,
"narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1706371002,
"narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=",
"lastModified": 1734649271,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c002c6aa977ad22c60398daaa9be52f2203d0006",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"type": "github"
},
"original": {
@ -375,14 +890,14 @@
},
"utils": {
"inputs": {
"systems": "systems_4"
"systems": "systems_5"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -390,27 +905,6 @@
"repo": "flake-utils",
"type": "github"
}
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1684517665,
"narHash": "sha256-SaAr66uCQ8CF75jIr23FZjk1+9Kfwm5sQnwV25206Gs=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "1e1358493df6529d4c7bc4cc3066f76fd16d4ae6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
}
},
"root": "root",

229
flake.nix
View File

@ -2,219 +2,50 @@
description = "Michael Thomas's NixOS configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs.url = "nixpkgs/nixos-24.11";
unstable.url = "nixpkgs/nixos-unstable";
master.url = "github:NixOS/nixpkgs";
nur.url = "github:nix-community/NUR";
utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
home-manager = {
url = "github:rycee/home-manager/release-24.11";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
vscode-server = {
url = "github:nix-community/nixos-vscode-server";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
home-manager = {
url = "github:rycee/home-manager/release-23.11";
inputs = {
nixpkgs.follows = "nixpkgs";
};
utils.url = "github:numtide/flake-utils";
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix.url = "github:numtide/treefmt-nix";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "unstable";
};
rust-overlay.url = "github:oxalica/rust-overlay";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
ags.url = "github:Aylur/ags";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
unstable,
nur,
utils,
rust-overlay,
nix-vscode-extensions,
nixos-wsl,
vscode-server,
darwin,
home-manager,
...
} @ inputs: {
# This repo's overlay plus any other overlays you use
# If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.\
overlays = {
default = import ./overlays inputs;
pkg-sets = (
final: prev: {
unstable = import inputs.unstable {system = final.system;};
trunk = import inputs.trunk {system = final.system;};
}
);
rust-overlay = rust-overlay.overlays.default;
vscode-extensions = nix-vscode-extensions.overlays.default;
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
flake = {
overlays = import ./overlays {inherit inputs;};
};
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-linux"
];
imports = [./flakes];
};
overlaysModule = {
nixpkgs.overlays = builtins.attrValues self.overlays;
};
nixosConfigurations = {
loft = nixpkgs.lib.nixosSystem {
system = utils.lib.system.x86_64-linux;
modules = [
self.overlaysModule
home-manager.nixosModules.home-manager
./modules/common.nix
./modules/containers.nix
./machines/loft/configuration.nix
];
specialArgs = {inherit inputs;};
};
kitchen = nixpkgs.lib.nixosSystem {
system = utils.lib.system.x86_64-linux;
modules = [
self.overlaysModule
home-manager.nixosModules.home-manager
./modules/common.nix
./modules/containers.nix
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.michael = import ./user/environments/nixos/home.nix;
}
./machines/kitchen/configuration.nix
];
specialArgs = {inherit inputs;};
};
thinkcentre = nixpkgs.lib.nixosSystem {
system = utils.lib.system.x86_64-linux;
modules = [
self.overlaysModule
home-manager.nixosModules.home-manager
./modules/common.nix
./modules/hyprland.nix
./modules/containers.nix
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.michael = import ./user/environments/nixos/home.nix;
}
./machines/thinkcentre/configuration.nix
];
specialArgs = {inherit inputs;};
};
# WSL environment
work = inputs.nixpkgs.lib.nixosSystem {
system = utils.lib.system.x86_64-linux;
modules = [
self.overlaysModule
home-manager.nixosModules.home-manager
vscode-server.nixosModules.default
./modules/containers.nix
./modules/nix.nix
./machines/work/configuration.nix
];
specialArgs = {inherit inputs;};
};
};
darwinConfigurations = {
mac = darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = {inherit inputs;};
modules = [
self.overlaysModule
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.michael = import ./user/environments/mac/home.nix;
}
./modules/yabai.nix
./machines/mac/configuration.nix
];
};
};
homeConfigurations = {
nixos = inputs.home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux";
homeDirectory = "/home/michael";
username = "michael";
stateVersion = "21.05";
configuration = {
config,
pkgs,
...
}: {
programs.home-manager.enable = true;
imports = [
./user/environments/nixos/home.nix
];
};
};
wsl = inputs.home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux";
homeDirectory = "/home/michael";
username = "michael";
stateVersion = "21.05";
configuration = {
config,
pkgs,
...
}: {
programs.home-manager.enable = true;
imports = [
./user/environments/wsl/home.nix
];
};
};
mac = inputs.home-manager.lib.homeManagerConfiguration {
system = "aarch64-darwin";
homeDirectory = "/Users/michael";
username = "michael";
stateVersion = "22.05";
configuration = {
config,
pkgs,
...
}: {
programs.home-manager.enable = true;
imports = [
./user/environments/mac/home.nix
];
};
};
};
};
# // utils.lib.eachSystem [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ] (system: {
# nixpkgs = import nixpkgs {
# inherit system;
# overlays = [
# self.overlays.default
# ];
# config.allowUnfree = true;
# };
# });
}

44
flakes/darwin.nix Normal file
View File

@ -0,0 +1,44 @@
{
inputs,
withSystem,
...
}: let
mkDarwin = {
system ? "aarch64-darwin",
modules ? [],
}:
withSystem system (
{
inputs',
lib,
pkgs,
system,
...
}:
inputs.darwin.lib.darwinSystem {
inherit system;
specialArgs = {
inherit
inputs
inputs'
lib
pkgs
;
};
modules = [../darwin] ++ modules;
}
);
in {
flake.darwinConfigurations = {
mac = mkDarwin {
modules = [
{
hm = import ../user/environments/mac/home.nix;
}
../modules/yabai.nix
../machines/mac/configuration.nix
];
};
};
}

9
flakes/default.nix Normal file
View File

@ -0,0 +1,9 @@
{
imports = [
./lib.nix
./darwin.nix
./nixos.nix
./packages.nix
./treefmt.nix
];
}

30
flakes/lib.nix Normal file
View File

@ -0,0 +1,30 @@
{
perSystem = {
inputs',
config,
pkgs,
...
}: let
# use nixpkgs lib instead of flake-parts lib
# avoids home-manager warning about version mismatch
inherit (pkgs) lib;
in {
_module.args.lib = lib.extend (
final: prev: {
my = let
lib = final;
getPaths = file: root:
builtins.filter builtins.pathExists (
map (dir: root + "/${dir}/${file}") (
lib.attrNames (lib.filterAttrs (name: type: type == "directory") (builtins.readDir root))
)
);
in {
inherit getPaths;
getModules = builtins.concatMap (getPaths "default.nix");
getHmModules = builtins.concatMap (getPaths "home.nix");
};
}
);
};
}

126
flakes/nixos.nix Normal file
View File

@ -0,0 +1,126 @@
{
inputs,
self,
withSystem,
...
}: let
mkNixos = {
system ? "x86_64-linux",
nixpkgs ? inputs.nixpkgs,
config ? {},
overlays ? [],
modules ? [],
}:
withSystem system (
{
inputs',
lib,
pkgs,
system,
...
}: let
customPkgs = import nixpkgs (
lib.recursiveUpdate {
inherit system;
overlays = (builtins.attrValues self.overlays) ++ overlays;
config.allowUnfree = true;
} {inherit config;}
);
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs inputs' lib;
pkgs =
if (nixpkgs != inputs.nixpkgs || config != {} || overlays != [])
then customPkgs
else pkgs;
};
modules = [../nixos] ++ modules;
}
);
in {
flake.nixosConfigurations = let
defaultModules = [
../modules
inputs.agenix.nixosModules.default
{
environment.systemPackages = [
inputs.agenix.packages.x86_64-linux.default
];
}
];
fullNixOSModules =
defaultModules
++ [
{
home-manager.users.michael = import ../user/environments/nixos/home.nix;
}
];
in {
kitchen = mkNixos {
modules =
fullNixOSModules
++ [
../modules/common.nix
../modules/containers.nix
../machines/kitchen/configuration.nix
];
};
thinkcentre = mkNixos {
modules =
fullNixOSModules
++ [
../modules/common.nix
../modules/containers.nix
../machines/thinkcentre/configuration.nix
];
};
terra = mkNixos {
modules =
fullNixOSModules
++ [
../modules/common.nix
../modules/containers.nix
../machines/terra/configuration.nix
];
};
oracle = mkNixos {
modules =
defaultModules
++ [
{
home-manager.users.michael = import ../user/environments/nixos-server/home.nix;
}
../machines/oracle/configuration.nix
];
};
nova = mkNixos {
modules =
defaultModules
++ [
{
home-manager.users.michael = import ../user/environments/nixos-server/home.nix;
}
../machines/nova/configuration.nix
];
};
work = mkNixos {
modules = [
inputs.nixos-wsl.nixosModules.default
../machines/work/configuration.nix
];
};
};
}

23
flakes/packages.nix Normal file
View File

@ -0,0 +1,23 @@
{
self,
inputs,
...
}: {
perSystem = {
lib,
system,
...
}: let
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = builtins.attrValues self.overlays;
};
in {
_module.args.pkgs = pkgs;
packages = import ../pkgs {
inherit inputs pkgs;
};
};
}

8
flakes/treefmt.nix Normal file
View File

@ -0,0 +1,8 @@
{inputs, ...}: {
imports = [inputs.treefmt-nix.flakeModule];
perSystem.treefmt = {
projectRootFile = "flake.nix";
programs.alejandra.enable = true;
};
}

View File

@ -19,8 +19,6 @@
# $ nix search wget
environment.systemPackages = with pkgs; [
wget
micro
gnome.gnome-tweaks
];
# Some programs need SUID wrappers, can be configured further or are
@ -46,6 +44,8 @@
programs.zsh.enable = true;
my.hyprland.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.michael = {
isNormalUser = true;

View File

@ -27,7 +27,7 @@
# Video
ffmpeg
# Spotify
unstable.spicetify-cli
master.spicetify-cli
# Java
checkstyle
# XCode
@ -46,6 +46,7 @@
eval `/usr/libexec/path_helper -s`
fi
'';
enableGlobalCompInit = false;
};
};
@ -55,24 +56,6 @@
nix-daemon.enable = true;
};
nixpkgs = {
# Workaround for pyopenssl being marked broken
config.allowBroken = true;
};
nix = {
package = pkgs.nix;
gc = {
automatic = true;
interval.Day = 7;
options = "--delete-older-than 7d";
};
extraOptions = ''
experimental-features = nix-command flakes
'';
settings.auto-optimise-store = false;
};
system = {
# Since it's not possible to declare default shell, run this command after build
activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh'';

View File

@ -0,0 +1,106 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{pkgs, ...}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nova"; # Define your hostname.
# Enable networking
networking.useDHCP = false;
systemd.network.enable = true;
systemd.network.networks."10-wired" = {
matchConfig.Name = "enp1s0";
networkConfig = {
Address = "192.168.1.11/24";
Gateway = "192.168.1.1";
DNS = "192.168.1.1";
};
};
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
programs.zsh.enable = true;
my.services.mealie.enable = true;
my.services.nextcloud.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.michael = {
isNormalUser = true;
description = "Michael Thomas";
extraGroups = ["networkmanager" "wheel"];
shell = pkgs.zsh;
packages = with pkgs; [];
openssh.authorizedKeys.keys = [
# Neptune
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune"
# Oracle
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPc/HYsbpVsyoU2n0EiqQ4+3aSiFPtddjPCGK187W24f michael@oracle"
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

View File

@ -0,0 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "sr_mod" "virtio_blk"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/51a7185f-56b6-4589-8a57-4543bae6e19d";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/41B1-929E";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@ -0,0 +1,123 @@
{
pkgs,
config,
lib,
...
}: {
imports = [
./hardware-configuration.nix
];
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
networking.hostName = "oracle";
networking.domain = "subnet08161027.vcn08161027.oraclevcn.com";
networking.firewall = {
enable = true;
allowedUDPPorts = [51820];
};
services.openssh.enable = true;
services.openssh.settings = {
PasswordAuthentication = false;
};
environment.systemPackages = with pkgs; [wireguard-tools];
# Wireguard tunnel
age.secrets.wireguardOracle.file = ../../secrets/wireguard-oracle.age;
networking.wg-quick.interfaces = {
wg0 = {
address = ["10.0.10.1/24"];
listenPort = 51820;
privateKeyFile = config.age.secrets.wireguardOracle.path;
peers = [
{
publicKey = "iKJO9Q8LsdCdApapTX9CJmrtAKn1TYhg4YUiBUBPzmo=";
allowedIPs = ["10.0.10.2/32"];
}
{
publicKey = "IM7i+2BFsa+XyA4V4jd8iM+jpW307rDEkPOGdSddfzI=";
allowedIPs = ["10.0.10.3/32"];
}
];
};
};
programs.zsh.enable = true;
environment.variables.EDITOR = "nvim";
users.users.michael = {
isNormalUser = true;
home = "/home/michael";
description = "Michael Thomas";
extraGroups = ["wheel" "networkmanager"];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune''
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQr9lluvuGk3qU1bE7HrrZcE36x5hhD5Dat+E4My55aoh+Df/JeuWMPvzS4zLKMsIIZCUX6kbjvTtvWe7gPLflhDOUGI947MK9B01pojDn0LBugz57Ai9fPlG5+AlMWaxWitmP8JB637oxBpqesqxHdiEKW25u9t2qOvjX3kCdcoSYDlW72Xm8ZI9+qKcAlGLnFhiQxM18rjHcZYdn9ZyWRRSC1ocuTqnbh5lsYoMhD+4QWo5LmwMVjr5uix0i+ktqKzENaiDgA/MQIWQrHqUavfjvMRyyQO7bScVTe/PllKFpLOBym2SLC5hD7vG69BBo0dQUto8tAbIgI9Tmv1dx michael@venus''
];
};
swapDevices = [
{
device = "/var/lib/swapfile";
size = 4 * 1024;
}
];
# Services
services.caddy = {
enable = true;
package = let
caddyWithPlugins = builtins.fetchurl {
url = "https://raw.githubusercontent.com/jpds/nixpkgs/a33b02fa9d664f31dadc8a874eb1a5dbaa9f4ecf/pkgs/servers/caddy/default.nix";
sha256 = "sha256:1x1g6qyhmclz2jyc5nmfjsri3xx4pw5rd15n2xjkxlgdcvywcv5f";
};
in (pkgs.callPackage "${caddyWithPlugins}" {
externalPlugins = [
{
name = "greenpau/caddy-security";
repo = "github.com/greenpau/caddy-security";
version = "v1.1.23";
}
];
vendorHash = "sha256-rGNyeHZZBxVM8GMUQMV/JzkK9S/l8tefaQde/d4x9LA=";
});
globalConfig = ''
email michaelhthomas@outlook.com
'';
virtualHosts = {
"auth.s.michaelt.xyz".extraConfig = ''
reverse_proxy http://10.0.10.2:7654
'';
"traggo.s.michaelt.xyz".extraConfig = ''
reverse_proxy http://10.0.10.2:3030
'';
};
};
networking.firewall.allowedTCPPorts = [80 443];
my.server = {
domain = "s.michaelt.xyz";
proxyIP = "10.0.10.2";
};
my.services.homer.enable = true;
my.services.forgejo.proxy = true;
services.uptime-kuma = {
enable = true;
settings = {
port = "3001";
};
};
services.caddy.virtualHosts."status.gringotts.michaelt.xyz".extraConfig = ''
reverse_proxy http://localhost:${config.services.uptime-kuma.settings.PORT}
'';
system.stateVersion = "23.11";
}

View File

@ -0,0 +1,18 @@
{modulesPath, ...}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/97E5-76C2";
fsType = "vfat";
};
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
boot.initrd.kernelModules = ["nvme"];
fileSystems."/" = {
device = "/dev/mapper/centosvolume-root";
fsType = "xfs";
};
}

View File

@ -0,0 +1,97 @@
{pkgs, ...}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
networking.hostName = "terra"; # Define your hostname.
networking.nameservers = ["1.1.1.1" "8.8.8.8"];
networking.firewall = {
enable = true;
};
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
AllowUsers = ["michael"];
};
};
programs.zsh.enable = true;
environment.variables.EDITOR = "nvim";
my.hyprland.enable = true;
my.libreoffice.enable = true;
my.steam.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.michael = {
isNormalUser = true;
description = "Michael Thomas";
extraGroups = ["wheel" "docker" "podman" "adbusers" "dialout" "libvirtd" "networkmanager"];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
# Neptune
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune"
# Oracle
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPc/HYsbpVsyoU2n0EiqQ4+3aSiFPtddjPCGK187W24f michael@oracle"
];
};
# Enablle libvirtd
virtualisation.libvirtd.enable = true;
boot.kernelModules = ["kvm-amd" "kvm-intel"];
environment.systemPackages = with pkgs; [
obs-studio
kdenlive
inkscape
thunderbird
virt-manager
virtiofsd
# GTK Discord Client
unstable.dissent
prismlauncher
lutris
android-studio
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -0,0 +1,50 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = ["kvm-amd"];
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8;
boot.extraModulePackages = [];
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
services.xserver.videoDrivers = ["amdgpu"];
fileSystems."/" = {
device = "/dev/disk/by-uuid/fa11ad2d-97d9-4e87-8fe9-f2cae0d9894e";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2FCC-48ED";
fsType = "vfat";
};
swapDevices = [
{device = "/dev/disk/by-uuid/b378f2ec-0bbb-4896-92b5-ef08c707555d";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp8s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp9s0u4u4.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,10 +1,40 @@
{pkgs, ...}: {
{
config,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
networking.hostName = "venus"; # Define your hostname.
networking.nameservers = ["1.1.1.1" "8.8.8.8"];
networking.firewall = {
enable = true;
interfaces."wg0" = {
allowedTCPPorts = [7654 3030];
};
};
# Wireguard tunnel to oracle
age.secrets.wireguardThinkcentre.file = ../../secrets/wireguard-thinkcentre.age;
networking.wg-quick.interfaces = {
wg0 = {
address = ["10.0.10.2/32"];
listenPort = 51820;
privateKeyFile = config.age.secrets.wireguardThinkcentre.path;
peers = [
{
publicKey = "sdqT2l1HRe9rDYejJ+luQK8zdC+/KqDuQ1rpvZq/KlQ=";
endpoint = "150.136.162.107:51820";
allowedIPs = ["10.0.10.1/24"];
persistentKeepalive = 25;
}
];
};
};
# Set your time zone.
time.timeZone = "America/New_York";
@ -25,9 +55,72 @@
};
# Configure keymap in X11
services.xserver = {
services.xserver.xkb = {
layout = "us";
xkbVariant = "";
variant = "";
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
AllowUsers = ["michael"];
};
};
my.services.homepage-dashboard = {
enable = true;
port = 8082;
};
age.secrets.keycloakDb.file = ../../secrets/keycloak-db.age;
services.keycloak = {
enable = true;
package = pkgs.unstable.keycloak;
settings = {
hostname-url = "https://auth.s.michaelt.xyz";
hostname-admin-url = "https://auth.s.michaelt.xyz";
hostname-strict = false;
hostname-strict-https = false;
# proxy-headers = "xforwarded";
proxy = "edge";
http-enabled = true;
http-port = 7654;
};
database.passwordFile = config.age.secrets.keycloakDb.path;
themes = with pkgs; {
keywind = keycloak-theme-keywind;
};
};
virtualisation.oci-containers.backend = "podman";
virtualisation.oci-containers.containers.traggo = {
image = "traggo/server:latest";
autoStart = true;
ports = ["3030:3030"];
volumes = [
"/var/lib/traggo/data:/opt/traggo/data"
];
environment = {
TRAGGO_DEFAULT_USER_NAME = "michael";
TRAGGO_DEFAULT_USER_PASS = "NfvzH2H5eNJLAJb6";
};
};
my.server = {
domain = "s.michaelt.xyz";
firewallInterface = "wg0";
};
# TODO: Disable desktop
my.hyprland.enable = true;
my.services.forgejo = {
enable = true;
port = 3000;
actions.enable = true;
};
swapDevices = [
@ -46,6 +139,12 @@
description = "Michael Thomas";
extraGroups = ["wheel" "docker" "podman" "adbusers" "dialout"];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
# Neptune
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune"
# Oracle
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPc/HYsbpVsyoU2n0EiqQ4+3aSiFPtddjPCGK187W24f michael@oracle"
];
};
# This value determines the NixOS release from which the default

View File

@ -1,29 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2b1793d6-feff-48df-9180-03e8c2bef7bf";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/2b1793d6-feff-48df-9180-03e8c2bef7bf";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2082-08EF";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2082-08EF";
fsType = "vfat";
};
swapDevices = [ ];
swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -1,57 +1,16 @@
{
lib,
pkgs,
modulesPath,
inputs,
...
}:
with lib; let
defaultUser = "michael";
in {
imports = [
"${modulesPath}/profiles/minimal.nix"
inputs.nixos-wsl.nixosModules.wsl
];
{pkgs, ...}: {
wsl = {
enable = true;
wslConf = {
automount.root = "/mnt";
interop.appendWindowsPath = false;
};
defaultUser = defaultUser;
startMenuLaunchers = true;
# Enable integration with Docker Desktop (needs to be installed)
# docker.enable = true;
};
time.timeZone = "America/New_York";
programs.adb.enable = true;
# Required because for some reason WSL kernel doesn't play well with nftables
networking.firewall.package = pkgs.iptables-legacy;
home-manager = {
users.michael = import ../../user/environments/wsl/home.nix pkgs;
useGlobalPkgs = true;
defaultUser = "michael";
interop.includePath = false;
};
environment.systemPackages = with pkgs; [
wget
nvim-custom
];
services.vscode-server.enable = true;
my.zsh.enable = true;
programs.zsh.enable = true;
users.users.${defaultUser} = {
uid = pkgs.lib.mkForce 1001;
extraGroups = ["wheel" "docker" "podman"];
shell = pkgs.zsh;
};
system.stateVersion = "22.05";
system.stateVersion = "24.05";
hm.home.stateVersion = "24.05";
}

View File

@ -2,7 +2,7 @@
# Enable Avahi Network Discovery
services.avahi = {
enable = true;
nssmdns = true;
nssmdns4 = true;
publish.enable = true;
publish.addresses = true;
};

View File

@ -4,9 +4,8 @@
./bluetooth.nix
./bootloader.nix
./cups.nix
./flatpak.nix
./fonts.nix
./nix.nix
./hosts.nix
./sound.nix
];
}

View File

@ -1,4 +1,6 @@
{pkgs, ...}: {
virtualisation.containers.enable = true;
# Enable Podman w/ docker compose compatibility
virtualisation.podman = {
enable = true;

5
modules/default.nix Normal file
View File

@ -0,0 +1,5 @@
{
imports = [
./services
];
}

5
modules/hosts.nix Normal file
View File

@ -0,0 +1,5 @@
{
networking.hosts = {
"150.136.162.107" = ["oracle"];
};
}

View File

@ -1,39 +0,0 @@
{pkgs, ...}: {
programs.hyprland = {
enable = true;
package = pkgs.unstable.hyprland;
};
environment.systemPackages = with pkgs; [
# Theme
adw-gtk3
# Greeter
cage
greetd.gtkgreet
# Applications
gnome.nautilus
gnome.sushi
gnome.eog
gnome.totem
gnome.cheese
gnome.file-roller
gnome.gnome-weather
gnome.gnome-contacts
gnome.gnome-calendar
gnome.gnome-screenshot
gnome.gnome-dictionary
gnome.gnome-font-viewer
gnome.gnome-system-monitor
];
services.greetd = {
enable = true;
settings = {
default_session = {
command = "cage -s -- gtkgreet --command=Hyprland";
};
};
};
}

View File

@ -1,20 +0,0 @@
{pkgs, ...}: {
nix = {
extraOptions = ''
experimental-features = flakes nix-command
'';
# this is required until nix 2.4 is released
package = pkgs.nixFlakes;
settings.auto-optimise-store = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
nixpkgs.config = {
allowUnfree = true;
};
}

View File

@ -0,0 +1,9 @@
{
imports = [
./forgejo
./homepage-dashboard
./homer
./mealie
./nextcloud
];
}

View File

@ -0,0 +1,234 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.my.services.forgejo;
inherit (config.my.server) domain proxyIP firewallInterface;
forgejoDomain = "git.${domain}";
forgejoUrl = "https://${forgejoDomain}";
# for nix actions runner
storeDeps = pkgs.runCommand "store-deps" {} ''
mkdir -p $out/bin
for dir in ${
toString [
pkgs.coreutils
pkgs.findutils
pkgs.gnugrep
pkgs.gawk
pkgs.git
pkgs.nix
pkgs.bash
pkgs.jq
pkgs.nodejs
pkgs.devenv
]
}; do
for bin in "$dir"/bin/*; do
ln -s "$bin" "$out/bin/$(basename "$bin")"
done
done
# Add SSL CA certs
mkdir -p $out/etc/ssl/certs
cp -a "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" $out/etc/ssl/certs/ca-bundle.crt
'';
in {
options.my.services.forgejo = {
enable = mkEnableOption "Forgejo";
proxy = mkEnableOption "Forgejo reverse proxy entry";
actions = mkOption {
type = types.submodule (_: {
options.enable = mkEnableOption "Forgejo Actions";
});
default = {};
};
subdomain = mkOption {
type = types.str;
default = "git";
example = "git";
description = "Subdomain to use for the service.";
};
port = mkOption {
type = types.port;
default = 3000;
example = 8080;
description = "HTTP port for the Forgejo service.";
};
};
config = mkMerge [
(mkIf cfg.enable {
age.secrets.forgejoSendgridKey = {
file = ../../../secrets/sendgrid-key.age;
owner = "forgejo";
group = "forgejo";
};
services.forgejo = {
enable = true;
package = pkgs.unstable.forgejo;
settings.server = {
DOMAIN = forgejoDomain;
ROOT_URL = forgejoUrl;
DISABLE_SSH = true;
HTTP_PORT = cfg.port;
};
settings.session = {
COOKIE_SECURE = true;
};
settings.service = {
DISABLE_REGISTRATION = true;
ENABLE_NOTIFY_MAIL = true;
};
settings.admin = {
DEFAULT_EMAIL_NOTIFICATIONS = "onmention";
};
settings.openid = {
ENABLE_OPENID_SIGNIN = true;
ENABLE_OPENID_SIGNUP = true;
};
settings.oauth2_client = {
ENABLE_AUTO_REGISTRATION = true;
};
settings.mailer = {
ENABLED = true;
FROM = "forgejo@michaelt.xyz";
PROTOCOL = "starttls";
SMTP_ADDR = "smtp.sendgrid.net";
SMTP_PORT = 587;
USER = "apikey";
};
mailerPasswordFile = config.age.secrets.forgejoSendgridKey.path;
};
networking.firewall.interfaces."${firewallInterface}".allowedTCPPorts = [cfg.port];
})
(mkIf cfg.actions.enable {
# build image // taken from https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix
# everything here has no dependencies on the store
systemd.services.forgejo-runner-nix-image = {
wantedBy = ["multi-user.target"];
after = ["podman.service"];
requires = ["podman.service"];
path = [
config.virtualisation.podman.package
pkgs.gnutar
pkgs.shadow
pkgs.getent
];
# we also include etc here because the cleanup job also wants the nixuser to be present
script = ''
set -eux -o pipefail
mkdir -p etc/nix
# Create an unpriveleged user that we can use also without the run-as-user.sh script
touch etc/passwd etc/group
groupid=$(cut -d: -f3 < <(getent group nixuser))
userid=$(cut -d: -f3 < <(getent passwd nixuser))
groupadd --prefix $(pwd) --gid "$groupid" nixuser
emptypassword='$6$1ero.LwbisiU.h3D$GGmnmECbPotJoPQ5eoSTD6tTjKnSWZcjHoVTkxFLZP17W9hRi/XkmCiAMOfWruUwy8gMjINrBMNODc7cYEo4K.'
useradd --prefix $(pwd) -p "$emptypassword" -m -d /tmp -u "$userid" -g "$groupid" -G nixuser nixuser
cat <<NIX_CONFIG > etc/nix/nix.conf
accept-flake-config = true
experimental-features = nix-command flakes
NIX_CONFIG
cat <<NSSWITCH > etc/nsswitch.conf
passwd: files mymachines systemd
group: files mymachines systemd
shadow: files
hosts: files mymachines dns myhostname
networks: files
ethers: files
services: files
protocols: files
rpc: files
NSSWITCH
# list the content as it will be imported into the container
tar -cv . | tar -tvf -
tar -cv . | podman import - forgejo-runner-nix
'';
serviceConfig = {
RuntimeDirectory = "forgejo-runner-nix-image";
WorkingDirectory = "/run/forgejo-runner-nix-image";
Type = "oneshot";
RemainAfterExit = true;
};
};
users.users.nixuser = {
group = "nixuser";
description = "Used for running nix ci jobs";
home = "/var/empty";
isSystemUser = true;
};
users.groups.nixuser = {};
# configure the actions runner itself
age.secrets.forgejoActions.file = ../../../secrets/forgejo-actions.age;
services.gitea-actions-runner = mkIf cfg.actions.enable {
package = pkgs.unstable.forgejo-runner;
instances.venus = {
enable = true;
name = "venus-nix-runner";
url = forgejoUrl;
settings = {
# options = "-v /var/run/podman/podman.sock:/var/run/podman/podman.sock";
runner = {
capacity = 1;
timeout = "45m";
};
container = {
options = "-e NIX_BUILD_SHELL=/bin/bash -e PAGER=cat -e PATH=/bin -e SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt --device /dev/kvm -v /nix:/nix -v ${storeDeps}/bin:/bin -v ${storeDeps}/etc/ssl:/etc/ssl --user nixuser --device=/dev/kvm";
# privileged = true;
valid_volumes = [
"/nix"
"${storeDeps}/bin"
"${storeDeps}/etc/ssl"
];
# force_pull = false;
network = "bridge";
};
};
labels = [
"nix:docker://forgejo-runner-nix"
];
tokenFile = config.age.secrets.forgejoActions.path;
};
};
})
(mkIf cfg.proxy {
services.caddy.virtualHosts."${forgejoDomain}".extraConfig = ''
handle_errors {
respond "This server is currently unavailable." 502
}
redir /user/login /user/oauth2/Keycloak?{query}
reverse_proxy http://${proxyIP}:${toString cfg.port}
'';
webapps.dashboardCategories = [
{
name = "Git";
tag = "git";
}
];
webapps.apps.forgejo.dashboard = {
name = "Forgejo";
category = "git";
icon = "git-alt";
url = forgejoUrl;
description = "Beyond coding. We forge.";
};
})
];
}

View File

@ -0,0 +1,73 @@
{
inputs,
lib,
config,
...
}:
with lib; let
cfg = config.my.services.homepage-dashboard;
inherit (config.my.server) domain proxyIP firewallInterface;
in {
disabledModules = ["services/misc/homepage-dashboard.nix"];
imports = [
# Use homepage-dashboard service from nixos-unstable channel.
"${inputs.unstable}/nixos/modules/services/misc/homepage-dashboard.nix"
];
options.my.services.homepage-dashboard = {
enable = mkEnableOption "Homepage Dashboard";
proxy = mkEnableOption "Homepage Dashboard reverse proxy entry";
port = mkOption {
type = types.port;
default = 8082;
description = "HTTP port for the homepage-dashboard service.";
};
services = mkOption {
type = types.attrs;
default = {};
description = "Attrset of services by group.";
example = ''
{
Group = {
App = {
href = "https://example.com";
description = "An amazing app!";
};
};
}
'';
};
};
config = mkMerge [
(mkIf cfg.enable {
services.homepage-dashboard = {
enable = true;
listenPort = cfg.port;
settings.logpath = "/var/log/homepage-dashboard";
# Convert services to YAML format
services =
lib.mapAttrsToList (
groupName: groupAttrs: {
${groupName} = (
lib.mapAttrsToList (
serviceName: serviceAttrs: {${serviceName} = serviceAttrs;}
)
groupAttrs
);
}
)
cfg.services;
};
systemd.services.homepage-dashboard.environment.LOG_TARGETS = "stdout";
networking.firewall.interfaces."${firewallInterface}".allowedTCPPorts = [cfg.port];
})
(mkIf cfg.proxy {
services.caddy.virtualHosts."${domain}".extraConfig = ''
reverse_proxy http://${proxyIP}:${toString cfg.port}
'';
})
];
}

View File

@ -0,0 +1,139 @@
# Heavily inspired by https://github.com/Stunkymonkey/nixos/blob/b061b1785b4d07f9032b8cf17e866ff9dbc947b0/modules/services/homer/config.nix
{
config,
lib,
...
}: {
options.webapps = {
dashboardCategories = lib.mkOption {
type = lib.types.listOf (lib.types.submodule {
options = {
name = lib.mkOption {
type = lib.types.str;
description = ''
Category name.
'';
example = "Applications";
};
tag = lib.mkOption {
type = lib.types.str;
description = ''
Category tag.
'';
example = "app";
};
};
});
description = ''
App categories to display on the dashboard.
'';
example = [
{
name = "Application";
tag = "app";
}
];
default = [];
};
apps = lib.mkOption {
type =
lib.types.attrsOf
(lib.types.submodule {
options = {
dashboard = {
url = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = ''
Url to webapp
'';
example = "http://192.168.1.10:1234";
default = null;
};
name = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = ''
Application name.
'';
example = "App";
default = null;
};
description = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = ''
Application description.
'';
example = "An amazing app!";
default = null;
};
category = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = ''
App category tag.
'';
example = "app";
default = null;
};
icon = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = ''
Font Awesome application icon.
'';
example = "rss";
default = null;
};
type = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = ''
application type.
'';
example = "Ping";
default = "Ping";
};
method = lib.mkOption {
type = lib.types.enum ["get" "head"];
description = ''
method of request used
'';
example = "get";
default = "head";
};
};
};
});
description = ''
Defines a web application.
'';
default = {};
};
};
config = let
cfg = config.webapps;
in {
lib.webapps.homerServices = let
apps = builtins.filter (a: a.dashboard.name != null) (lib.attrValues cfg.apps);
in
lib.forEach cfg.dashboardCategories (
cat: let
catApps = lib.sort (a: b: a.dashboard.name < b.dashboard.name) (
builtins.filter
(a:
a.dashboard.category
!= null
&& a.dashboard.category == cat.tag
|| a.dashboard.category == null && cat.tag == "misc")
apps
);
in {
inherit (cat) name;
items = lib.forEach catApps (a: {
inherit (a.dashboard) method name type url;
subtitle = a.dashboard.description;
icon = lib.optionalString (a.dashboard.icon != null) "fas fa-${a.dashboard.icon}";
target = "_blank";
});
}
);
};
}

View File

@ -0,0 +1,56 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.my.services.homer;
inherit (config.my.server) domain;
homeConfig = {
title = "Dashboard";
header = false;
footer = false;
colors = {
dark = {
highlight-primary = "#cc241d";
highlight-secondary = "#8ec07c";
highlight-hover = "#d79921";
background = "rgb(40,36,34)";
card-background = "#3c3836";
text = "#eaeaea";
text-header = "#ffffff";
text-title = "#fafafa";
text-subtitle = "#f5f5f5";
card-shadow = "rgba(0, 0, 0, 0.4)";
link = "#3273dc";
link-hover = "#ffdd57";
};
};
connectivityCheck = true;
columns = "auto";
services = config.lib.webapps.homerServices;
};
in {
imports = [
./config.nix
];
options.my.services.homer = {
enable = mkEnableOption "Homer Dashboard";
};
config = mkIf cfg.enable {
services.caddy.virtualHosts."${domain}".extraConfig = ''
handle_path /assets/config.yml {
root * ${pkgs.writeText "homerConfig.yml" (builtins.toJSON homeConfig)}
file_server
}
root * ${pkgs.homer}
file_server {
hide .git
}
'';
};
}

View File

@ -0,0 +1,45 @@
{
pkgs,
inputs,
config,
lib,
...
}:
with lib; let
cfg = config.my.services.mealie;
in {
disabledModules = ["services/web-apps/mealie.nix"];
imports = ["${inputs.unstable}/nixos/modules/services/web-apps/mealie.nix"];
options.my.services.mealie = {
enable = mkEnableOption "Mealie";
port = mkOption {
type = types.port;
default = 3123;
example = 8080;
description = "HTTP port for the Mealie service.";
};
};
config = mkIf cfg.enable {
services.mealie = {
enable = true;
inherit (cfg) port;
package = pkgs.unstable.mealie;
settings = {
BASE_URL = "https://recipes.thomasfmly.org";
# OIDC
OIDC_AUTH_ENABLED = true;
OIDC_CONFIGURATION_URL = "https://authentik.thomasfmly.org/application/o/mealie/.well-known/openid-configuration";
OIDC_CLIENT_ID = "FLFfJCP0nWsxGfHpAf26XfoqMaIoUuaVdODJLW28";
OIDC_CLIENT_SECRET = "YSEfBhGQUmzAKnrAEi9413NM4m8juF8u7e8zOLzfCA1JXZdRsgj8WWXTKLqEeGhCiQsVvD1iX52sFcWqOWo2r7tpolpUUVymj8O4kfMWampO1Nn65K2aPFtuXu3soUwB";
OIDC_ADMIN_GROUP = "Administrators";
OIDC_AUTO_REDIRECT = true;
OIDC_PROVIDER_NAME = "Authentik";
};
};
networking.firewall.allowedTCPPorts = [cfg.port];
};
}

View File

@ -0,0 +1,75 @@
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.my.services.nextcloud;
in {
options.my.services.nextcloud = {
enable = mkEnableOption "Nextcloud";
port = mkOption {
type = types.port;
default = 9090;
example = 8080;
description = "HTTP port for the Nextcloud service.";
};
};
config = mkIf cfg.enable {
services.nextcloud = {
enable = true;
package = pkgs.nextcloud29;
hostName = "cloud.thomasfmly.org";
phpExtraExtensions = ext: with ext; [smbclient];
database.createLocally = true;
configureRedis = true;
maxUploadSize = "16G";
autoUpdateApps.enable = true;
extraAppsEnable = true;
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json
extraApps = with config.services.nextcloud.package.packages.apps; {
inherit calendar notes user_oidc;
};
config = {
dbtype = "pgsql";
adminuser = "michael";
adminpassFile = config.age.secrets.nextcloudAdminpass.path;
};
settings = {
# Proxy Settings
overwriteprotocol = "https";
trusted_proxies = ["192.168.1.10"];
# Configuration Settings
default_phone_region = "US";
maintenance_window_start = 1;
};
phpOptions = {
"opcache.interned_strings_buffer" = "23";
};
};
age.secrets.nextcloudAdminpass = {
file = ../../../secrets/nextcloud-adminpass.age;
owner = "nextcloud";
group = "nextcloud";
};
services.nginx.virtualHosts."${config.services.nextcloud.hostName}".listen = [
{
addr = "0.0.0.0";
inherit (cfg) port;
}
];
networking.firewall.allowedTCPPorts = [cfg.port];
};
}

View File

@ -1,6 +1,5 @@
{
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;

View File

@ -18,11 +18,11 @@
split_ratio = 0;
split_type = "auto";
auto_balance = "off";
top_padding = 12;
bottom_padding = 12;
left_padding = 12;
right_padding = 12;
window_gap = 06;
top_padding = 0;
bottom_padding = 0;
left_padding = 0;
right_padding = 0;
window_gap = 6;
layout = "bsp";
mouse_modifier = "fn";
mouse_action1 = "move";
@ -34,42 +34,49 @@
services.skhd = {
enable = true;
skhdConfig = ''
ctrl + alt - h: yabai -m window --focus west
ctrl + alt - j: yabai -m window --focus south
ctrl + alt - k: yabai -m window --focus north
ctrl + alt - l: yabai -m window --focus east
ctrl + alt - h: yabai -m window --focus west
ctrl + alt - j: yabai -m window --focus south
ctrl + alt - k: yabai -m window --focus north
ctrl + alt - l: yabai -m window --focus east
cmd + ctrl + alt - h : yabai -m window --warp west
cmd + ctrl + alt - j : yabai -m window --warp south
cmd + ctrl + alt - k : yabai -m window --warp north
cmd + ctrl + alt - l : yabai -m window --warp east
cmd + ctrl + alt - h : yabai -m window --warp west
cmd + ctrl + alt - j : yabai -m window --warp south
cmd + ctrl + alt - k : yabai -m window --warp north
cmd + ctrl + alt - l : yabai -m window --warp east
ctrl + alt - 1 : yabai -m space --focus 1
ctrl + alt - 2 : yabai -m space --focus 2
ctrl + alt - 3 : yabai -m space --focus 3
ctrl + alt - 4 : yabai -m space --focus 4
ctrl + alt - 5 : yabai -m space --focus 5
ctrl + alt - 6 : yabai -m space --focus 6
ctrl + alt - 7 : yabai -m space --focus 7
ctrl + alt - 8 : yabai -m space --focus 8
ctrl + alt - 9 : yabai -m space --focus 9
ctrl + alt - 1 : yabai -m space --focus 1
ctrl + alt - 2 : yabai -m space --focus 2
ctrl + alt - 3 : yabai -m space --focus 3
ctrl + alt - 4 : yabai -m space --focus 4
ctrl + alt - 5 : yabai -m space --focus 5
ctrl + alt - 6 : yabai -m space --focus 6
ctrl + alt - 7 : yabai -m space --focus 7
ctrl + alt - 8 : yabai -m space --focus 8
ctrl + alt - 9 : yabai -m space --focus 9
ctrl + alt - q: yabai -m window --close
ctrl + alt - q: yabai -m window --close
## stack window
# Note that this only works when the active window does *not* already belong to a stack
shift + alt + cmd - left : yabai -m window west --stack $(yabai -m query --windows --window | jq -r '.id')
shift + alt + cmd - right : yabai -m window east --stack $(yabai -m query --windows --window | jq -r '.id')
# 0x21 - [
# 0x1E - ]
ctrl + alt - 0x21 : yabai -m query --spaces --space \
| jq -re ".index" \
| xargs -I{} yabai -m query --windows --space {} \
| jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.y, .id) | nth(index(map(select(.focused == 1))) - 1).id" \
| xargs -I{} yabai -m window --focus {}
ctrl + alt - 0x21 : yabai -m query --spaces --space \
| jq -re ".index" \
| xargs -I{} yabai -m query --windows --space {} \
| jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.y, .id) | nth(index(map(select(.focused == 1))) - 1).id" \
| xargs -I{} yabai -m window --focus {}
ctrl + alt - 0x1E : yabai -m query --spaces --space \
| jq -re ".index" \
| xargs -I{} yabai -m query --windows --space {} \
| jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.x, .id) | reverse | nth(index(map(select(.focused == 1))) - 1).id" \
| xargs -I{} yabai -m window --focus {}
ctrl + alt - 0x1E : yabai -m query --spaces --space \
| jq -re ".index" \
| xargs -I{} yabai -m query --windows --space {} \
| jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.x, .id) | reverse | nth(index(map(select(.focused == 1))) - 1).id" \
| xargs -I{} yabai -m window --focus {}
# applications
ctrl + alt - t: open -n -a 'Alacritty.app'
'';
};
}

45
nixos/ags/home.nix Normal file
View File

@ -0,0 +1,45 @@
{
inputs,
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.ags;
in {
imports = [inputs.ags.homeManagerModules.default];
options.my.ags = {
enable = mkEnableOption "ags";
};
config = mkIf cfg.enable {
programs.ags = {
enable = true;
extraPackages = with pkgs; [
bun
which
fzf
# inputs.matugen.packages.${system}.default
slurp
wf-recorder
wl-clipboard
wayshot
swappy
pavucontrol
networkmanager
gtk3
];
};
home.packages = with pkgs; [
brightnessctl
fd
dart-sass
hyprpicker
swww
];
};
}

14
nixos/default.nix Normal file
View File

@ -0,0 +1,14 @@
{
inputs,
lib,
...
}: {
imports =
[
inputs.home-manager.nixosModules.home-manager
../common
]
++ lib.my.getModules [./.];
hm.imports = lib.my.getHmModules [./.];
}

View File

@ -0,0 +1,75 @@
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.hyprland;
in {
options.my.hyprland = {
enable = mkEnableOption "hyprland";
};
config = mkIf cfg.enable {
hm.my.hyprland.enable = true;
programs.hyprland = {
enable = true;
};
# Hint electron apps to use wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
environment.systemPackages = with pkgs; [
# Theme
adw-gtk3
# Applications
nautilus
sushi
eog
totem
cheese
file-roller
gnome-weather
gnome-contacts
gnome-calendar
gnome-screenshot
wordbook
gnome-font-viewer
gnome-system-monitor
monophony # music player
# Nvim clipboard
wl-clipboard
];
# Required for Nautilus to work outside GNOME
services.gvfs.enable = true;
# Use CAPSLOCK as Hyper key
services.keyd = {
enable = true;
keyboards.default = {
ids = ["*"];
settings.main = {
capslock = "overload(meta, esc)";
};
};
};
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
user = "greeter";
};
};
};
};
}

238
nixos/hyprland/home.nix Normal file
View File

@ -0,0 +1,238 @@
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.hyprland;
in {
options.my.hyprland = {
enable = mkEnableOption "hyprland";
};
config = mkIf cfg.enable {
my.ags.enable = true;
programs.fuzzel.enable = true;
home.packages = with pkgs; [
pavucontrol
swaybg
];
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "SUPER";
general = {
gaps_in = 5;
gaps_out = 10;
};
input = {
follow_mouse = 2;
sensitivity = -0.2;
};
exec-once = [
"hyprctl setcursor Adwaita 24"
"ags"
"swaybg -i /home/michael/Photos/wallpaper.jpg"
"hypridle"
];
bind =
[
# Program launcher
"$mod, SPACE, exec, fuzzel"
# Program shortcuts
"$mod, F, exec, firefox"
"$mod, Q, killactive"
"$mod, T, exec, foot"
", Print, exec, grimblast copy area"
# Windows
"$mod, H, movefocus, l"
"$mod, J, movefocus, d"
"$mod, K, movefocus, u"
"$mod, L, movefocus, r"
# Moving windows
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, J, movewindow, d"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, L, movewindow, r"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
)
10)
);
};
extraConfig = ''
# will switch to a submap called resize
bind=$mod,R,submap,resize
# media controls
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# will start a submap called "resize"
submap=resize
# sets repeatable binds for resizing the active window
binde=,h,resizeactive,-10 0
binde=,j,resizeactive,0 10
binde=,k,resizeactive,0 -10
binde=,l,resizeactive,10 0
# use reset to go back to the global submap
bind=,escape,submap,reset
# will reset the submap, meaning end the current one and return to the global one
submap=reset
# mouse bindings
bindm=ALT,mouse:272,movewindow
bindm=ALT,mouse:273,resizewindow
# no gaps when only window
workspace = w[t1], gapsout:0, gapsin:0
workspace = w[tg1], gapsout:0, gapsin:0
workspace = f[1], gapsout:0, gapsin:0
windowrulev2 = bordersize 0, floating:0, onworkspace:w[t1]
windowrulev2 = rounding 0, floating:0, onworkspace:w[t1]
windowrulev2 = bordersize 0, floating:0, onworkspace:w[tg1]
windowrulev2 = rounding 0, floating:0, onworkspace:w[tg1]
windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
'';
};
gtk = {
enable = true;
font.name = "Inter 11";
theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
iconTheme = {
name = "Papirus";
package = pkgs.papirus-icon-theme;
};
};
home.pointerCursor = {
gtk.enable = true;
name = "Adwaita";
package = pkgs.adwaita-icon-theme;
size = 24;
};
programs.hyprlock = {
enable = true;
settings = {
general = {
no_fade_in = false;
grace = 0;
disable_loading_bar = true;
};
background = {
monitor = "";
path = "~/Photos/wallpaper.jpg";
blur_passes = 3;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
};
input-field = {
monitor = "";
size = "250, 60";
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
outer_color = "rgba(0, 0, 0, 0)";
inner_color = "rgba(0, 0, 0, 0.5)";
font_color = "rgb(200, 200, 200)";
fade_on_empty = false;
font_family = "Inter";
placeholder_text = "Enter Password";
hide_input = false;
position = "0, 375";
halign = "center";
valign = "bottom";
};
label = [
# Time
{
monitor = "";
text = "cmd[update:1000] echo \"$(date +\"%-I:%M %P\")\"";
color = "rgba(255, 255, 255, 0.6)";
font_size = 120;
font_family = "Inter ExtraBold";
position = "0, -300";
halign = "center";
valign = "top";
}
# User
{
monitor = "";
text = config.my.name;
color = "rgba(255, 255, 255, 0.6)";
font_size = 24;
font_family = "Inter Semibold";
position = "0, 450";
halign = "center";
valign = "bottom";
}
];
};
};
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
# Dim screen
{
timeout = 150; # 2.5 min
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "brightnessctl -r"; # monitor backlight restore.
}
# Lock
{
timeout = 300; # 5 min
on-timeout = "loginctl lock-session";
}
# Turn off screen
{
timeout = 330; # 5.5 min
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
# Suspend
{
timeout = 1800; # 30 min
on-timeout = "systemctl suspend";
}
];
};
};
};
}

View File

@ -0,0 +1,22 @@
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.libreoffice;
in {
options.my.libreoffice = {
enable = mkEnableOption "libreoffice";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
libreoffice-qt
hunspell
hunspellDicts.uk_UA
hunspellDicts.th_TH
];
};
}

28
nixos/server/default.nix Normal file
View File

@ -0,0 +1,28 @@
{lib, ...}:
with lib; {
options.my.server = {
name = mkOption {
type = types.str;
default = "Server";
example = "Venus";
description = "User-facing name of the server.";
};
domain = mkOption {
type = types.str;
example = "example.com";
description = "Full domain name of the server.";
};
proxyIP = mkOption {
type = types.str;
default = "127.0.0.1";
example = "127.0.0.1";
description = "IP address of server hosting services behind reverse proxy.";
};
firewallInterface = mkOption {
type = types.str;
default = "eth0";
example = "wg0";
description = "Network interface to expose services on.";
};
};
}

21
nixos/steam/default.nix Normal file
View File

@ -0,0 +1,21 @@
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.steam;
in {
options.my.steam = {
enable = mkEnableOption "steam";
};
config = mkIf cfg.enable {
programs.steam = {
enable = true;
package = pkgs.unstable.steam;
gamescopeSession.enable = true;
};
};
}

View File

@ -1,13 +1,33 @@
{
nixpkgs,
unstable,
...
}: let
inherit (nixpkgs.lib) composeManyExtensions;
inherit (builtins) attrNames readDir;
localOverlays =
map
(f: import (./default + "/${f}"))
(attrNames (readDir ./default));
in
composeManyExtensions localOverlays
{inputs, ...}: {
rust-overlay = inputs.rust-overlay.overlays.default;
vscode-extensions = inputs.nix-vscode-extensions.overlays.default;
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev:
import ../pkgs {
inherit (final) pkgs;
inherit inputs;
};
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
modifications = final: prev: {
# avoid build failure on darwin
inherit (final.unstable) ghostscript;
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {
unstable = import inputs.unstable {
inherit (final) system;
config.allowUnfree = true;
};
master = import inputs.master {
inherit (final) system;
config.allowUnfree = true;
};
};
}

View File

@ -1 +0,0 @@
import ./firebird-emu/default.nix

View File

@ -1,3 +0,0 @@
self: super: {
firebird-emu = self.libsForQt5.callPackage ./package.nix {};
}

View File

@ -1,44 +0,0 @@
{
stdenv,
lib,
fetchFromGitHub,
qmake,
qtbase,
qtdeclarative,
qtquickcontrols,
wrapQtAppsHook,
}:
stdenv.mkDerivation rec {
pname = "firebird-emu";
version = "1.6";
src = fetchFromGitHub {
owner = "nspire-emus";
repo = "firebird";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-ZptjlnOiF+hKuKYvBFJL95H5YQuR99d4biOco/MVEmE=";
};
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [
"-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098
];
nativeBuildInputs = [qmake wrapQtAppsHook];
buildInputs = [qtbase qtdeclarative qtquickcontrols];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
mv $out/bin/${pname}.app $out/Applications/
'';
meta = {
homepage = "https://github.com/nspire-emus/firebird";
description = "Third-party multi-platform emulator of the ARM-based TI-Nspire calculators";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [pneumaticat];
# Only tested on Linux, but likely possible to build on, e.g. macOS
platforms = lib.platforms.unix;
};
}

View File

@ -1,15 +0,0 @@
self: super: {
gnomeExtensions =
super.gnomeExtensions
// {
paperwm = super.gnomeExtensions.paperwm.overrideDerivation (old: {
version = "43.0";
src = super.fetchFromGitHub {
owner = "paperwm";
repo = "PaperWM";
rev = "64960df6cde10bcf47c33ce56a2d35e99d8d02bf";
sha256 = "sha256-ejyWIa4HX1lEIHc9qax8jgrgi992W6rkTK60FGzKI/E=";
};
});
};
}

View File

@ -1,5 +0,0 @@
self: super: {
iptables = super.iptables.override {
nftablesCompat = false;
};
}

5
pkgs/default.nix Normal file
View File

@ -0,0 +1,5 @@
{pkgs, ...} @ args: {
homer = pkgs.callPackage ./homer {};
keycloak-theme-keywind = pkgs.callPackage ./keywind {};
nvim-custom = import ./nvim/default.nix args;
}

19
pkgs/homer/default.nix Normal file
View File

@ -0,0 +1,19 @@
{
stdenv,
fetchzip,
}:
stdenv.mkDerivation rec {
pname = "homer";
version = "24.04.1";
src = fetchzip {
url = "https://github.com/bastienwirtz/homer/releases/download/v${version}/homer.zip";
hash = "sha256-BWQMBQn/bnRQdhJpgn9sIeiybdzT7c9c9h9toNGx48k=";
stripRoot = false;
};
installPhase = ''
cp -r $src $out/
'';
sourceRoot = ".";
}

20
pkgs/keywind/default.nix Normal file
View File

@ -0,0 +1,20 @@
{
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "keycloak-theme-keywind";
version = "0.0.1-dev";
src = fetchFromGitHub {
owner = "michaelhthomas";
repo = "keywind";
rev = "f3f016ab34ac9731ef8dadd6e79406a3c2433a34";
hash = "sha256-wronX44qyUIuoTSdKj01UlLrwH9U5qNkUuSouV+xSUU=";
};
installPhase = ''
mkdir -p $out
cp -a theme/keywind/login $out
'';
}

View File

@ -0,0 +1,144 @@
{
pkgs,
helpers,
icons,
...
}: {
plugins = {
bufferline = {
enable = true;
settings.options = {
always_show_bufferline = false;
offsets = [
{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}
];
diagnostics = "nvim_lsp";
diagnostics_indicator = ''
function(_, _, diag)
local icons = ${helpers.toLuaObject icons.diagnostics}
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
.. (diag.warning and icons.Warn .. diag.warning or "")
return vim.trim(ret)
end
'';
separator_style = "thin"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin”
close_command = "Bdelete! %d";
};
};
};
extraPlugins = with pkgs.vimPlugins; [bufdelete-nvim];
keymaps = [
{
mode = "n";
key = "<Tab>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "<S-Tab>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<S-l>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "<S-h>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>Bdelete<cr>";
options = {
desc = "Delete buffer";
};
}
{
mode = "n";
key = "<leader>bb";
action = "<cmd>e #<cr>";
options = {
desc = "Switch to Other Buffer";
};
}
# {
# mode = "n";
# key = "<leader>`";
# action = "<cmd>e #<cr>";
# options = {
# desc = "Switch to Other Buffer";
# };
# }
{
mode = "n";
key = "<leader>br";
action = "<cmd>BufferLineCloseRight<cr>";
options = {
desc = "Delete buffers to the right";
};
}
{
mode = "n";
key = "<leader>bl";
action = "<cmd>BufferLineCloseLeft<cr>";
options = {
desc = "Delete buffers to the left";
};
}
{
mode = "n";
key = "<leader>bo";
action = "<cmd>BufferLineCloseOthers<cr>";
options = {
desc = "Delete other buffers";
};
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>BufferLineTogglePin<cr>";
options = {
desc = "Toggle pin";
};
}
{
mode = "n";
key = "<leader>bP";
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
options = {
desc = "Delete non-pinned buffers";
};
}
];
}

View File

@ -0,0 +1,8 @@
{
colorschemes = {
base16 = {
enable = false;
colorscheme = "mountain";
};
};
}

View File

@ -0,0 +1,48 @@
{
colorschemes = {
catppuccin = {
enable = true;
settings = {
background = {
light = "macchiato";
dark = "mocha";
};
flavour = "mocha"; # "latte", "mocha", "frappe", "macchiato" or raw lua code
disable_bold = false;
disable_italic = false;
disable_underline = false;
transparent_background = true;
term_colors = true;
integrations = {
cmp = true;
noice = true;
notify = true;
neotree = true;
harpoon = true;
gitsigns = true;
which_key = true;
illuminate = {
enabled = true;
};
treesitter = true;
treesitter_context = true;
telescope.enabled = true;
indent_blankline.enabled = true;
mini.enabled = true;
native_lsp = {
enabled = true;
inlay_hints = {
background = true;
};
underlines = {
errors = ["underline"];
hints = ["underline"];
information = ["underline"];
warnings = ["underline"];
};
};
};
};
};
};
}

View File

@ -0,0 +1,5 @@
{
colorschemes.gruvbox = {
enable = true;
};
}

View File

@ -0,0 +1,14 @@
{
colorschemes = {
rose-pine = {
enable = false;
settings = {
styles = {
italic = true;
bold = true;
transparency = false;
};
};
};
};
}

View File

@ -0,0 +1,131 @@
{
plugins = {
cmp = {
enable = true;
autoEnableSources = false;
settings = {
experimental = {
ghost_text = true;
};
};
settings = {
mapping = {
__raw = ''
cmp.mapping.preset.insert({
['<C-j>'] = cmp.mapping.select_next_item(),
['<C-k>'] = cmp.mapping.select_prev_item(),
['<C-e>'] = cmp.mapping.abort(),
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<S-CR>'] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
})
'';
};
snippet = {
expand = "function(args) require('luasnip').lsp_expand(args.body) end";
};
sources = {
__raw = ''
cmp.config.sources({
{name = 'nvim_lsp'},
{name = 'copilot'},
{name = 'path'},
{name = 'luasnip'},
{name = 'cmdline'},
}, {
{name = 'buffer'},
})
'';
};
performance = {
debounce = 60;
fetching_timeout = 200;
max_view_entries = 30;
};
window = {
completion = {
border = "rounded";
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None";
};
documentation = {
border = "rounded";
};
};
formatting = {
fields = ["kind" "abbr" "menu"];
expandable_indicator = true;
};
};
};
# Completion from Language Server
cmp-nvim-lsp.enable = true; # lsp
# Completion for buffer words
cmp-buffer.enable = true;
# Completion for file system paths
cmp-path.enable = true;
};
extraConfigLua = ''
luasnip = require("luasnip")
kind_icons = {
Text = "󰊄",
Method = "",
Function = "󰡱",
Constructor = "",
Field = "",
Variable = "󱀍",
Class = "",
Interface = "",
Module = "󰕳",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
local cmp = require'cmp'
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({'/', "?" }, {
sources = {
{ name = 'buffer' }
}
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
})
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
}),
}) '';
}

View File

@ -0,0 +1,222 @@
{
plugins.dap = {
enable = true;
signs = {
dapBreakpoint = {
text = "";
texthl = "DapBreakpoint";
};
dapBreakpointCondition = {
text = "";
texthl = "DapBreakpointCondition";
};
dapLogPoint = {
text = "";
texthl = "DapLogPoint";
};
};
extensions = {
dap-python = {
enable = true;
};
dap-ui = {
enable = true;
floating.mappings = {
close = ["<ESC>" "q"];
};
};
dap-virtual-text = {
enable = true;
};
};
configurations = {
java = [
{
type = "java";
request = "launch";
name = "Debug (Attach) - Remote";
hostName = "127.0.0.1";
port = 5005;
}
];
};
};
keymaps = [
{
mode = "n";
key = "<leader>dB";
action = "
<cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>
";
options = {
silent = true;
desc = "Breakpoint Condition";
};
}
{
mode = "n";
key = "<leader>db";
action = ":DapToggleBreakpoint<cr>";
options = {
silent = true;
desc = "Toggle Breakpoint";
};
}
{
mode = "n";
key = "<leader>dc";
action = ":DapContinue<cr>";
options = {
silent = true;
desc = "Continue";
};
}
{
mode = "n";
key = "<leader>da";
action = "<cmd>lua require('dap').continue({ before = get_args })<cr>";
options = {
silent = true;
desc = "Run with Args";
};
}
{
mode = "n";
key = "<leader>dC";
action = "<cmd>lua require('dap').run_to_cursor()<cr>";
options = {
silent = true;
desc = "Run to cursor";
};
}
{
mode = "n";
key = "<leader>dg";
action = "<cmd>lua require('dap').goto_()<cr>";
options = {
silent = true;
desc = "Go to line (no execute)";
};
}
{
mode = "n";
key = "<leader>di";
action = ":DapStepInto<cr>";
options = {
silent = true;
desc = "Step into";
};
}
{
mode = "n";
key = "<leader>dj";
action = "
<cmd>lua require('dap').down()<cr>
";
options = {
silent = true;
desc = "Down";
};
}
{
mode = "n";
key = "<leader>dk";
action = "<cmd>lua require('dap').up()<cr>";
options = {
silent = true;
desc = "Up";
};
}
{
mode = "n";
key = "<leader>dl";
action = "<cmd>lua require('dap').run_last()<cr>";
options = {
silent = true;
desc = "Run Last";
};
}
{
mode = "n";
key = "<leader>do";
action = ":DapStepOut<cr>";
options = {
silent = true;
desc = "Step Out";
};
}
{
mode = "n";
key = "<leader>dO";
action = ":DapStepOver<cr>";
options = {
silent = true;
desc = "Step Over";
};
}
{
mode = "n";
key = "<leader>dp";
action = "<cmd>lua require('dap').pause()<cr>";
options = {
silent = true;
desc = "Pause";
};
}
{
mode = "n";
key = "<leader>dr";
action = ":DapToggleRepl<cr>";
options = {
silent = true;
desc = "Toggle REPL";
};
}
{
mode = "n";
key = "<leader>ds";
action = "<cmd>lua require('dap').session()<cr>";
options = {
silent = true;
desc = "Session";
};
}
{
mode = "n";
key = "<leader>dt";
action = ":DapTerminate<cr>";
options = {
silent = true;
desc = "Terminate";
};
}
{
mode = "n";
key = "<leader>du";
action = "<cmd>lua require('dapui').toggle()<cr>";
options = {
silent = true;
desc = "Dap UI";
};
}
{
mode = "n";
key = "<leader>dw";
action = "<cmd>lua require('dap.ui.widgets').hover()<cr>";
options = {
silent = true;
desc = "Widgets";
};
}
{
mode = ["n" "v"];
key = "<leader>de";
action = "<cmd>lua require('dapui').eval()<cr>";
options = {
silent = true;
desc = "Eval";
};
}
];
}

View File

@ -0,0 +1,85 @@
{
# Import all your configuration modules here
imports = [
./sets.nix
./keymaps.nix
./bufferlines/bufferline.nix
# ./colorschemes/base16.nix
# ./colorschemes/catppuccin.nix
# ./colorschemes/rose-pine.nix
./colorschemes/gruvbox.nix
./completion/cmp.nix
./dap/dap.nix
./filetrees/neo-tree.nix
./git/gitsigns.nix
./git/diffview.nix
./git/lazygit.nix
# ./git/neogit.nix
./languages/nvim-jdtls.nix
./languages/nvim-lint.nix
./languages/typescript-tools-nvim.nix
./languages/treesitter/treesitter.nix
./languages/treesitter/mdx.nix
./languages/treesitter/treesitter-context.nix
./languages/treesitter/treesitter-textobjects.nix
./languages/treesitter/ts-autotag.nix
./languages/treesitter/ts-context-commentstring.nix
./languages/latex
./lsp/conform.nix
./lsp/fidget.nix
./lsp/lsp.nix
./lsp/lspsaga.nix
./lsp/trouble.nix
./none-ls/none-ls.nix
./snippets/luasnip.nix
./statusline/lualine.nix
./telescope/telescope.nix
./ui/alpha.nix
# ./ui/dressing-nvim.nix
./ui/indent-blankline.nix
./ui/noice.nix
./ui/nvim-notify.nix
./ui/nui.nix
./ui/statuscol.nix
# ./utils/better-escape.nix
./utils/flash.nix # better search labels
./utils/flutter-tools.nix
# ./utils/hardtime.nix # hints to get better at vim
# ./utils/harpoon.nix # better navigation between files & terminals
./utils/illuminate.nix # highlight other uses of current word
./utils/markdown-preview.nix
./utils/mini.nix # lots of utilities
./utils/neoconf.nix
# ./utils/neodev.nix # lua development
./utils/neotest.nix # test runner
./utils/colorizer.nix
./utils/nvim-surround.nix # surrounds
# ./utils/oil.nix # file explorer as buffer
./utils/persistence.nix # session management / restore
./utils/plenary.nix # utility library for other plugins
# ./utils/project-nvim.nix # project management
# ./utils/sidebar.nix # sidebar
# ./utils/tmux-navigator.nix
./utils/todo-comments.nix
./utils/toggleterm.nix
# ./utils/ultimate-autopair.nix # auto pairs (ew)
./utils/undotree.nix # browse undo history
./utils/vim-be-good.nix # game to get better at vim
./utils/web-devicons.nix # required for other packages
./utils/whichkey.nix # help with keybindings
./utils/wilder.nix # better wildmenu suggestions
];
}

View File

@ -0,0 +1,81 @@
{
plugins.neo-tree = {
enable = true;
enableDiagnostics = true;
enableGitStatus = true;
enableModifiedMarkers = true;
enableRefreshOnWrite = true;
closeIfLastWindow = true;
popupBorderStyle = "rounded"; # Type: null or one of “NC”, “double”, “none”, “rounded”, “shadow”, “single”, “solid” or raw lua code
buffers = {
bindToCwd = false;
followCurrentFile.enabled = true;
};
window = {
width = 40;
height = 15;
autoExpandWidth = false;
mappings = {
"<space>" = "none";
};
};
filesystem = {
bindToCwd = false;
followCurrentFile.enabled = true;
useLibuvFileWatcher = true;
};
defaultComponentConfigs = {
indent = {
withExpanders = true; # if nil and file nesting is enabled, will enable expanders
expanderCollapsed = "";
expanderExpanded = "";
expanderHighlight = "NeoTreeExpander";
};
gitStatus = {
symbols = {
unstaged = "󰄱";
staged = "󰱒";
};
};
};
};
keymaps = [
{
mode = "n";
key = "<leader>e";
action = ":Neotree toggle reveal_force_cwd<cr>";
options = {
silent = true;
desc = "Explorer NeoTree (root dir)";
};
}
{
mode = "n";
key = "<leader>E";
action = "<cmd>Neotree toggle<CR>";
options = {
silent = true;
desc = "Explorer NeoTree (cwd)";
};
}
{
mode = "n";
key = "<leader>be";
action = ":Neotree buffers<CR>";
options = {
silent = true;
desc = "Buffer explorer";
};
}
{
mode = "n";
key = "<leader>ge";
action = ":Neotree git_status<CR>";
options = {
silent = true;
desc = "Git explorer";
};
}
];
}

View File

@ -0,0 +1,5 @@
{
plugins.diffview = {
enable = true;
};
}

View File

@ -0,0 +1,92 @@
{
plugins.gitsigns = {
enable = true;
settings = {
trouble = true;
current_line_blame = false;
};
};
keymaps = [
{
mode = ["n" "v"];
key = "<leader>gh";
action = "gitsigns";
options = {
silent = true;
desc = "+hunks";
};
}
{
mode = "n";
key = "<leader>ghb";
action = ":Gitsigns blame_line<CR>";
options = {
silent = true;
desc = "Blame line";
};
}
{
mode = "n";
key = "<leader>ghd";
action = ":Gitsigns diffthis<CR>";
options = {
silent = true;
desc = "Diff This";
};
}
{
mode = "n";
key = "<leader>ghp";
action = ":Gitsigns preview_hunk<CR>";
options = {
silent = true;
desc = "Preview hunk";
};
}
{
mode = "n";
key = "<leader>ghR";
action = ":Gitsigns reset_buffer<CR>";
options = {
silent = true;
desc = "Reset Buffer";
};
}
{
mode = ["n" "v"];
key = "<leader>ghr";
action = ":Gitsigns reset_hunk<CR>";
options = {
silent = true;
desc = "Reset Hunk";
};
}
{
mode = ["n" "v"];
key = "<leader>ghs";
action = ":Gitsigns stage_hunk<CR>";
options = {
silent = true;
desc = "Stage Hunk";
};
}
{
mode = "n";
key = "<leader>ghS";
action = ":Gitsigns stage_buffer<CR>";
options = {
silent = true;
desc = "Stage Buffer";
};
}
{
mode = "n";
key = "<leader>ghu";
action = ":Gitsigns undo_stage_hunk<CR>";
options = {
silent = true;
desc = "Undo Stage Hunk";
};
}
];
}

View File

@ -0,0 +1,22 @@
{pkgs, ...}: {
extraPlugins = with pkgs.vimPlugins; [
lazygit-nvim
];
extraPackages = with pkgs; [lazygit];
extraConfigLua = ''
require("telescope").load_extension("lazygit")
'';
keymaps = [
{
mode = "n";
key = "<leader>gg";
action = "<cmd>LazyGit<CR>";
options = {
desc = "LazyGit (root dir)";
};
}
];
}

View File

@ -0,0 +1,12 @@
{
plugins.neogit = {
enable = true;
};
keymaps = [
{
mode = "n";
key = "<leader>gg";
action = "<cmd>Neogit<CR>";
}
];
}

View File

@ -0,0 +1,26 @@
if MVim then return end -- avoid loading twice the same module
MVim = {}
---@return {fg?:string}?
function MVim.fg(name)
local color = MVim.color(name)
return color and { fg = color } or nil
end
---@param name string
---@param bg? boolean
---@return string?
function MVim.color(name, bg)
---@type {fg?:number, bg?:number}?
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
---@type number?
local color = nil
if hl then
if bg then
color = hl.bg
else
color = hl.fg
end
end
return color and string.format("#%06x", color) or nil
end

View File

@ -0,0 +1,64 @@
{
misc = {
dots = "󰇘";
};
dap = {
Stopped = ["󰁕 " "DiagnosticWarn" "DapStoppedLine"];
Breakpoint = " ";
BreakpointCondition = " ";
BreakpointRejected = [" " "DiagnosticError"];
LogPoint = ".>";
};
diagnostics = {
Error = " ";
Warn = " ";
Hint = " ";
Info = " ";
};
git = {
added = " ";
modified = " ";
removed = " ";
};
kinds = {
Array = " ";
Boolean = "󰨙 ";
Class = " ";
Codeium = "󰘦 ";
Color = " ";
Control = " ";
Collapsed = " ";
Constant = "󰏿 ";
Constructor = " ";
Copilot = " ";
Enum = " ";
EnumMember = " ";
Event = " ";
Field = " ";
File = " ";
Folder = " ";
Function = "󰊕 ";
Interface = " ";
Key = " ";
Keyword = " ";
Method = "󰊕 ";
Module = " ";
Namespace = "󰦮 ";
Null = " ";
Number = "󰎠 ";
Object = " ";
Operator = " ";
Package = " ";
Property = " ";
Reference = " ";
Snippet = " ";
String = " ";
Struct = "󰆼 ";
TabNine = "󰏚 ";
Text = " ";
TypeParameter = " ";
Unit = " ";
Value = " ";
Variable = "󰀫 ";
};
}

View File

@ -0,0 +1,616 @@
{
globals.mapleader = " ";
keymaps = [
# better up/down
{
mode = ["n" "x"];
key = "j";
action = "v:count == 0 ? 'gj' : 'j'";
options = {
desc = "Down";
expr = true;
silent = true;
};
}
{
mode = ["n" "x"];
key = "<Down>";
action = "v:count == 0 ? 'gj' : 'j'";
options = {
desc = "Down";
expr = true;
silent = true;
};
}
{
mode = ["n" "x"];
key = "k";
action = "v:count == 0 ? 'gk' : 'k'";
options = {
desc = "Up";
expr = true;
silent = true;
};
}
{
mode = ["n" "x"];
key = "<Up>";
action = "v:count == 0 ? 'gk' : 'k'";
options = {
desc = "Up";
expr = true;
silent = true;
};
}
# Clear search with <esc>
{
mode = ["i" "n"];
key = "<esc>";
action = "<cmd>noh<cr><esc>";
options = {
desc = "Escape and Clear hlsearch";
};
}
# Add undo break-points
{
mode = "i";
key = ",";
action = ",<c-g>u";
}
{
mode = "i";
key = ".";
action = ".<c-g>u";
}
{
mode = "i";
key = ";";
action = ";<c-g>u";
}
# Move to window using the <ctrl> hjkl keys
{
mode = "n";
key = "<C-h>";
action = "<C-w>h";
options = {
desc = "Go to Left Window";
remap = true;
};
}
{
mode = "n";
key = "<C-j>";
action = "<C-w>j";
options = {
desc = "Go to Lower Window";
remap = true;
};
}
{
mode = "n";
key = "<C-k>";
action = "<C-w>k";
options = {
desc = "Go to Upper Window";
remap = true;
};
}
{
mode = "n";
key = "<C-l>";
action = "<C-w>l";
options = {
desc = "Go to Right Window";
remap = true;
};
}
# Resize window using <ctrl> arrow keys
{
mode = "n";
key = "<C-Up>";
action = "<cmd>resize +2<cr>";
options = {desc = "Increase Window Height";};
}
{
mode = "n";
key = "<C-Down>";
action = "<cmd>resize -2<cr>";
options = {desc = "Decrease Window Height";};
}
{
mode = "n";
key = "<C-Left>";
action = "<cmd>vertical resize -2<cr>";
options = {desc = "Decrease Window Width";};
}
{
mode = "n";
key = "<C-Right>";
action = "<cmd>vertical resize +2<cr>";
options = {desc = "Increase Window Width";};
}
# General maps
{
mode = "n";
key = "<leader>f";
action = "+find/file";
}
{
mode = "n";
key = "<leader>s";
action = "+search";
}
{
mode = "n";
key = "<leader>q";
action = "+quit/session";
}
{
mode = ["n" "v"];
key = "<leader>g";
action = "+git";
}
{
mode = "n";
key = "<leader>u";
action = "+ui";
}
{
mode = "n";
key = "<leader>w";
action = "+windows";
}
{
mode = "n";
key = "<leader><Tab>";
action = "+tab";
}
{
mode = ["n" "v"];
key = "<leader>d";
action = "+debug";
}
{
mode = ["n" "v"];
key = "<leader>c";
action = "+code";
}
{
mode = ["n" "v"];
key = "<leader>t";
action = "+test";
}
# Tabs
{
mode = "n";
key = "<leader><tab>l";
action = "<cmd>tablast<cr>";
options = {
silent = true;
desc = "Last tab";
};
}
{
mode = "n";
key = "<leader><tab>f";
action = "<cmd>tabfirst<cr>";
options = {
silent = true;
desc = "First Tab";
};
}
{
mode = "n";
key = "<leader><tab><tab>";
action = "<cmd>tabnew<cr>";
options = {
silent = true;
desc = "New Tab";
};
}
{
mode = "n";
key = "<leader><tab>]";
action = "<cmd>tabnext<cr>";
options = {
silent = true;
desc = "Next Tab";
};
}
{
mode = "n";
key = "<leader><tab>d";
action = "<cmd>tabclose<cr>";
options = {
silent = true;
desc = "Close tab";
};
}
{
mode = "n";
key = "<leader><tab>[";
action = "<cmd>tabprevious<cr>";
options = {
silent = true;
desc = "Previous Tab";
};
}
# Windows
{
mode = "n";
key = "<leader>ww";
action = "<C-W>p";
options = {
silent = true;
desc = "Other window";
};
}
{
mode = "n";
key = "<leader>wd";
action = "<C-W>c";
options = {
silent = true;
desc = "Delete window";
};
}
{
mode = "n";
key = "<leader>w-";
action = "<C-W>s";
options = {
silent = true;
desc = "Split window below";
};
}
{
mode = "n";
key = "<leader>w|";
action = "<C-W>v";
options = {
silent = true;
desc = "Split window right";
};
}
# {
# mode = "n";
# key = "<leader>-";
# action = "<C-W>s";
# options = {
# silent = true;
# desc = "Split window below";
# };
# }
# {
# mode = "n";
# key = "<leader>|";
# action = "<C-W>v";
# options = {
# silent = true;
# desc = "Split window right";
# };
# }
{
mode = "n";
key = "<C-s>";
action = "<cmd>w<cr><esc>";
options = {
silent = true;
desc = "Save file";
};
}
# Quit/Session
{
mode = "n";
key = "<leader>qq";
action = "<cmd>quitall<cr><esc>";
options = {
silent = true;
desc = "Quit all";
};
}
{
mode = "n";
key = "<leader>qs";
action = ":lua require('persistence').load()<cr>";
options = {
silent = true;
desc = "Restore session";
};
}
{
mode = "n";
key = "<leader>ql";
action = "<cmd>lua require('persistence').load({ last = true })<cr>";
options = {
silent = true;
desc = "Restore last session";
};
}
{
mode = "n";
key = "<leader>qd";
action = "<cmd>lua require('persistence').stop()<cr>";
options = {
silent = true;
desc = "Don't save current session";
};
}
{
mode = "n";
key = "<leader>ul";
action = ":lua ToggleLineNumber()<cr>";
options = {
silent = true;
desc = "Toggle Line Numbers";
};
}
{
mode = "n";
key = "<leader>uL";
action = ":lua ToggleRelativeLineNumber()<cr>";
options = {
silent = true;
desc = "Toggle Relative Line Numbers";
};
}
{
mode = "n";
key = "<leader>uw";
action = ":lua ToggleWrap()<cr>";
options = {
silent = true;
desc = "Toggle Line Wrap";
};
}
{
mode = "v";
key = "J";
action = ":m '>+1<CR>gv=gv";
options = {
silent = true;
desc = "Move up when line is highlighted";
};
}
{
mode = "v";
key = "K";
action = ":m '<-2<CR>gv=gv";
options = {
silent = true;
desc = "Move down when line is highlighted";
};
}
{
mode = "n";
key = "J";
action = "mzJ`z";
options = {
silent = true;
desc = "Allow cursor to stay in the same place after appeding to current line";
};
}
# better indenting
{
mode = "v";
key = "<";
action = "<gv";
options = {
silent = true;
desc = "Indent while remaining in visual mode.";
};
}
{
mode = "v";
key = ">";
action = ">gv";
options = {
silent = true;
desc = "Indent while remaining in visual mode.";
};
}
{
mode = "n";
key = "<C-d>";
action = "<C-d>zz";
options = {
silent = true;
desc = "Allow <C-d> and <C-u> to keep the cursor in the middle";
};
}
{
mode = "n";
key = "<C-u>";
action = "<C-u>zz";
options = {
desc = "Allow C-d and C-u to keep the cursor in the middle";
};
}
# Remap for dealing with word wrap and adding jumps to the jumplist.
{
mode = "n";
key = "j";
action.__raw = "
[[(v:count > 1 ? 'm`' . v:count : 'g') . 'j']]
";
options = {
expr = true;
desc = "Remap for dealing with word wrap and adding jumps to the jumplist.";
};
}
{
mode = "n";
key = "k";
action.__raw = "
[[(v:count > 1 ? 'm`' . v:count : 'g') . 'k']]
";
options = {
expr = true;
desc = "Remap for dealing with word wrap and adding jumps to the jumplist.";
};
}
{
mode = "n";
key = "n";
action = "nzzzv";
options = {
desc = "Allow search terms to stay in the middle";
};
}
{
mode = "n";
key = "N";
action = "Nzzzv";
options = {
desc = "Allow search terms to stay in the middle";
};
}
# Paste stuff without saving the deleted word into the buffer
{
mode = "x";
key = "<leader>p";
action = "\"_dP";
options = {
desc = "Deletes to void register and paste over";
};
}
# Copy stuff to system clipboard with <leader> + y or just y to have it just in vim
{
mode = ["n" "v"];
key = "<leader>y";
action = "\"+y";
options = {
desc = "Copy to system clipboard";
};
}
{
mode = ["n" "v"];
key = "<leader>Y";
action = "\"+Y";
options = {
desc = "Copy to system clipboard";
};
}
# Delete to void register
{
mode = ["n" "v"];
key = "<leader>D";
action = "\"_d";
options = {
desc = "Delete to void register";
};
}
# <C-c> instead of pressing esc just because
{
mode = "i";
key = "<C-c>";
action = "<Esc>";
}
{
mode = "n";
key = "<C-f>";
action = "!tmux new tmux-sessionizer<CR>";
options = {
desc = "Switch between projects";
};
}
];
extraConfigLua = ''
local notify = require("notify")
local function show_notification(message, level)
notify(message, level, { title = "conform.nvim" })
end
function ToggleLineNumber()
if vim.wo.number then
vim.wo.number = false
show_notification("Line numbers disabled", "info")
else
vim.wo.number = true
vim.wo.relativenumber = false
show_notification("Line numbers enabled", "info")
end
end
function ToggleRelativeLineNumber()
if vim.wo.relativenumber then
vim.wo.relativenumber = false
show_notification("Relative line numbers disabled", "info")
else
vim.wo.relativenumber = true
vim.wo.number = false
show_notification("Relative line numbers enabled", "info")
end
end
function ToggleWrap()
if vim.wo.wrap then
vim.wo.wrap = false
show_notification("Wrap disabled", "info")
else
vim.wo.wrap = true
vim.wo.number = false
show_notification("Wrap enabled", "info")
end
end
if vim.lsp.inlay_hint then
vim.keymap.set('n', '<leader>uh', function()
vim.lsp.inlay_hint(0, nil)
end, { desc = 'Toggle Inlay Hints' })
end
'';
}

View File

@ -0,0 +1,8 @@
{
plugins.lsp.servers.texlab = {
enable = true;
settings.texlab = {
build.onSave = true;
};
};
}

View File

@ -0,0 +1,81 @@
let
javaTestPath = "/nix/store/j3nvmhvj2pmnykw5pbm51dn0bz4cv6j3-vscode-extension-vscjava-vscode-java-test-0.38.2023032402/share/vscode/extensions/vscjava.vscode-java-test/server/com.microsoft.java.test.plugin-0.38.2.jar
";
in {
plugins.nvim-jdtls = {
enable = true;
cmd = [
"/nix/store/20h2hjjm94gbskqhbwikbgxbblv1xpf2-jdt-language-server-1.31.0/bin/jdtls"
];
# configuration = "/path/to/configuration";
data = "~/.cache/jdtls/workspace";
settings = {
java = {
signatureHelp = true;
completion = true;
};
};
initOptions = {
bundles = [
"/nix/store/b9ib40q36wxjl4xs5lng263lflz1fsi7-vscode-extension-vscjava-vscode-java-debug-0.49.2023032407/share/vscode/extensions/vscjava.vscode-java-debug/server/com.microsoft.java.debug.plugin-0.44.0.jar"
"${javaTestPath}"
];
};
};
}
#
# extraConfigLua = ''
# local jdtls = require("jdtls")
# local cmp_nvim_lsp = require("cmp_nvim_lsp")
#
# local root_dir = require("jdtls.setup").find_root({ "packageInfo" }, "Config")
# local home = os.getenv("HOME")
# local eclipse_workspace = home .. "/.local/share/eclipse/" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
#
# local ws_folders_jdtls = {}
# if root_dir then
# local file = io.open(root_dir .. "/.bemol/ws_root_folders")
# if file then
# for line in file:lines() do
# table.insert(ws_folders_jdtls, "file://" .. line)
# end
# file:close()
# end
# end
#
# -- for completions
# local client_capabilities = vim.lsp.protocol.make_client_capabilities()
# local capabilities = cmp_nvim_lsp.default_capabilities(client_capabilities)
#
# local config = {
# capabilities = capabilities,
# cmd = {
# "${pkgs.jdt-language-server}/bin/jdt-language-server",
# "--jvm-arg=-javaagent:" .. home .. "/Developer/lombok.jar",
# "-data",
# eclipse_workspace,
# "--add-modules=ALL-SYSTEM",
# },
# root_dir = root_dir,
# init_options = {
# workspaceFolders = ws_folders_jdtls,
# },
# settings = {
# java = {
# signatureHelp = { enabled = true},
# completion = { enabled = true },
# },
# },
# on_attach = function(client, bufnr)
# local opts = { silent = true, buffer = bufnr }
# vim.keymap.set('n', "<leader>lo", jdtls.organize_imports, { desc = 'Organize imports', buffer = bufnr })
# vim.keymap.set('n', "<leader>df", jdtls.test_class, opts)
# vim.keymap.set('n', "<leader>dn", jdtls.test_nearest_method, opts)
# vim.keymap.set('n', '<leader>rv', jdtls.extract_variable_all, { desc = 'Extract variable', buffer = bufnr })
# vim.keymap.set('n', '<leader>rc', jdtls.extract_constant, { desc = 'Extract constant', buffer = bufnr })
# end
# }
#
# jdtls.start_or_attach(config)
# '';

View File

@ -0,0 +1,25 @@
{
pkgs,
pkgsMaster,
...
}: {
plugins.lint = {
enable = true;
lintersByFt = {
nix = ["statix"];
lua = ["selene"];
python = ["flake8"];
javascript = ["eslint_d"];
javascriptreact = ["eslint_d"];
typescript = ["eslint_d"];
typescriptreact = ["eslint_d"];
json = ["jsonlint"];
java = ["checkstyle"];
};
};
extraPackages = with pkgs; [
statix
pkgsMaster.eslint_d
];
}

View File

@ -0,0 +1,9 @@
{
plugins = {
lsp.servers.pyright = {
enable = true;
};
conform-nvim.formattersByFt = ["black"];
};
}

View File

@ -0,0 +1,19 @@
{
filetype.extension.mdx = "mdx";
plugins.treesitter.languageRegister.markdown = ["mdx"];
# Tree Sitter Grammar
extraFiles."queries/markdown/injections.scm" = {
enable = true;
text = ''
; extends
((inline) @injection.content
(#lua-match? @injection.content "^%s*import")
(#set! injection.language "typescript"))
((inline) @injection.content
(#lua-match? @injection.content "^%s*export")
(#set! injection.language "typescript"))
'';
};
}

View File

@ -0,0 +1,5 @@
{
plugins.treesitter-context = {
enable = true;
};
}

View File

@ -0,0 +1,50 @@
{
plugins.treesitter-textobjects = {
enable = false;
select = {
enable = true;
lookahead = true;
keymaps = {
"aa" = "@parameter.outer";
"ia" = "@parameter.inner";
"af" = "@function.outer";
"if" = "@function.inner";
"ac" = "@class.outer";
"ic" = "@class.inner";
"ii" = "@conditional.inner";
"ai" = "@conditional.outer";
"il" = "@loop.inner";
"al" = "@loop.outer";
"at" = "@comment.outer";
};
};
move = {
enable = true;
gotoNextStart = {
"]m" = "@function.outer";
"]]" = "@class.outer";
};
gotoNextEnd = {
"]M" = "@function.outer";
"][" = "@class.outer";
};
gotoPreviousStart = {
"[m" = "@function.outer";
"[[" = "@class.outer";
};
gotoPreviousEnd = {
"[M" = "@function.outer";
"[]" = "@class.outer";
};
};
swap = {
enable = true;
swapNext = {
"<leader>a" = "@parameters.inner";
};
swapPrevious = {
"<leader>A" = "@parameter.outer";
};
};
};
}

View File

@ -0,0 +1,11 @@
{
plugins.treesitter = {
enable = true;
folding = true;
nixvimInjections = true;
settings = {
highlight.enable = true;
indent.enable = true;
};
};
}

View File

@ -0,0 +1,5 @@
{
plugins.ts-autotag = {
enable = true;
};
}

View File

@ -0,0 +1,6 @@
{
plugins.ts-context-commentstring = {
enable = true;
disableAutoInitialization = false;
};
}

View File

@ -0,0 +1,50 @@
{
plugins.typescript-tools = {
enable = false;
settings = {
tsserverFilePreferences = {
# Inlay Hints
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayVariableTypeHints = true;
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayEnumMemberValueHints = true;
};
tsserverPlugins = [
"@vue/typescript-plugin"
];
on_attach = ''
function(client, bufnr)
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
if vim.lsp.inlay_hint then
vim.lsp.inlay_hint(bufnr, true)
end
end
'';
};
};
keymaps = [
{
mode = "n";
key = "<leader>co";
action = "<cmd>TSToolsOrganizeImports<cr>";
options = {
desc = "Organize Imports";
};
}
{
mode = "n";
key = "<leader>cR";
action = "<cmd>TSToolsRemoveUnusedImports<cr>";
options = {
desc = "Remove Unused Imports";
};
}
];
}

View File

@ -0,0 +1,103 @@
{pkgs, ...}: {
plugins.conform-nvim = {
enable = true;
settings = {
notify_on_error = true;
formatters_by_ft = {
html = [["prettierd" "prettier"]];
css = [["prettierd" "prettier"]];
javascript = [["prettierd" "prettier"]];
javascriptreact = [["prettierd" "prettier"]];
typescript = [["prettierd" "prettier"]];
typescriptreact = [["prettierd" "prettier"]];
astro = [["prettierd" "prettier"]];
vue = [["prettierd" "prettier"]];
json = [["prettierd" "prettier"]];
yaml = [["prettierd" "prettier"]];
java = ["google-java-format"];
python = ["black"];
lua = ["stylua"];
nix = ["alejandra"];
markdown = [["prettierd" "prettier"]];
rust = ["rustfmt"];
};
};
};
extraPackages = with pkgs; [
prettierd
alejandra
];
keymaps = [
{
mode = "n";
key = "<leader>uf";
action = ":FormatToggle<CR>";
options = {
desc = "Toggle Format";
silent = true;
};
}
{
mode = "n";
key = "<leader>cf";
action = "<cmd>lua require('conform').format()<cr>";
options = {
silent = true;
desc = "Format Buffer";
};
}
{
mode = "v";
key = "<leader>cF";
action = "<cmd>lua require('conform').format()<cr>";
options = {
silent = true;
desc = "Format Lines";
};
}
];
extraConfigLua = ''
local conform = require("conform")
local notify = require("notify")
conform.setup({
format_on_save = function(bufnr)
-- Disable with a global or buffer-local variable
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
return { timeout_ms = 500, lsp_fallback = true }
end,
})
local function show_notification(message, level)
notify(message, level, { title = "conform.nvim" })
end
vim.api.nvim_create_user_command("FormatToggle", function(args)
local is_global = not args.bang
if is_global then
vim.g.disable_autoformat = not vim.g.disable_autoformat
if vim.g.disable_autoformat then
show_notification("Autoformat-on-save disabled globally", "info")
else
show_notification("Autoformat-on-save enabled globally", "info")
end
else
vim.b.disable_autoformat = not vim.b.disable_autoformat
if vim.b.disable_autoformat then
show_notification("Autoformat-on-save disabled for this buffer", "info")
else
show_notification("Autoformat-on-save enabled for this buffer", "info")
end
end
end, {
desc = "Toggle autoformat-on-save",
bang = true,
})
'';
}

View File

@ -0,0 +1,99 @@
{
plugins.fidget = {
enable = true;
logger = {
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
floatPrecision = 0.01; # Limit the number of decimals displayed for floats
};
progress = {
pollRate = 0; # How and when to poll for progress messages
suppressOnInsert = true; # Suppress new messages while in insert mode
ignoreDoneAlready = false; # Ignore new tasks that are already complete
ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message
clearOnDetach =
# Clear notification group when LSP server detaches
''
function(client_id)
local client = vim.lsp.get_client_by_id(client_id)
return client and client.name or nil
end
'';
notificationGroup =
# How to get a progress message's notification group key
''
function(msg) return msg.lsp_client.name end
'';
ignore = []; # List of LSP servers to ignore
lsp = {
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
};
display = {
renderLimit = 16; # How many LSP messages to show at once
doneTtl = 3; # How long a message should persist after completion
doneIcon = ""; # Icon shown when all LSP progress tasks are complete
doneStyle = "Constant"; # Highlight group for completed LSP tasks
progressTtl = "math.huge"; # How long a message should persist when in progress
progressIcon = {
pattern = "dots";
period = 1;
}; # Icon shown when LSP progress tasks are in progress
progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks
groupStyle = "Title"; # Highlight group for group name (LSP server name)
iconStyle = "Question"; # Highlight group for group icons
priority = 30; # Ordering priority for LSP notification group
skipHistory = true; # Whether progress notifications should be omitted from history
formatMessage = ''
require ("fidget.progress.display").default_format_message
''; # How to format a progress message
formatAnnote = ''
function (msg) return msg.title end
''; # How to format a progress annotation
formatGroupName = ''
function (group) return tostring (group) end
''; # How to format a progress notification group's name
overrides = {
rust_analyzer = {
name = "rust-analyzer";
};
}; # Override options from the default notification config
};
};
notification = {
pollRate = 10; # How frequently to update and render notifications
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
historySize = 128; # Number of removed messages to retain in history
overrideVimNotify = true;
redirect = ''
function(msg, level, opts)
if opts and opts.on_open then
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
end
end
'';
configs = {
default = "require('fidget.notification').default_config";
};
window = {
normalHl = "Comment";
winblend = 0;
border = "none"; # none, single, double, rounded, solid, shadow
zindex = 45;
maxWidth = 0;
maxHeight = 0;
xPadding = 1;
yPadding = 0;
align = "bottom";
relative = "editor";
};
view = {
stackUpwards = true; # Display notification items from bottom to top
iconSeparator = " "; # Separator between group name and icon
groupSeparator = "---"; # Separator between notification groups
groupSeparatorHl =
# Highlight group used for group separator
"Comment";
};
};
};
}

View File

@ -0,0 +1,188 @@
{
pkgs,
icons,
...
}: {
plugins = {
lsp-format = {
enable = false; # Enable it if you want lsp-format integration for none-ls
};
lsp = {
enable = true;
capabilities = "offsetEncoding = 'utf-16'";
servers = {
clangd = {enable = true;};
lua_ls = {
enable = true;
extraOptions = {
settings = {
Lua = {
completion = {
callSnippet = "Replace";
};
telemetry = {
enabled = false;
};
hint = {enable = true;};
};
};
};
};
nil_ls = {enable = true;};
ts_ls = {
enable = true;
extraOptions = {
settings = {
javascript = {
inlayHints = {
includeInlayEnumMemberValueHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayVariableTypeHints = true;
};
};
typescript = {
inlayHints = {
includeInlayEnumMemberValueHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayVariableTypeHints = true;
};
};
};
};
};
astro = {enable = true;};
volar = {
enable = true;
package = pkgs.vue-language-server;
tslsIntegration = true;
rootDir = ''require("lspconfig.util").root_pattern("src/App.vue")'';
};
svelte = {enable = true;};
eslint = {enable = true;};
pyright = {enable = true;};
ruff_lsp = {enable = true;};
rust_analyzer = {
enable = true;
installCargo = false;
installRustc = false;
settings = {
checkOnSave = true;
check = {
command = "clippy";
};
# inlayHints = {
# enable = true;
# showParameterNames = true;
# parameterHintsPrefix = "<- ";
# otherHintsPrefix = "=> ";
# };
procMacro = {
enable = true;
};
};
};
dartls.enable = true;
};
# keymaps = {
# silent = true;
# lspBuf = {
# gd = {
# action = "definition";
# desc = "Goto Definition";
# };
# gr = {
# action = "references";
# desc = "Goto References";
# };
# gD = {
# action = "declaration";
# desc = "Goto Declaration";
# };
# gI = {
# action = "implementation";
# desc = "Goto Implementation";
# };
# gT = {
# action = "type_definition";
# desc = "Type Definition";
# };
# K = {
# action = "hover";
# desc = "Hover";
# };
# "<leader>cw" = {
# action = "workspace_symbol";
# desc = "Workspace Symbol";
# };
# "<leader>cr" = {
# action = "rename";
# desc = "Rename";
# };
# "<leader>ca" = {
# action = "code_action";
# desc = "Code Action";
# };
# "<C-k>" = {
# action = "signature_help";
# desc = "Signature Help";
# };
# };
# diagnostic = {
# "<leader>cd" = {
# action = "open_float";
# desc = "Line Diagnostics";
# };
# "[d" = {
# action = "goto_next";
# desc = "Next Diagnostic";
# };
# "]d" = {
# action = "goto_prev";
# desc = "Previous Diagnostic";
# };
# };
# };
};
};
extraConfigLua = ''
local _border = "rounded"
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = _border
}
)
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
vim.lsp.handlers.signature_help, {
border = _border
}
)
vim.diagnostic.config({
float={border=_border},
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "${icons.diagnostics.Error}",
[vim.diagnostic.severity.WARN] = "${icons.diagnostics.Warn}",
[vim.diagnostic.severity.HINT] = "${icons.diagnostics.Hint}",
[vim.diagnostic.severity.INFO] = "${icons.diagnostics.Info}",
},
},
})
require('lspconfig.ui.windows').default_options = {
border = _border
}
'';
}

View File

@ -0,0 +1,186 @@
{
plugins.lspsaga = {
enable = true;
beacon = {
enable = true;
};
ui = {
border = "rounded"; # One of none, single, double, rounded, solid, shadow
codeAction = "💡"; # Can be any symbol you want 💡
};
hover = {
openCmd = "!floorp"; # Choose your browser
openLink = "gx";
};
diagnostic = {
borderFollow = true;
diagnosticOnlyCurrent = false;
showCodeAction = true;
};
symbolInWinbar = {
enable = false; # Breadcrumbs
};
codeAction = {
extendGitSigns = false;
showServerName = true;
onlyInCursor = true;
numShortcut = true;
keys = {
exec = "<CR>";
quit = ["<Esc>" "q"];
};
};
lightbulb = {
enable = false;
sign = false;
virtualText = true;
};
implement = {
enable = false;
};
rename = {
autoSave = false;
keys = {
exec = "<CR>";
quit = ["<C-k>" "<Esc>"];
select = "x";
};
};
outline = {
autoClose = true;
autoPreview = true;
closeAfterJump = true;
layout = "normal"; # normal or float
winPosition = "right"; # left or right
keys = {
jump = "e";
quit = "q";
toggleOrJump = "o";
};
};
scrollPreview = {
scrollDown = "<C-f>";
scrollUp = "<C-b>";
};
};
keymaps = [
{
mode = "n";
key = "gd";
action = "<cmd>Lspsaga finder def<CR>";
options = {
desc = "Goto Definition";
silent = true;
};
}
{
mode = "n";
key = "gr";
action = "<cmd>Lspsaga finder ref<CR>";
options = {
desc = "Goto References";
silent = true;
};
}
# {
# mode = "n";
# key = "gD";
# action = "<cmd>Lspsaga show_line_diagnostics<CR>";
# options = {
# desc = "Goto Declaration";
# silent = true;
# };
# }
{
mode = "n";
key = "gI";
action = "<cmd>Lspsaga finder imp<CR>";
options = {
desc = "Goto Implementation";
silent = true;
};
}
{
mode = "n";
key = "gT";
action = "<cmd>Lspsaga peek_type_definition<CR>";
options = {
desc = "Type Definition";
silent = true;
};
}
{
mode = "n";
key = "K";
action = "<cmd>Lspsaga hover_doc<CR>";
options = {
desc = "Hover";
silent = true;
};
}
{
mode = "n";
key = "<leader>cw";
action = "<cmd>Lspsaga outline<CR>";
options = {
desc = "Outline";
silent = true;
};
}
{
mode = "n";
key = "<leader>cr";
action = "<cmd>Lspsaga rename<CR>";
options = {
desc = "Rename";
silent = true;
};
}
{
mode = "n";
key = "<leader>ca";
action = "<cmd>Lspsaga code_action<CR>";
options = {
desc = "Code Action";
silent = true;
};
}
{
mode = "n";
key = "<leader>cd";
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
options = {
desc = "Line Diagnostics";
silent = true;
};
}
{
mode = "n";
key = "[d";
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
options = {
desc = "Next Diagnostic";
silent = true;
};
}
{
mode = "n";
key = "]d";
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
options = {
desc = "Previous Diagnostic";
silent = true;
};
}
];
}

View File

@ -0,0 +1,52 @@
{
plugins.trouble = {
enable = true;
settings = {
auto_close = true;
};
};
# TODO: Add keybinds to close trouble (q would be nice), rn I need to use :x to close it...
keymaps = [
{
mode = "n";
key = "<leader>x";
action = "+diagnostics/quickfix";
}
{
mode = "n";
key = "<leader>xx";
action = "<cmd>TroubleToggle<cr>";
options = {
silent = true;
desc = "Document Diagnostics (Trouble)";
};
}
{
mode = "n";
key = "<leader>xX";
action = "<cmd>TroubleToggle workspace_diagnostics<cr>";
options = {
silent = true;
desc = "Workspace Diagnostics (Trouble)";
};
}
{
mode = "n";
key = "<leader>xt";
action = "<cmd>TroubleToggle todo<cr>";
options = {
silent = true;
desc = "Todo (Trouble)";
};
}
{
mode = "n";
key = "<leader>xQ";
action = "<cmd>TodoQuickFix<cr>";
options = {
silent = true;
desc = "Quickfix List (Trouble)";
};
}
];
}

View File

@ -0,0 +1,71 @@
{
plugins.none-ls = {
enable = false;
enableLspFormat = false;
settings = {
update_in_insert = false;
on_attach = ''
function(client, bufnr)
if client.supports_method "textDocument/formatting" then
vim.api.nvim_clear_autocmds { group = augroup, buffer = bufnr }
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format { bufnr = bufnr }
end,
})
end
end
'';
};
sources = {
code_actions = {
gitsigns.enable = true;
statix.enable = true;
};
diagnostics = {
checkstyle = {
enable = true;
};
statix = {
enable = true;
};
};
formatting = {
alejandra = {
enable = true;
};
prettier = {
enable = true;
disableTsServerFormatter = true;
};
google_java_format = {
enable = true;
};
stylua = {
enable = true;
};
black = {
enable = true;
settings = ''
{
extra_args = { "--fast" },
}
'';
};
};
};
};
# keymaps = [
# {
# mode = [ "n" "v" ];
# key = "<leader>cf";
# action = "<cmd>lua vim.lsp.buf.format()<cr>";
# options = {
# silent = true;
# desc = "Format";
# };
# }
# ];
}

167
pkgs/nvim/config/sets.nix Normal file
View File

@ -0,0 +1,167 @@
{
config = {
# Set colorscheme
colorscheme = "gruvbox";
# Enable experimental lua loader
luaLoader.enable = true;
opts = {
# Autosave when changing buffers
autowrite = true;
# Enable relative line numbers
number = true;
relativenumber = true;
# Set tabs to 2 spaces
tabstop = 2;
softtabstop = 2;
showtabline = 2;
expandtab = true;
# Enable auto indenting and set it to spaces
smartindent = true;
shiftwidth = 2;
# Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim)
breakindent = true;
# Enable incremental searching
hlsearch = true;
incsearch = true;
# Enable text wrap
wrap = true;
# Better splitting
splitbelow = true;
splitright = true;
# Enable mouse mode
mouse = "a"; # Mouse
# Enable ignorecase + smartcase for better searching
ignorecase = true;
smartcase = true; # Don't ignore case with capitals
grepprg = "rg --vimgrep";
grepformat = "%f:%l:%c:%m";
# Decrease updatetime
updatetime = 50; # faster completion (4000ms default)
# Set completeopt to have a better completion experience
completeopt = ["menuone" "noselect" "noinsert"]; # mostly just for cmp
# Enable persistent undo history
swapfile = false;
backup = false;
undofile = true;
# Enable 24-bit colors
termguicolors = true;
# Enable the sign column to prevent the screen from jumping
signcolumn = "yes";
# Enable cursor line highlight
cursorline = true; # Highlight the line where the cursor is located
# Set fold settings
# These options were reccommended by nvim-ufo
# See: https://github.com/kevinhwang91/nvim-ufo#minimal-configuration
foldcolumn = "0";
foldlevel = 99;
foldlevelstart = 99;
foldenable = true;
# Always keep 8 lines above/below cursor unless at start/end of file
scrolloff = 8;
# Place a column line
colorcolumn = "80";
# Customize sidebar characters
fillchars = {
foldopen = "";
foldclose = "";
fold = " ";
foldsep = " ";
diff = "";
eob = " ";
};
# Reduce which-key timeout to 10ms
timeoutlen = 10;
# Set encoding type
encoding = "utf-8";
fileencoding = "utf-8";
# Change cursor options
guicursor = [
"n-v-c:block" # Normal, visual, command-line: block cursor
"i-ci-ve:ver25" # Insert, command-line insert, visual-exclude: vertical bar cursor with block cursor, use "ver25" for 25% width
"r-cr:hor20" # Replace, command-line replace: horizontal bar cursor with 20% height
"o:hor50" # Operator-pending: horizontal bar cursor with 50% height
"a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor" # All modes: blinking settings
"sm:block-blinkwait175-blinkoff150-blinkon175" # Showmatch: block cursor with specific blinking settings
];
# Enable chars list
list = false; # Show invisible characters (tabs, eol, ...)
listchars = "eol:,tab:|->,lead:·,space: ,trail:,extends:,precedes:,nbsp:";
# More space in the neovim command line for displaying messages
cmdheight = 2;
# We don't need to see things like INSERT anymore
showmode = false;
# Maximum number of items to show in the popup menu (0 means "use available screen space")
pumheight = 0;
# Use conform-nvim for gq formatting. ('formatexpr' is set to vim.lsp.formatexpr(), so you can format lines via gq if the language server supports it)
formatexpr = "v:lua.require'conform'.formatexpr()";
laststatus = 3; # (https://neovim.io/doc/user/options.html#'laststatus')
};
extraFiles = {
"lua/helpers.lua".source = ./helpers.lua;
};
extraConfigLuaPre = ''
require "helpers"
'';
extraConfigLua = ''
local opt = vim.opt
local g = vim.g
local o = vim.o
-- Neovide
if g.neovide then
-- Neovide options
g.neovide_fullscreen = false
g.neovide_hide_mouse_when_typing = false
g.neovide_refresh_rate = 165
g.neovide_cursor_vfx_mode = "ripple"
g.neovide_cursor_animate_command_line = true
g.neovide_cursor_animate_in_insert_mode = true
g.neovide_cursor_vfx_particle_lifetime = 5.0
g.neovide_cursor_vfx_particle_density = 14.0
g.neovide_cursor_vfx_particle_speed = 12.0
g.neovide_transparency = 0.8
-- Neovide Fonts
o.guifont = "MonoLisa Trial:Medium:h15"
-- o.guifont = "CommitMono:Medium:h15"
-- o.guifont = "JetBrainsMono Nerd Font:h14:Medium:i"
-- o.guifont = "FiraMono Nerd Font:Medium:h14"
-- o.guifont = "CaskaydiaCove Nerd Font:h14:b:i"
-- o.guifont = "BlexMono Nerd Font Mono:h14:Medium:i"
-- o.guifont = "Liga SFMono Nerd Font:b:h15"
end
'';
};
}

View File

@ -0,0 +1,15 @@
{pkgs, ...}: {
plugins.luasnip = {
enable = true;
settings = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
fromVscode = [
{
lazyLoad = true;
paths = "${pkgs.vimPlugins.friendly-snippets}";
}
];
};
}

View File

@ -0,0 +1,93 @@
{icons, ...}: {
plugins.lualine = {
enable = true;
settings = {
options = {
always_divide_middle = true;
globalstatus = true;
ignore_focus = ["neo-tree"];
theme = "auto";
component_separators = {
left = "·";
right = "·";
};
section_separators = {
left = ""; # 
right = ""; # 
};
};
extensions = ["fzf"];
sections = let
mkColor = color: {
__raw = ''function() return MVim.fg("${color}") end'';
};
in {
lualine_a = ["mode"];
lualine_b = ["branch"];
lualine_c = [
{
__unkeyed-1 = "diagnostics";
symbols = {
error = icons.diagnostics.Error;
warn = icons.diagnostics.Warn;
info = icons.diagnostics.Info;
hint = icons.diagnostics.Hint;
};
}
{
__unkeyed-1 = "filetype";
icon_only = true;
separator = {
left = "";
right = "";
};
padding = {
left = 1;
right = 0;
};
}
"filename"
];
lualine_x = [
# Command
{
__unkeyed-1.__raw = ''function() return require("noice").api.status.command.get() end'';
color = mkColor "Statement";
cond.__raw = ''function() return package.loaded["noice"] and require("noice").api.status.command.has() end'';
}
# Mode
{
__unkeyed-1.__raw = ''function() return require("noice").api.status.mode.get() end'';
color = mkColor "Constant";
cond.__raw = ''function() return package.loaded["noice"] and require("noice").api.status.mode.has() end'';
}
];
lualine_y = [
{
__unkeyed-1 = "progress";
separator = {
left = " ";
right = " ";
};
padding = {
left = 1;
right = 1;
};
}
{
__unkeyed-1 = "location";
padding = {
left = 0;
right = 1;
};
}
];
lualine_z = [''" " .. os.date("%I:%M %p"):gsub("0*", "", 1)''];
};
disabled_filetypes = {
statusline = ["dashboard" "alpha" "starter"];
};
};
};
}

View File

@ -0,0 +1,65 @@
{pkgs, ...}: {
extraPlugins = with pkgs.vimUtils; [
(buildVimPlugin {
pname = "staline.nvim";
version = "2024-02-05";
src = pkgs.fetchFromGitHub {
owner = "tamton-aquib";
repo = "staline.nvim";
rev = "a53f869278b8b186a5afd6f21680cd103c381599";
hash = "sha256-GDMKzxFDtQk5LL+rMsxTGTyLv69w5NUd+u19noeO5ws=";
};
})
];
extraConfigLua = ''
require("staline").setup({
sections = {
left = { "-mode", " ", "branch" },
mid = { "lsp_name" },
right = { "file_name", "line_column" },
},
inactive_sections = {
left = { "-mode", " ", "branch" },
mid = { "lsp_name" },
right = { "file_name", "line_column" },
},
defaults = {
left_separator = " ",
right_separator = " ",
branch_symbol = " ",
mod_symbol = "",
line_column = "[%l/%L]",
inactive_color = "#80a6f2", --#303030 is the default
inactive_bgcolor = "none",
},
special_table = {
lazy = { "Plugins", "💤 " },
TelescopePrompt = { "Telescope", " " },
oil = { "Oil", "󰏇 " },
lazygit = { "LazyGit", " " },
},
mode_icons = {
["n"] = "NORMAL",
["no"] = "NORMAL",
["nov"] = "NORMAL",
["noV"] = "NORMAL",
["niI"] = "NORMAL",
["niR"] = "NORMAL",
["niV"] = "NORMAL",
["i"] = "INSERT",
["ic"] = "INSERT",
["ix"] = "INSERT",
["s"] = "INSERT",
["S"] = "INSERT",
["v"] = "VISUAL",
["V"] = "VISUAL",
[""] = "VISUAL",
["r"] = "REPLACE",
["r?"] = "REPLACE",
["R"] = "REPLACE",
["c"] = "COMMAND",
["t"] = "TERMINAL",
},
})
'';
}

View File

@ -0,0 +1,178 @@
{
plugins.telescope = {
enable = true;
extensions = {
fzf-native = {
enable = true;
};
ui-select = {
settings = {
specific_opts = {
codeactions = true;
};
};
};
undo = {
enable = true;
};
};
# If you'd prefer Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map <Esc> to do so via:
settings = {
defaults = {
mappings = {
i = {
"<esc>" = {
__raw = ''
function(...)
return require("telescope.actions").close(...)
end'';
};
};
};
};
};
keymaps = {
"<leader><space>" = {
action = "find_files";
options.desc = "Find project files";
};
"<leader>/" = {
action = "live_grep";
options.desc = "Grep (root dir)";
};
"<leader>:" = {
action = "command_history";
options.desc = "Command History";
};
"<leader>b" = {
action = "buffers";
options.desc = "+buffer";
};
"<leader>ff" = {
action = "find_files";
options.desc = "Find project files";
};
"<leader>fr" = {
action = "oldfiles";
options.desc = "Recent";
};
"<leader>fb" = {
action = "buffers";
options.desc = "Buffers";
};
"<C-p>" = {
action = "git_files";
options.desc = "Search git files";
};
"<leader>gc" = {
action = "git_commits";
options.desc = "Commits";
};
"<leader>gs" = {
action = "git_status";
options.desc = "Status";
};
"<leader>sa" = {
action = "autocommands";
options.desc = "Auto Commands";
};
"<leader>sb" = {
action = "current_buffer_fuzzy_find";
options.desc = "Buffer";
};
"<leader>sc" = {
action = "command_history";
options.desc = "Command History";
};
"<leader>sC" = {
action = "commands";
options.desc = "Commands";
};
"<leader>sD" = {
action = "diagnostics";
options.desc = "Workspace diagnostics";
};
"<leader>sh" = {
action = "help_tags";
options.desc = "Help pages";
};
"<leader>sH" = {
action = "highlights";
options.desc = "Search Highlight Groups";
};
"<leader>sk" = {
action = "keymaps";
options.desc = "Keymaps";
};
"<leader>sM" = {
action = "man_pages";
options.desc = "Man pages";
};
"<leader>sm" = {
action = "marks";
options.desc = "Jump to Mark";
};
"<leader>so" = {
action = "vim_options";
options.desc = "Options";
};
"<leader>sR" = {
action = "resume";
options.desc = "Resume";
};
"<leader>uC" = {
action = "colorscheme";
options.desc = "Colorscheme preview";
};
};
};
keymaps = [
{
mode = "n";
key = "<leader>fp";
action = "<cmd>Telescope projects<CR>";
options = {
desc = "Projects";
};
}
{
mode = "n";
key = "<leader>sd";
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
options = {
desc = "Document diagnostics";
};
}
{
mode = "n";
key = "<leader>st";
action = "<cmd>TodoTelescope<cr>";
options = {
silent = true;
desc = "Todo (Telescope)";
};
}
# {
# mode = "n";
# key = "<leader>,";
# action = "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>";
# options = {
# desc = "Switch Buffer";
# };
# }
];
extraConfigLua = ''
local telescope = require('telescope')
telescope.setup{
pickers = {
colorscheme = {
enable_preview = true
}
}
}
'';
}

Some files were not shown because too many files have changed in this diff Show More