Compare commits

...

128 Commits

Author SHA1 Message Date
86e0491a97 update system 2026-01-21 13:05:23 +01:00
7a30d561c0 feat: hyprland scrolling 2026-01-18 15:35:34 +01:00
e3e1d93b99 update astro service 2026-01-05 18:11:33 +01:00
648380f91b update system 2026-01-05 13:59:57 +01:00
6cb301eb81 feat: a50 dock service 2026-01-04 23:42:04 +01:00
63a657fc84 update system 2025-12-28 13:03:58 +01:00
a8528b7fcd update system 2025-12-17 13:20:39 +01:00
0b0b568916 update system 2025-12-17 13:12:53 +01:00
02103e2585 update system 2025-12-08 15:14:06 +01:00
de9477ad84 update system 2025-12-08 14:18:53 +01:00
3bf3bf5fa5 update system 2025-11-25 10:20:03 +01:00
ef0b2b07ef stuff 2025-11-25 10:11:11 +01:00
f530957112 feat: nvim 2025-11-20 11:06:28 +01:00
674daa80d1 update system 2025-11-18 12:37:07 +01:00
8ad676580e update system 2025-11-18 11:40:14 +01:00
80d26f037b update system 2025-11-18 11:28:41 +01:00
3b3a15322b update system 2025-11-18 11:07:48 +01:00
d33d53c6fb update system 2025-11-14 14:34:30 +01:00
fc8066a248 feat: cubyz 2025-11-14 13:51:17 +01:00
51196aaefa feat: cubyz 2025-11-12 20:38:35 +01:00
ae93255200 update system 2025-11-07 12:08:23 +01:00
d5eb686f7f update system 2025-11-05 14:13:32 +01:00
69eafb5594 update system 2025-10-20 14:51:44 +02:00
5ad6324de6 update system 2025-10-10 15:38:40 +02:00
c1145e6319 update system 2025-09-30 09:48:38 +02:00
4a6c182385 update system 2025-09-19 13:58:58 +02:00
8198e46252 update system 2025-09-19 13:20:35 +02:00
6d296224ce update system 2025-09-15 10:40:21 +02:00
6145732891 update system 2025-09-02 10:17:05 +02:00
71384d0740 update 2025-08-22 19:01:41 +02:00
d3f752328f update system 2025-08-11 17:15:37 +02:00
5c9bf6838c feat: stuff 2025-08-09 17:41:55 +02:00
75e460293c feat: shark 2025-08-09 17:27:54 +02:00
c570ea0f54 update system 2025-08-08 10:54:39 +02:00
86f5331def feat: change aero layout 2025-07-30 11:35:10 +02:00
e220474055 remove opendyslexic font 2025-07-29 13:54:34 +02:00
7f5076755c aero fixes 2025-07-28 20:43:11 +02:00
e414e3ac7b update system 2025-07-28 20:33:33 +02:00
3fd867084a update system 2025-07-28 13:32:19 +02:00
abace8ec55 update system 2025-07-23 12:05:59 +02:00
af6f381e49 update system 2025-07-14 17:10:26 +02:00
876650cf2e change minecraft server 2025-07-14 16:52:14 +02:00
d570d170f0 feat: add usb sniffer 2025-07-04 19:16:50 +02:00
37b65c6b7f update monitors 2025-06-29 14:35:51 +02:00
8ba3365456 update aero monitor 2025-06-29 14:32:29 +02:00
56f3c3c5e9 update hyprland display stuff 2025-06-29 14:25:08 +02:00
86025dc787 add prism launcher 2025-06-29 11:52:53 +02:00
8cd05c1d8f update system 2025-06-29 11:09:39 +02:00
4103176fa4 use lix 2025-06-20 17:59:20 +02:00
d3de8874bc refactor: restructure 2025-06-20 17:11:43 +02:00
05b437dbf8 update system 2025-06-20 13:14:05 +02:00
62639b6002 feat: update system 2025-05-29 19:56:55 +02:00
48e66ab57a feat: aero 2025-05-29 19:28:00 +02:00
7bf49268f2 fix stuff 2025-05-07 19:25:40 +02:00
34a7ef00fd update system 2025-05-04 12:57:55 +02:00
df0600601b add stuff 2025-04-23 09:58:34 +02:00
6eb4b228ff feat: improve nvim 2025-04-08 12:16:13 +02:00
c020c969d0 update system 2025-04-02 11:56:26 +02:00
cf25eb2ad6 update system 2025-03-31 11:55:46 +02:00
8c83619275 update system 2025-03-26 10:34:55 +01:00
01a45e8bba update system 2025-02-24 21:39:23 +01:00
f899bd1cb5 update nvim 2025-02-24 21:28:41 +01:00
b01574822a update system 2025-02-18 12:48:16 +01:00
11ce7be6ff update system 2025-02-16 22:18:50 +01:00
69db03c140 improvements 2025-02-03 13:40:31 +01:00
84004b6391 feat: update system 2025-02-01 11:55:20 +01:00
998a7b9166 feat: fv43u brightness control 2025-01-17 22:42:34 +01:00
8a1ff0202f update stuff 2025-01-13 17:23:41 +01:00
dbd50e4a65 update system 2024-12-19 12:28:04 +01:00
4e6c0f1603 add bambu studio 2024-12-14 13:35:54 +01:00
1e7ffc3603 fixes 2024-11-23 14:38:14 +01:00
e70a66a907 update 2024-11-22 23:25:55 +01:00
4c0efbafa0 update 2024-11-01 17:47:47 +01:00
2ce5fb4d43 update 2024-11-01 15:59:32 +01:00
3ca6f9fa70 fix: pip padding 2024-10-06 19:18:33 +02:00
8efcf832a9 update system 2024-10-06 19:12:45 +02:00
78a04e80b5 update system 2024-08-28 00:05:51 +02:00
c6082902a4 update system 2024-08-18 15:20:52 +02:00
a060be6995 update system 2024-08-14 19:37:00 +02:00
ac1773445f switch to fv43u 2024-08-09 11:48:50 +02:00
023e20aeb8 update system 2024-07-28 13:02:19 +02:00
1ccda0daaa fix: system update 2024-07-24 22:20:22 +02:00
9b38825bfe update system 2024-07-22 20:10:13 +02:00
a6cd5def22 feat: update system 2024-07-10 13:18:19 +02:00
4b78ba79cc update system 2024-07-01 15:17:56 +02:00
8eec63e5f3 feat: stuff 2024-07-01 15:01:37 +02:00
eb85d22494 feat: update system 2024-06-24 19:50:16 +02:00
3d91c3221e feat: improvements 2024-06-12 16:03:33 +02:00
de983e8f6d feat: improve stuff 2024-06-12 15:30:56 +02:00
2f5f6de2cd feat: improve fonts 2024-06-11 00:44:25 +02:00
1cb7b57306 feat: font stuff 2024-06-11 00:27:08 +02:00
44ed425adb feat: improvements 2024-06-10 22:53:24 +02:00
041f8917d2 feat: improvements 2024-06-10 22:37:50 +02:00
d18b3d1683 fix: stuff 2024-06-10 19:08:43 +02:00
b801064f84 feat: language injections 2024-06-10 18:32:51 +02:00
552e85b6b6 feat: language injections 2024-06-10 18:30:00 +02:00
b24359b712 fix: nvim tree auto save 2024-06-10 18:09:01 +02:00
93e5f439f4 feat: nixvim refactor 2024-06-10 17:17:13 +02:00
0603bb1123 update system 2024-05-25 14:13:54 +02:00
d7ceb1e7be fix: neovide 2024-05-24 12:45:13 +02:00
1b330bddc1 fix: neovide, nvim 2024-05-24 12:32:41 +02:00
a43b7764d4 update system 2024-05-24 12:22:28 +02:00
f0d3715fb2 refactor: change system config 2024-05-24 11:59:43 +02:00
4a77b9acbd feat: update system 2024-05-10 13:39:47 +02:00
24ba16c842 feat: improvements 2024-05-04 13:36:04 +02:00
a1c4af6fd9 fix: syntax highlighting 2024-04-30 14:00:17 +02:00
9f4d27711d feat: improve monitor support 2024-04-30 10:18:08 +02:00
f8cf5b8ec8 use hm module for matugen 2024-04-30 00:01:38 +02:00
1328a8b94c feat: readme 2024-04-29 21:35:33 +02:00
b6856413b2 feat: add theme readme 2024-04-29 21:27:31 +02:00
aa46f5f083 feat: more stuff 2024-04-29 21:10:50 +02:00
1ca4663d76 feat: better theming 2024-04-29 21:09:34 +02:00
43ca38910c refactor: remove darkman 2024-04-29 20:34:10 +02:00
050b84ef6b feat: better theming 2024-04-29 17:10:35 +02:00
2a73833ca7 feat: improvements 2024-04-29 16:06:19 +02:00
667469c0ce feat: better theming 2024-04-29 16:00:54 +02:00
ced84cf07a feat: stuff 2024-04-29 14:44:39 +02:00
25b9f6cebf feat: better theme 2024-04-29 14:19:48 +02:00
3b5045660c update system 2024-04-26 20:26:34 +02:00
1945a993c5 feat: bar stuff 2024-04-26 20:15:11 +02:00
326de208d6 feat: more theming 2024-04-26 01:46:09 +02:00
b9cd147c0e feat: more cool theming 2024-04-25 22:18:18 +02:00
5c27567ca1 feat: more dynamic theming 2024-04-25 21:32:25 +02:00
28b30353d8 feat: sick theming 2024-04-25 01:18:54 +02:00
a79c2c2489 feat: matugen stuff 2024-04-24 20:46:49 +02:00
c5629f1aa0 feat: better xdg compliance 2024-04-24 16:24:15 +02:00
5196b2bab7 feat: cleanup 2024-04-24 16:05:34 +02:00
101b89f378 feat: test stuff 2024-04-24 11:23:26 +02:00
294 changed files with 14456 additions and 11628 deletions

2
.gitignore vendored
View File

@@ -1 +1,3 @@
result
deploy-luci.sh
deploy-luci-now.sh

View File

@@ -41,6 +41,15 @@ sudo nixos-rebuild switch --flake .#
## Cleaning your system
### Cachix is down
By default nix will just crash if cachix is down even if you don't have to fetch anything from it.
Use `--option build-use-substitutes false` to temporarily disable it.
```sh
sudo nixos-rebuild switch --option build-use-substitutes false --flake .#
```
### Find (accidental) folders holding your gc back
```sh

View File

@@ -0,0 +1 @@
sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPX+YdfBdTBT3wXyWkXt3k+kFYqXxSFMAHE85bOUxkJJAAAABHNzaDo= theaninova@MONSTER

654
flake.lock generated
View File

@@ -1,118 +1,22 @@
{
"nodes": {
"ags": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1713301451,
"narHash": "sha256-LzYVqEukjOJjm4HGFe6rtHBiuJxAyPqd2MY1k5ci9QU=",
"owner": "Aylur",
"repo": "ags",
"rev": "33bcaf34d5277031ecb97047fb8ddd44abd8d80e",
"type": "github"
},
"original": {
"owner": "Aylur",
"repo": "ags",
"type": "github"
}
},
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1713259062,
"narHash": "sha256-WTO84hUL8IlNuHDK2yOCeJ38EewFzGt5E0kzBjNWxa8=",
"owner": "Kirottu",
"repo": "anyrun",
"rev": "f9d30e34fa4ccb2797c6becec37e8bcff6585d39",
"type": "github"
},
"original": {
"owner": "Kirottu",
"repo": "anyrun",
"type": "github"
}
},
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1711099426,
"narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=",
"owner": "numtide",
"repo": "devshell",
"rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"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-compat_2": {
"dirt-samples-src": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"lastModified": 1698439458,
"narHash": "sha256-Mp8qBpsOvW9Zguv95Kv7EU6S3ICaF2aO02Wz6xGURtE=",
"owner": "tidalcycles",
"repo": "dirt-samples",
"rev": "9a6dff8f9ec3cd55b287290cf04e01afa6b8f532",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"owner": "tidalcycles",
"repo": "dirt-samples",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"anyrun",
"nixpkgs"
]
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@@ -120,11 +24,11 @@
]
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"lastModified": 1765835352,
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
"type": "github"
},
"original": {
@@ -133,64 +37,6 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"pre-commit-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": [
@@ -198,11 +44,11 @@
]
},
"locked": {
"lastModified": 1713294767,
"narHash": "sha256-LmaabaQZdx52MPGKPRt9Opoc9Gd9RbwvCdysUUYQoXI=",
"lastModified": 1767556355,
"narHash": "sha256-RDTUBDQBi9D4eD9iJQWtUDN/13MDLX+KmE+TwwNUp2s=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fa8c16e2452bf092ac76f09ee1fb1e9f7d0796e7",
"rev": "f894bc4ffde179d178d8deb374fcf9855d1a82b7",
"type": "github"
},
"original": {
@@ -211,208 +57,109 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712989663,
"narHash": "sha256-r2X/DIAyKOLiHoncjcxUk1TENWDTTaigRBaY53Cts/w=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "40ab43ae98cb3e6f07eaeaa3f3ed56d589da21b0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1713214463,
"narHash": "sha256-zAOOjqHAbccCRgJSuvTCA0FNLqKswN63LgVo43R7pxw=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "0a53b9957f0b17f1a0036b25198f569969ad43a0",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"nixpkgs": "nixpkgs_2",
"systems": "systems",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1713296181,
"narHash": "sha256-c2hUYlSi7QOful5lIEWVRl1dborfctAvWY9CwoTLxXI=",
"owner": "hyprwm",
"repo": "hyprland",
"rev": "e8e02e81e84bb04efa0c926361ec80c60744f665",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1691753796,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1713121246,
"narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"matugen": {
"inputs": {
"nixpkgs": "nixpkgs_3"
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1711657889,
"narHash": "sha256-4VX7Rt+ftEH8nwg59eT7TsvHYUf8/euUmwh/JLc4rLc=",
"lastModified": 1731508795,
"narHash": "sha256-+UibbVz5CTisKMms/5VXGe39FYr56qzaEtX4TWQPkjk=",
"owner": "InioX",
"repo": "matugen",
"rev": "566277529dadc2b149a8bd8b9859ea791ecdef26",
"rev": "cb9f81eb0150f6253895ea0adb1daa8534c15fc7",
"type": "github"
},
"original": {
"owner": "InioX",
"ref": "v2.4.1",
"repo": "matugen",
"type": "github"
}
},
"nix-darwin": {
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
],
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1711763326,
"narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083",
"lastModified": 1767544157,
"narHash": "sha256-DVTMOUd4uHkDcZXWAqOS+Pa0M9a27G1Ya3B7SFG6BQs=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "d0e2c4bebf9d0b879410736f7abce628976bfb92",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1756556321,
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.08",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1767530622,
"narHash": "sha256-ywnL1cc0A6fni7m859ImiBYA8DlXXJ+5OXIlcBqJ2B0=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "54c2e2ab476629d17fdba861895f58e7cdac32ab",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1739444422,
"narHash": "sha256-iAVVHi7X3kWORftY+LVbRiStRnQEob2TULWyjMS6dWg=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "5e54c3ca05a7c7d968ae1ddeabe01d2a9bc1e177",
"type": "github"
},
"original": {
"owner": "gmodena",
"ref": "latest",
"repo": "nix-flatpak",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1708475490,
"narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0e74ca98a74bc7270d28838369593635a5db3260",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1712963716,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1691186842,
"narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=",
"lastModified": 1767379071,
"narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "18036c0be90f4e308ae3ebcab0e14aae0336fe42",
"rev": "fb7944c166a3b630f177938e478f0378e64ce108",
"type": "github"
},
"original": {
@@ -422,40 +169,36 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs-stable": {
"locked": {
"lastModified": 1713248628,
"narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=",
"lastModified": 1767480499,
"narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8",
"rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks"
"systems": "systems_2"
},
"locked": {
"lastModified": 1713294906,
"narHash": "sha256-xJJZdCBzVFpVppaYyUK4lTTNOnbAxrjhodoJL3Oi91E=",
"lastModified": 1767553127,
"narHash": "sha256-H6JzPMmvBYlGjIBgrHIS2dFXh05h4bwMJTZTn3IGVtc=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "514a51877df9fe41ffc38c5237e3c4e5327e7607",
"rev": "3d7bcda3d163c1c38e231f81e0e90155b7b9e9bf",
"type": "github"
},
"original": {
@@ -464,59 +207,31 @@
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1713341079,
"narHash": "sha256-DcLm3kt047X7ys563bWaIj08qakVEA27WECR/F/Zz/k=",
"owner": "nix-community",
"repo": "NUR",
"rev": "6bb5fc99b448bb7d2dd9bd3e9fc94facba074592",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712897695,
"narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"ags": "ags",
"anyrun": "anyrun",
"home-manager": "home-manager",
"hyprland": "hyprland",
"matugen": "matugen",
"nixpkgs": "nixpkgs_4",
"niri": "niri",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"nur": "nur"
"tidalcycles": "tidalcycles"
}
},
"superdirt-src": {
"flake": false,
"locked": {
"lastModified": 1697377840,
"narHash": "sha256-9qU9CHYAXbN1IE3xXDqGipuroifVaSVXj3c/cDfwM80=",
"owner": "musikinformatik",
"repo": "superdirt",
"rev": "c7f32998572984705d340e7c1b9ed9ad998a39b6",
"type": "github"
},
"original": {
"owner": "musikinformatik",
"repo": "superdirt",
"type": "github"
}
},
"systems": {
@@ -549,68 +264,111 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wlroots": {
"tidal-src": {
"flake": false,
"locked": {
"lastModified": 1713124002,
"narHash": "sha256-vPeZCY+sdiGsz4fl3AVVujfyZyQBz6+vZdkUE4hQ+HI=",
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "611a4f24cd2384378f6e500253983107c6656c64",
"lastModified": 1712519522,
"narHash": "sha256-LbvxQmVxHElidCgvt+w0g1k+QQbNLebK46vtRCgsLeQ=",
"owner": "tidalcycles",
"repo": "tidal",
"rev": "88f09edf6bef2228d5f530dea872b08a9d803066",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "611a4f24cd2384378f6e500253983107c6656c64",
"owner": "tidalcycles",
"ref": "v1.9.5",
"repo": "tidal",
"type": "github"
}
},
"xdph": {
"tidalcycles": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"dirt-samples-src": "dirt-samples-src",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
"superdirt-src": "superdirt-src",
"tidal-src": "tidal-src",
"vim-tidal-src": "vim-tidal-src",
"vowel-src": "vowel-src"
},
"locked": {
"lastModified": 1713214484,
"narHash": "sha256-h1bSIsDuPk1FGgvTuSHJyiU2Glu7oAyoPMJutKZmLQ8=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "bb44921534a9cee9635304fdb876c1b3ec3a8f61",
"lastModified": 1730626669,
"narHash": "sha256-nFyZrvTPn9OM9UZmuAwy3e1Ba0ZuYc2FaDCOOhGtqg4=",
"owner": "mitchmindtree",
"repo": "tidalcycles.nix",
"rev": "0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"owner": "mitchmindtree",
"ref": "0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4",
"repo": "tidalcycles.nix",
"type": "github"
}
},
"vim-tidal-src": {
"flake": false,
"locked": {
"lastModified": 1685703852,
"narHash": "sha256-8gyk17YLeKpLpz3LRtxiwbpsIbZka9bb63nK5/9IUoA=",
"owner": "tidalcycles",
"repo": "vim-tidal",
"rev": "e440fe5bdfe07f805e21e6872099685d38e8b761",
"type": "github"
},
"original": {
"owner": "tidalcycles",
"repo": "vim-tidal",
"type": "github"
}
},
"vowel-src": {
"flake": false,
"locked": {
"lastModified": 1641306144,
"narHash": "sha256-zfF6cvAGDNYWYsE8dOIo38b+dIymd17Pexg0HiPFbxM=",
"owner": "supercollider-quarks",
"repo": "vowel",
"rev": "ab59caa870201ecf2604b3efdd2196e21a8b5446",
"type": "github"
},
"original": {
"owner": "supercollider-quarks",
"repo": "vowel",
"type": "github"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1755491097,
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"ref": "v0.7",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1766429945,
"narHash": "sha256-9Kv4gWagx/u4RfZJzBMAoagW9ava5waxd+XoTkzqF7E=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "0dde7ca1d3a8e8c5082533d76084e2aa02bef70e",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}

173
flake.nix
View File

@@ -1,90 +1,156 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
matugen.url = "github:InioX/matugen";
ags.url = "github:Aylur/ags";
matugen = {
url = "github:InioX/matugen?ref=v2.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:Kirottu/anyrun";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
tidalcycles = {
url = "github:mitchmindtree/tidalcycles.nix/?ref=0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/hyprland";
};
outputs =
{
nixpkgs,
nur,
home-manager,
ags,
nixvim,
anyrun,
hyprland,
matugen,
nix-flatpak,
niri,
tidalcycles,
...
}@inputs:
let
inherit (nixpkgs.lib) genAttrs listToAttrs;
inherit (nixpkgs.lib) genAttrs;
eachSystem = genAttrs [ "x86_64-linux" ];
legacyPackages = eachSystem (
system:
import nixpkgs {
inherit system;
config = {
allowUnfree = true;
allowUnsupportedSystem = true;
experimental-features = "nix-command flakes";
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
overlays = [
nur.overlay
(final: prev: {
anyrunPlugins = anyrun.packages.${prev.system};
ags = ags.packages.${prev.system}.default;
matugen = matugen.packages.${prev.system}.default;
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
lpc21isp = prev.callPackage ./overlays/lpc21isp { };
darkman = prev.callPackage ./overlays/darkman { };
cura = prev.callPackage ./overlays/cura { };
asztal = prev.callPackage ./overlays/asztal { };
})
];
}
);
legacyPackages =
config:
(eachSystem (
system:
import nixpkgs {
inherit system;
config = config // {
allowUnfree = true;
allowUnsupportedSystem = true;
experimental-features = "nix-command flakes";
};
overlays = [
niri.overlays.niri
(final: prev: {
cubyz-bin = prev.callPackage ./overlays/cubyz-bin { };
matugen = matugen.packages.${prev.system}.default;
gccdiag = prev.callPackage ./overlays/gccdiag { };
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
lpc21isp = prev.callPackage ./overlays/lpc21isp { };
rquickshare = prev.callPackage ./overlays/rquickshare { };
rastertokpsl-re = prev.callPackage ./overlays/rastertokpsl-re { };
usb-sniffer = prev.callPackage ./overlays/usb-sniffer { };
gamma-launcher = prev.callPackage ./overlays/gamma-launcher { };
vimPlugins = prev.vimPlugins // {
strudel-nvim = prev.callPackage ./overlays/strudel-nvim { };
vim-tidal = tidalcycles.packages.${prev.system}.vim-tidal;
};
wireshark = prev.wireshark.overrideAttrs (
finalAttrs: prevAttrs: {
postInstall = prevAttrs.postInstall + ''
ln -s ${final.usb-sniffer}/bin/usb_sniffer $out/lib/wireshark/extcap/usb_sniffer
'';
}
);
plymouth = prev.plymouth.overrideAttrs (
final: prev: {
patches = prev.patches ++ [ ./overlays/plymouth/drm-close-fb.patch ];
}
);
})
];
}
));
mkHost =
{
hostname,
username,
system,
config ? { },
}:
nixpkgs.lib.nixosSystem {
pkgs = legacyPackages.${system};
nixpkgs.lib.nixosSystem rec {
pkgs = (legacyPackages config).${system};
modules = [
./modules/nixos
./hosts/${hostname}
home-manager.nixosModules.home-manager
niri.nixosModules.niri
nix-flatpak.nixosModules.nix-flatpak
{
_module.args = {
inherit username;
_module.args =
let
patchDesktop =
pkg: appName: from: to:
pkgs.lib.hiPrio (
pkgs.runCommand "$patched-desktop-entry-for-${appName}" { } ''
${pkgs.coreutils}/bin/mkdir -p $out/share/applications
${pkgs.gnused}/bin/sed 's#${from}#${to}#g' < ${pkg}/share/applications/${appName}.desktop > $out/share/applications/${appName}.desktop
''
);
GPUOffloadApp = pkg: desktopName: patchDesktop pkg desktopName "^Exec=" "Exec=nvidia-offload ";
gpu-offload =
config: pkg: desktopName:
if config.hardware.nvidia.prime.offload.enable then GPUOffloadApp pkg desktopName else pkg;
in
{
inherit username hostname gpu-offload;
};
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings = {
auto-optimise-store = true;
experimental-features = [
"nix-command"
"flakes"
];
};
gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--deleteOlderThan 10d";
};
};
networking.hostName = hostname;
services.flatpak.enable = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit username inputs;
inherit username hostname inputs;
};
sharedModules = [
./overlays/matugen/hm-module.nix
nix-flatpak.homeManagerModules.nix-flatpak
nixvim.homeModules.nixvim
./modules/home-manager/modules/nixvim
];
users.${username} = {
nix.gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--deleteOlderThan 10d";
};
imports = [
./modules/home-manager
./hosts/${hostname}/home.nix
@@ -97,10 +163,23 @@
};
in
{
nixosConfigurations.MONSTER = mkHost {
hostname = "MONSTER";
username = "theaninova";
system = "x86_64-linux";
nixosConfigurations = {
MONSTER = mkHost {
hostname = "MONSTER";
username = "theaninova";
system = "x86_64-linux";
config.rocmSupport = true;
};
aero = mkHost {
hostname = "aero";
username = "theaninova";
system = "x86_64-linux";
};
shark = mkHost {
hostname = "shark";
username = "luci";
system = "x86_64-linux";
};
};
nixosModules.theaninovos = import ./modules/nixos;

View File

@@ -2,64 +2,89 @@
{
imports = [ ./hardware-configuration.nix ];
nix = {
package = pkgs.nixVersions.unstable;
settings.experimental-features = [
"nix-command"
"flakes"
];
gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--deleteOlderThan 10d";
};
};
# I'm not happy about this but if I try to get ESP IDF working
# on nix for any longer I'm gonna lose my sanity
programs.nix-ld.enable = true;
# Bootloader.
boot = {
loader.timeout = 0;
quiet.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_xanmod_stable;
kernelModules = [ "sg" ];
loader = {
systemd-boot = {
enable = true;
editor = false;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
supportedFilesystems = [ "ntfs" ];
};
xdg.forced-compliance.enable = true;
usecases = {
gaming.enable = true;
"3d-printing".enable = true;
development = {
enable = true;
angular.enable = true;
android.enable = true;
svelte.enable = true;
docker.enable = true;
};
windows-vm.enable = true;
};
desktops = {
hyprland.enable = true;
# gamescope.enable = true;
shell.components = {
firefox-pip.enable = true;
grimblast.enable = true;
gnome-keyring.enable = true;
hyprpicker.enable = true;
kde-connect.enable = true;
kitty.enable = true;
swaync.enable = true;
walker.enable = true;
waybar.enable = true;
};
desktops.hyprland = {
enable = true;
scrolling = true;
};
locale.preset.theaninova.enable = true;
networking.hosts = {
"127.0.0.1:57461" = [ "ai.local" ];
};
services = {
ollama.enable = false;
open-webui = {
enable = false;
port = 57461;
environment = {
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
WEBUI_AUTH = "False";
};
};
xserver.xkb.variant = "altgr-intl";
xserver.xkb.layout = "us";
airprint.enable = true;
udev.packages = with pkgs; [
usb-sniffer
];
};
hardware = {
amdgpu.preset.default.enable = true;
audio.preset.pipewire.enable = true;
cc1.enable = true;
fv43u.enable = true;
virtual-camera.enable = true;
hid-fanatecff.enable = true;
astro-a50.enable = true;
# virtual-camera.enable = true;
# hid-fanatecff.enable = true;
enableAllFirmware = true;
bluetooth = {
@@ -68,6 +93,33 @@
};
};
virtualisation.oci-containers.containers = {
/*
statech = {
image = "eclipse-temurin:21-jre";
volumes = [ "/home/theaninova/.config/statech:/statech" ];
environment = { };
ports = [ "25565:25565" ];
workdir = "/statech";
entrypoint = "/bin/bash";
cmd = [ "start.sh" ];
extraOptions = [ "--network=host" ];
};
*/
/*
craftoria = {
image = "eclipse-temurin:21-jre";
volumes = [ "/home/theaninova/.config/craftoria:/craftoria" ];
environment = { };
ports = [ "25565:25565" ];
workdir = "/craftoria";
entrypoint = "/bin/bash";
cmd = [ "startserver.sh" ];
extraOptions = [ "--network=host" ];
};
*/
};
fonts = {
fira-code = {
enable = true;
@@ -77,14 +129,18 @@
enable = true;
default = true;
};
nerdfonts.enable = true;
nerd-fonts.enable = true;
};
services.airprint.enable = true;
programs = {
zsh.enable = true;
wireshark = {
enable = false;
package = pkgs.wireshark;
usbmon.enable = true;
};
};
services.udev.packages = with pkgs; [ android-udev-rules ];
programs.zsh.enable = true;
security.sudo.configFile = ''
Defaults env_reset,pwfeedback,passprompt="󰟵 "
'';
@@ -92,20 +148,28 @@
users.users.${username} = {
isNormalUser = true;
extraGroups = [
"wireshark"
"scanner"
"lp"
"storage"
"networkmanager"
"audio"
"video"
"plugdev"
"adbusers"
"cdrom"
"kvm"
];
};
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
# Essential utils
nix-output-monitor
alacritty
usbutils
usbimager
uhubctl
usb-sniffer
pciutils
htop
unar
@@ -115,6 +179,8 @@
graphicsmagick
ffmpeg
nfs-utils
opensc
openssl
# Essential command line apps
neovim
mc
@@ -126,36 +192,26 @@
];
networking = {
firewall.allowedUDPPorts = [ 50765 ];
firewall = {
allowedTCPPorts = [ 25565 ];
allowedUDPPorts = [
25565
50765
];
/*
allowedUDPPortRanges = [
{
from = 1;
to = 65535;
}
];
*/
};
networkmanager = {
enable = true;
plugins = with pkgs; [ networkmanager-openconnect ];
};
hosts = {
"192.168.0.219" = [ "kookaborrow" ];
"192.168.0.1" = [ "router" ];
};
};
fileSystems."/mnt/media" = {
device = "kookaborrow:/media";
fsType = "nfs";
options = [
"x-systemd-automount"
"noauto"
];
};
fileSystems."/run/media/theaninova/heart-drive" = {
device = "/dev/sdb2";
fsType = "ntfs";
};
fileSystems."/run/media/theaninova/windows" = {
device = "/dev/sda2";
fsType = "ntfs";
};
system.stateVersion = "24.05";

View File

@@ -33,6 +33,10 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6EC6-F0EF";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ { device = "/dev/disk/by-uuid/b09fbba2-c97a-41bc-a3cd-8204e30204f8"; } ];

View File

@@ -1 +1,52 @@
{ ... }: { }
{ pkgs, ... }:
{
theme.md3-evo = {
enable = true;
auto-dark = {
enable = true;
lat = 52.52;
lon = 13.40;
};
};
programs.zoxide.enable = true;
home.packages = with pkgs; [
hyperhdr
/*
(hyperion-ng.overrideAttrs (
final: prev: rec {
version = "2.1.1";
src = fetchFromGitHub {
owner = "hyperion-project";
repo = prev.pname;
rev = version;
hash = "sha256-lKLXgOrXp8DLmlpQe/33A30l4K9VX8P0q2LUA+lLYws=";
# needed for `dependencies/external/`:
# * rpi_ws281x` - not possible to use as a "system" lib
# * qmdnsengine - not in nixpkgs yet
fetchSubmodules = true;
};
buildInputs = prev.buildInputs ++ [
pkgs.libsForQt5.qtwebsockets
pkgs.libftdi1
];
nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.git ];
cmakeFlags = prev.cmakeFlags ++ [
"-DUSE_SYSTEM_LIBFTDI_LIBS=ON"
];
}
))
*/
];
wayland.windowManager.hyprland.settings.device =
let
targetDPI = 1200;
actualDPI = 3200;
in
[
{
name = "endgame-gear-endgame-gear-op1-8k-v2-gaming-mouse";
sensitivity = builtins.toString (((targetDPI + 0.0) / actualDPI) - 1);
accel_profile = "flat";
}
];
}

179
hosts/aero/default.nix Normal file
View File

@@ -0,0 +1,179 @@
{
pkgs,
lib,
username,
...
}:
{
imports = [ ./hardware-configuration.nix ];
boot = {
quiet.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = [ "tpm_tis" ];
systemd = {
enable = true;
tpm2.enable = true;
};
luks.devices."luks-52ef6970-af53-43e6-8b2f-0ff95dad2d23".device =
"/dev/disk/by-uuid/52ef6970-af53-43e6-8b2f-0ff95dad2d23";
};
};
xdg.forced-compliance.enable = true;
usecases = {
gaming.enable = true;
"3d-printing".enable = true;
development = {
enable = true;
svelte.enable = true;
};
};
shell.components = {
firefox-pip.enable = true;
gnome-keyring.enable = true;
grimblast.enable = true;
hyprpicker.enable = true;
kde-connect.enable = true;
kitty.enable = true;
swaync.enable = true;
walker.enable = true;
waybar = {
enable = true;
mobile = true;
};
};
desktops = {
hyprland.enable = true;
};
locale.preset.theaninova.enable = true;
services.xserver = {
xkb = {
#variant = "altgr-intl";
#layout = "us";
layout = "de";
};
videoDrivers = [ "nvidia" ];
};
hardware = {
audio.preset.pipewire.enable = true;
cc1.enable = true;
nvidia = {
preset.proprietary.enable = true;
prime = {
reverseSync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
enableAllFirmware = true;
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
fonts = {
fira-code = {
enable = true;
default = true;
};
noto-sans = {
enable = true;
default = true;
};
nerd-fonts.enable = true;
};
services.airprint.enable = true;
programs.zsh.enable = true;
security.sudo.configFile = ''
Defaults env_reset,pwfeedback,passprompt="󰟵 "
'';
security.tpm2.enable = true;
users.defaultUserShell = pkgs.zsh;
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ../../admins/theaninova.id_ed25519_sk.pub)
];
users.users.${username} = {
isNormalUser = true;
extraGroups = [
"scanner"
"lp"
"storage"
"networkmanager"
"audio"
"video"
"plugdev"
"cdrom"
"kvm"
];
};
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
# Essential utils
usbutils
usbimager
uhubctl
bluetuith
pciutils
htop
unar
gnupg
libdrm
alsa-utils
graphicsmagick
ffmpeg
nfs-utils
opensc
openssl
# secure boot / tmp2
sbctl
tpm2-tss
# Essential command line apps
neovim
mc
git
p7zip
fzf
eza
];
networking = {
firewall.allowedUDPPorts = [ 50765 ];
networkmanager = {
enable = true;
plugins = with pkgs; [ networkmanager-openconnect ];
};
};
system.stateVersion = "24.11";
}

View File

@@ -0,0 +1,43 @@
# 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 = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/506db548-b5c2-400e-97b1-80bdae8064cf";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-c1e282d7-eae2-4795-b813-558f3124de2f".device = "/dev/disk/by-uuid/c1e282d7-eae2-4795-b813-558f3124de2f";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/17E0-415A";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/8ddc2620-3dd8-4a7b-83b9-00afac84428f"; }
];
# 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.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

54
hosts/aero/home.nix Executable file
View File

@@ -0,0 +1,54 @@
{ pkgs, ... }:
{
theme.md3-evo = {
enable = true;
auto-dark = {
enable = true;
lat = 52.52;
lon = 13.40;
};
};
programs.zoxide.enable = true;
home = {
packages = with pkgs; [
blueman
kdePackages.okular
];
};
wayland.windowManager.hyprland.settings = {
general.layout = "master";
master = {
orientation = "right";
mfact = 0.65;
always_keep_position = true;
};
monitor = [
"eDP-1,3840x2160@60,0x0,2"
"HDMI-A-4,2560x1440@75,1920x-768,1"
];
};
systemd.user.services = {
nm-applet = {
Unit = {
Description = "Network manager applet";
After = [ "graphical-session.target" ];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet";
Restart = "always";
};
};
blueman-applet = {
Unit = {
Description = "Bluetooth manager applet";
After = [ "graphical-session.target" ];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${pkgs.blueman}/bin/blueman-applet";
Restart = "always";
};
};
};
}

200
hosts/shark/default.nix Normal file
View File

@@ -0,0 +1,200 @@
{
pkgs,
lib,
username,
...
}:
{
imports = [ ./hardware-configuration.nix ];
boot = {
loader.timeout = 0;
quiet.enable = true;
kernelParams = [ "module_blacklist=i915" ];
kernelPackages = pkgs.linuxPackages_xanmod_stable;
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = [ "tpm_tis" ];
systemd = {
enable = true;
tpm2.enable = true;
};
};
};
xdg.forced-compliance.enable = true;
usecases = {
gaming.enable = true;
"3d-printing".enable = true;
development.enable = true;
windows-vm.enable = true;
};
shell.components = {
firefox-pip.enable = true;
gnome-keyring.enable = true;
grimblast.enable = true;
hyprpicker.enable = true;
kde-connect.enable = true;
kitty.enable = true;
swaync.enable = true;
walker.enable = true;
waybar = {
enable = true;
mobile = true;
};
};
desktops = {
hyprland.enable = true;
};
locale.preset.theaninova.enable = true;
services.xserver = {
xkb = {
#variant = "altgr-intl";
#layout = "us";
layout = "de";
};
videoDrivers = [ "nvidia" ];
};
services.airprint.enable = true;
hardware = {
q3279vwf.enable = true;
audio.preset.pipewire.enable = true;
cc1.enable = true;
nvidia.preset.proprietary.enable = true;
enableAllFirmware = true;
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
fonts = {
fira-code = {
enable = true;
default = true;
};
noto-sans = {
enable = true;
default = true;
};
nerd-fonts.enable = true;
};
programs.zsh.enable = true;
security.sudo.configFile = ''
Defaults env_reset,pwfeedback,passprompt="󰟵 "
'';
security.tpm2.enable = true;
users.defaultUserShell = pkgs.zsh;
networking.hosts = {
"127.0.0.1:57461" = [ "ai.local" ];
};
services.ollama = {
enable = false;
package = pkgs.ollama.override {
config.cudaSupport = true;
config.rocmSupport = false;
};
};
services.open-webui = {
enable = false;
port = 57461;
environment = {
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
WEBUI_AUTH = "False";
};
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ../../admins/theaninova.id_ed25519_sk.pub)
];
users.users.${username} = {
isNormalUser = true;
extraGroups = [
"scanner"
"lp"
"storage"
"networkmanager"
"audio"
"video"
"plugdev"
"cdrom"
"kvm"
];
};
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
# Essential utils
usbutils
usbimager
uhubctl
bluetuith
pciutils
htop
unar
gnupg
libdrm
alsa-utils
graphicsmagick
ffmpeg
nfs-utils
opensc
openssl
# secure boot / tmp2
sbctl
tpm2-tss
# Essential command line apps
neovim
mc
git
p7zip
fzf
eza
];
networking = {
firewall = {
allowedUDPPortRanges = [
{
from = 1;
to = 65535;
}
];
};
networkmanager = {
enable = true;
plugins = with pkgs; [ networkmanager-openconnect ];
};
};
system.stateVersion = "24.11";
}

View File

@@ -0,0 +1,44 @@
# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9e1f4bb4-356b-4674-ba16-0d3f436cd882";
fsType = "xfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6585-4C3B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
/*fileSystems."/home2" =
{ device = "/dev/disk/by-uuid/fa017457-fef3-4fac-9348-d37d2cd98656";
fsType = "xfs";
};*/
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.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

35
hosts/shark/home.nix Executable file
View File

@@ -0,0 +1,35 @@
{ pkgs, ... }:
{
theme.md3-evo = {
enable = true;
auto-dark = {
enable = true;
lat = 52.52;
lon = 13.40;
};
};
programs.zoxide.enable = true;
home = {
packages = with pkgs; [
blueman
kdePackages.okular
bitbox
gamma-launcher
];
};
wayland.windowManager.hyprland.settings.input.kb_options = [ "lv3:caps_switch" ];
services.nextcloud-client.enable = true;
systemd.user.services = {
blueman-applet = {
Unit = {
Description = "Bluetooth manager applet";
After = [ "graphical-session.target" ];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${pkgs.blueman}/bin/blueman-applet";
Restart = "always";
};
};
};
}

View File

@@ -1,29 +0,0 @@
{ config, ... }:
{
xdg.enable = true;
xdg.userDirs.enable = true;
home.sessionVariables = {
HISTFILE = "${config.xdg.stateHome}/bash/history";
NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/config";
NPM_CONFIG_CACHE = "${config.xdg.cacheHome}/npm";
NPM_CONFIG_TMP = "${config.xdg.stateHome}/npm";
WINEPREFIX = "${config.xdg.configHome}/wineprefixes/default";
_JAVA_OPTGRADLE_USER_HOMEIONS = ''-Djava.util.prefs.userRoot="${config.xdg.configHome}"/java'';
GRADLE_USER_HOME = "${config.xdg.configHome}/gradle";
DVDCSS_CACHE = "${config.xdg.cacheHome}/dvdcss";
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
PYTHON_HISTORY = "${config.xdg.stateHome}/python/history";
PYTHONCACHEPREFIX = "${config.xdg.cacheHome}/python";
PYTHONUSERBASE = "${config.xdg.dataHome}/python";
WGETRC = "${config.xdg.configHome}/wgetrc";
XCOMPOSEFILE = "${config.xdg.configHome}/X11/xcompose";
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose";
};
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
programs.gpg.homedir = "${config.xdg.configHome}/gnupg";
programs.zsh.dotDir = ".config/zsh";
programs.zsh.history.path = "${config.xdg.stateHome}/zsh/history";
xdg.configFile.wgetrc.text = ''
hsts-file="${config.xdg.cacheHome}/wget-hsts"
'';
}

View File

@@ -1,677 +0,0 @@
{ config, ... }: {
xdg.mimeApps = {
enable = true;
defaultApplications = {
.3dm x-world/x-3dmf
.3dmf x-world/x-3dmf
.7z application/x-7z-compressed
.a application/octet-stream
.aab application/x-authorware-bin
.aam application/x-authorware-map
.aas application/x-authorware-seg
.abc text/vnd.abc
.acgi text/html
.afl video/animaflex
.ai application/postscript
.aif audio/aiff
.aif audio/x-aiff
.aifc audio/aiff
.aifc audio/x-aiff
.aiff audio/aiff
.aiff audio/x-aiff
.aim application/x-aim
.aip text/x-audiosoft-intra
.ani application/x-navi-animation
.aos application/x-nokia-9000-communicator-add-on-software
.aps application/mime
.arc application/octet-stream
.arj application/arj
.arj application/octet-stream
.art image/x-jg
.asf video/x-ms-asf
.asm text/x-asm
.asp text/asp
.asx application/x-mplayer2
.asx video/x-ms-asf
.asx video/x-ms-asf-plugin
.au audio/basic
.au audio/x-au
.avi application/x-troff-msvideo
.avi video/avi
.avi video/msvideo
.avi video/x-msvideo
.avs video/avs-video
.bcpio application/x-bcpio
.bin application/mac-binary
.bin application/macbinary
.bin application/octet-stream
.bin application/x-binary
.bin application/x-macbinary
.bm image/bmp
.bmp image/bmp
.bmp image/x-windows-bmp
.boo application/book
.book application/book
.boz application/x-bzip2
.bsh application/x-bsh
.bz application/x-bzip
.bz2 application/x-bzip2
.c text/plain
.c text/x-c
.c++ text/plain
.cat application/vnd.ms-pki.seccat
.cc text/plain
.cc text/x-c
.ccad application/clariscad
.cco application/x-cocoa
.cdf application/cdf
.cdf application/x-cdf
.cdf application/x-netcdf
.cer application/pkix-cert
.cer application/x-x509-ca-cert
.cha application/x-chat
.chat application/x-chat
.class application/java
.class application/java-byte-code
.class application/x-java-class
.com application/octet-stream
.com text/plain
.conf text/plain
.cpio application/x-cpio
.cpp text/x-c
.cpt application/mac-compactpro
.cpt application/x-compactpro
.cpt application/x-cpt
.crl application/pkcs-crl
.crl application/pkix-crl
.crt application/pkix-cert
.crt application/x-x509-ca-cert
.crt application/x-x509-user-cert
.csh application/x-csh
.csh text/x-script.csh
.css application/x-pointplus
.css text/css
.csv text/csv
.cxx text/plain
.dcr application/x-director
.deepv application/x-deepv
.def text/plain
.der application/x-x509-ca-cert
.dif video/x-dv
.dir application/x-director
.dl video/dl
.dl video/x-dl
.doc application/msword
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dot application/msword
.dp application/commonground
.drw application/drafting
.dump application/octet-stream
.dv video/x-dv
.dvi application/x-dvi
.dwf drawing/x-dwf (old)
.dwf model/vnd.dwf
.dwg application/acad
.dwg image/vnd.dwg
.dwg image/x-dwg
.dxf application/dxf
.dxf image/vnd.dwg
.dxf image/x-dwg
.dxr application/x-director
.el text/x-script.elisp
.elc application/x-bytecode.elisp (compiled elisp)
.elc application/x-elc
.env application/x-envoy
.eot application/vnd.ms-fontobject
.eps application/postscript
.es application/x-esrehber
.etx text/x-setext
.evy application/envoy
.evy application/x-envoy
.exe application/octet-stream
.f text/plain
.f text/x-fortran
.f77 text/x-fortran
.f90 text/plain
.f90 text/x-fortran
.fdf application/vnd.fdf
.fif application/fractals
.fif image/fif
.flac audio/flac
.fli video/fli
.fli video/x-fli
.flo image/florian
.flx text/vnd.fmi.flexstor
.fmf video/x-atomic3d-feature
.for text/plain
.for text/x-fortran
.fpx image/vnd.fpx
.fpx image/vnd.net-fpx
.frl application/freeloader
.funk audio/make
.g text/plain
.g3 image/g3fax
.gif image/gif
.gl video/gl
.gl video/x-gl
.gsd audio/x-gsm
.gsm audio/x-gsm
.gsp application/x-gsp
.gss application/x-gss
.gtar application/x-gtar
.gz application/x-compressed
.gz application/x-gzip
.gzip application/x-gzip
.gzip multipart/x-gzip
.h text/plain
.h text/x-h
.hdf application/x-hdf
.help application/x-helpfile
.hgl application/vnd.hp-hpgl
.hh text/plain
.hh text/x-h
.hlb text/x-script
.hlp application/hlp
.hlp application/x-helpfile
.hlp application/x-winhelp
.hpg application/vnd.hp-hpgl
.hpgl application/vnd.hp-hpgl
.hqx application/binhex
.hqx application/binhex4
.hqx application/mac-binhex
.hqx application/mac-binhex40
.hqx application/x-binhex40
.hqx application/x-mac-binhex40
.hta application/hta
.htc text/x-component
.htm text/html
.html text/html
.htmls text/html
.htt text/webviewhtml
.htx text/html
.ice x-conference/x-cooltalk
.ico image/x-icon
.ics text/calendar
.idc text/plain
.ief image/ief
.iefs image/ief
.iges application/iges
.iges model/iges
.igs application/iges
.igs model/iges
.ima application/x-ima
.imap application/x-httpd-imap
.inf application/inf
.ins application/x-internett-signup
.ip application/x-ip2
.isu video/x-isvideo
.it audio/it
.iv application/x-inventor
.ivr i-world/i-vrml
.ivy application/x-livescreen
.jam audio/x-jam
.jav text/plain
.jav text/x-java-source
.java text/plain
.java text/x-java-source
.jcm application/x-java-commerce
.jfif image/jpeg
.jfif image/pjpeg
.jfif-tbnl image/jpeg
.jpe image/jpeg
.jpe image/pjpeg
.jpeg image/jpeg
.jpeg image/pjpeg
.jpg image/jpeg
.jpg image/pjpeg
.jps image/x-jps
.js application/x-javascript
.js application/javascript
.js application/ecmascript
.js text/javascript
.js text/ecmascript
.json application/json
.jut image/jutvision
.kar audio/midi
.kar music/x-karaoke
.ksh application/x-ksh
.ksh text/x-script.ksh
.la audio/nspaudio
.la audio/x-nspaudio
.lam audio/x-liveaudio
.latex application/x-latex
.lha application/lha
.lha application/octet-stream
.lha application/x-lha
.lhx application/octet-stream
.list text/plain
.lma audio/nspaudio
.lma audio/x-nspaudio
.log text/plain
.lsp application/x-lisp
.lsp text/x-script.lisp
.lst text/plain
.lsx text/x-la-asf
.ltx application/x-latex
.lzh application/octet-stream
.lzh application/x-lzh
.lzx application/lzx
.lzx application/octet-stream
.lzx application/x-lzx
.m text/plain
.m text/x-m
.m1v video/mpeg
.m2a audio/mpeg
.m2v video/mpeg
.m3u audio/x-mpequrl
.man application/x-troff-man
.map application/x-navimap
.mar text/plain
.mbd application/mbedlet
.mc$ application/x-magic-cap-package-1.0
.mcd application/mcad
.mcd application/x-mathcad
.mcf image/vasa
.mcf text/mcf
.mcp application/netmc
.me application/x-troff-me
.mht message/rfc822
.mhtml message/rfc822
.mid application/x-midi
.mid audio/midi
.mid audio/x-mid
.mid audio/x-midi
.mid music/crescendo
.mid x-music/x-midi
.midi application/x-midi
.midi audio/midi
.midi audio/x-mid
.midi audio/x-midi
.midi music/crescendo
.midi x-music/x-midi
.mif application/x-frame
.mif application/x-mif
.mime message/rfc822
.mime www/mime
.mjf audio/x-vnd.audioexplosion.mjuicemediafile
.mjpg video/x-motion-jpeg
.mka audio/x-matroska
.mkv video/x-matroska
.mm application/base64
.mm application/x-meme
.mme application/base64
.mod audio/mod
.mod audio/x-mod
.moov video/quicktime
.mov video/quicktime
.movie video/x-sgi-movie
.mp2 audio/mpeg
.mp2 audio/x-mpeg
.mp2 video/mpeg
.mp2 video/x-mpeg
.mp2 video/x-mpeq2a
.mp3 audio/mpeg3
.mp3 audio/x-mpeg-3
.mp3 video/mpeg
.mp3 video/x-mpeg
.mp4 video/mp4
.mpa audio/mpeg
.mpa video/mpeg
.mpc application/x-project
.mpe video/mpeg
.mpeg video/mpeg
.mpg audio/mpeg
.mpg video/mpeg
.mpga audio/mpeg
.mpp application/vnd.ms-project
.mpt application/x-project
.mpv application/x-project
.mpx application/x-project
.mrc application/marc
.ms application/x-troff-ms
.mv video/x-sgi-movie
.my audio/make
.mzz application/x-vnd.audioexplosion.mzz
.nap image/naplps
.naplps image/naplps
.nc application/x-netcdf
.ncm application/vnd.nokia.configuration-message
.nif image/x-niff
.niff image/x-niff
.nix application/x-mix-transfer
.nsc application/x-conference
.nvd application/x-navidoc
.o application/octet-stream
.oda application/oda
.ogg audio/ogg
.ogg video/ogg
.omc application/x-omc
.omcd application/x-omcdatamaker
.omcr application/x-omcregerator
.otf font/otf
.p text/x-pascal
.p10 application/pkcs10
.p10 application/x-pkcs10
.p12 application/pkcs-12
.p12 application/x-pkcs12
.p7a application/x-pkcs7-signature
.p7c application/pkcs7-mime
.p7c application/x-pkcs7-mime
.p7m application/pkcs7-mime
.p7m application/x-pkcs7-mime
.p7r application/x-pkcs7-certreqresp
.p7s application/pkcs7-signature
.part application/pro_eng
.pas text/pascal
.pbm image/x-portable-bitmap
.pcl application/vnd.hp-pcl
.pcl application/x-pcl
.pct image/x-pict
.pcx image/x-pcx
.pdb chemical/x-pdb
.pdf application/pdf
.pfunk audio/make
.pfunk audio/make.my.funk
.pgm image/x-portable-graymap
.pgm image/x-portable-greymap
.pic image/pict
.pict image/pict
.pkg application/x-newton-compatible-pkg
.pko application/vnd.ms-pki.pko
.pl text/plain
.pl text/x-script.perl
.plx application/x-pixclscript
.pm image/x-xpixmap
.pm text/x-script.perl-module
.pm4 application/x-pagemaker
.pm5 application/x-pagemaker
.png image/png
.pnm application/x-portable-anymap
.pnm image/x-portable-anymap
.pot application/mspowerpoint
.pot application/vnd.ms-powerpoint
.pov model/x-pov
.ppa application/vnd.ms-powerpoint
.ppm image/x-portable-pixmap
.pps application/mspowerpoint
.pps application/vnd.ms-powerpoint
.ppt application/mspowerpoint
.ppt application/powerpoint
.ppt application/vnd.ms-powerpoint
.ppt application/x-mspowerpoint
.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
.ppz application/mspowerpoint
.pre application/x-freelance
.prt application/pro_eng
.ps application/postscript
.psd application/octet-stream
.pvu paleovu/x-pv
.pwz application/vnd.ms-powerpoint
.py text/x-script.phyton
.pyc application/x-bytecode.python
.qcp audio/vnd.qcelp
.qd3 x-world/x-3dmf
.qd3d x-world/x-3dmf
.qif image/x-quicktime
.qt video/quicktime
.qtc video/x-qtc
.qti image/x-quicktime
.qtif image/x-quicktime
.ra audio/x-pn-realaudio
.ra audio/x-pn-realaudio-plugin
.ra audio/x-realaudio
.ram audio/x-pn-realaudio
.ras application/x-cmu-raster
.ras image/cmu-raster
.ras image/x-cmu-raster
.rast image/cmu-raster
.rar application/vnd.rar
.rexx text/x-script.rexx
.rf image/vnd.rn-realflash
.rgb image/x-rgb
.rm application/vnd.rn-realmedia
.rm audio/x-pn-realaudio
.rmi audio/mid
.rmm audio/x-pn-realaudio
.rmp audio/x-pn-realaudio
.rmp audio/x-pn-realaudio-plugin
.rng application/ringing-tones
.rng application/vnd.nokia.ringing-tone
.rnx application/vnd.rn-realplayer
.roff application/x-troff
.rp image/vnd.rn-realpix
.rpm audio/x-pn-realaudio-plugin
.rt text/richtext
.rt text/vnd.rn-realtext
.rtf application/rtf
.rtf application/x-rtf
.rtf text/richtext
.rtx application/rtf
.rtx text/richtext
.rv video/vnd.rn-realvideo
.s text/x-asm
.s3m audio/s3m
.saveme application/octet-stream
.sbk application/x-tbook
.scm application/x-lotusscreencam
.scm text/x-script.guile
.scm text/x-script.scheme
.scm video/x-scm
.sdml text/plain
.sdp application/sdp
.sdp application/x-sdp
.sdr application/sounder
.sea application/sea
.sea application/x-sea
.set application/set
.sgm text/sgml
.sgm text/x-sgml
.sgml text/sgml
.sgml text/x-sgml
.sh application/x-bsh
.sh application/x-sh
.sh application/x-shar
.sh text/x-script.sh
.shar application/x-bsh
.shar application/x-shar
.shtml text/html
.shtml text/x-server-parsed-html
.sid audio/x-psid
.sit application/x-sit
.sit application/x-stuffit
.skd application/x-koan
.skm application/x-koan
.skp application/x-koan
.skt application/x-koan
.sl application/x-seelogo
.smi application/smil
.smil application/smil
.snd audio/basic
.snd audio/x-adpcm
.sol application/solids
.spc application/x-pkcs7-certificates
.spc text/x-speech
.spl application/futuresplash
.spr application/x-sprite
.sprite application/x-sprite
.src application/x-wais-source
.ssi text/x-server-parsed-html
.ssm application/streamingmedia
.sst application/vnd.ms-pki.certstore
.step application/step
.stl application/sla
.stl application/vnd.ms-pki.stl
.stl application/x-navistyle
.stp application/step
.sv4cpio application/x-sv4cpio
.sv4crc application/x-sv4crc
.svf image/vnd.dwg
.svf image/x-dwg
.svg image/svg+xml
.svr application/x-world
.svr x-world/x-svr
.swf application/x-shockwave-flash
.t application/x-troff
.talk text/x-speech
.tar application/x-tar
.tbk application/toolbook
.tbk application/x-tbook
.tcl application/x-tcl
.tcl text/x-script.tcl
.tcsh text/x-script.tcsh
.tex application/x-tex
.texi application/x-texinfo
.texinfo application/x-texinfo
.text application/plain
.text text/plain
.tgz application/gnutar
.tgz application/x-compressed
.tif image/tiff
.tif image/x-tiff
.tiff image/tiff
.tiff image/x-tiff
.tr application/x-troff
.ts video/mp2t
.tsi audio/tsp-audio
.tsp application/dsptype
.tsp audio/tsplayer
.tsv text/tab-separated-values
.turbot image/florian
.txt text/plain
.uil text/x-uil
.uni text/uri-list
.unis text/uri-list
.unv application/i-deas
.uri text/uri-list
.uris text/uri-list
.ustar application/x-ustar
.ustar multipart/x-ustar
.uu application/octet-stream
.uu text/x-uuencode
.uue text/x-uuencode
.vcd application/x-cdlink
.vcs text/x-vcalendar
.vda application/vda
.vdo video/vdo
.vew application/groupwise
.viv video/vivo
.viv video/vnd.vivo
.vivo video/vivo
.vivo video/vnd.vivo
.vmd application/vocaltec-media-desc
.vmf application/vocaltec-media-file
.voc audio/voc
.voc audio/x-voc
.vos video/vosaic
.vox audio/voxware
.vqe audio/x-twinvq-plugin
.vqf audio/x-twinvq
.vql audio/x-twinvq-plugin
.vrml application/x-vrml
.vrml model/vrml
.vrml x-world/x-vrml
.vrt x-world/x-vrt
.vsd application/x-visio
.vst application/x-visio
.vsw application/x-visio
.w60 application/wordperfect6.0
.w61 application/wordperfect6.1
.w6w application/msword
.wav audio/wav
.wav audio/x-wav
.wb1 application/x-qpro
.wbmp image/vnd.wap.wbmp
.web application/vnd.xara
.webm video/webm
.webp image/webp
.wiz application/msword
.wk1 application/x-123
.wmf windows/metafile
.wml text/vnd.wap.wml
.wmlc application/vnd.wap.wmlc
.wmls text/vnd.wap.wmlscript
.wmlsc application/vnd.wap.wmlscriptc
.word application/msword
.woff font/woff
.woff2 font/woff2
.wp application/wordperfect
.wp5 application/wordperfect
.wp5 application/wordperfect6.0
.wp6 application/wordperfect
.wpd application/wordperfect
.wpd application/x-wpwin
.wq1 application/x-lotus
.wri application/mswrite
.wri application/x-wri
.wrl application/x-world
.wrl model/vrml
.wrl x-world/x-vrml
.wrz model/vrml
.wrz x-world/x-vrml
.wsc text/scriplet
.wsrc application/x-wais-source
.wtk application/x-wintalk
.xbm image/x-xbitmap
.xbm image/x-xbm
.xbm image/xbm
.xdr video/x-amt-demorun
.xgz xgl/drawing
.xif image/vnd.xiff
.xl application/excel
.xla application/excel
.xla application/x-excel
.xla application/x-msexcel
.xlb application/excel
.xlb application/vnd.ms-excel
.xlb application/x-excel
.xlc application/excel
.xlc application/vnd.ms-excel
.xlc application/x-excel
.xld application/excel
.xld application/x-excel
.xlk application/excel
.xlk application/x-excel
.xll application/excel
.xll application/vnd.ms-excel
.xll application/x-excel
.xlm application/excel
.xlm application/vnd.ms-excel
.xlm application/x-excel
.xls application/excel
.xls application/vnd.ms-excel
.xls application/x-excel
.xls application/x-msexcel
.xlt application/excel
.xlt application/x-excel
.xlv application/excel
.xlv application/x-excel
.xlw application/excel
.xlw application/vnd.ms-excel
.xlw application/x-excel
.xlw application/x-msexcel
.xm audio/xm
.xml application/xml
.xml text/xml
.xmz xgl/movie
.xpix application/x-vnd.ls-xpix
.xpm image/x-xpixmap
.xpm image/xpm
.x-png image/png
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xsr video/x-amt-showrun
.xwd image/x-xwd
.xwd image/x-xwindowdump
.xyz chemical/x-pdb
.yaml application/x-yaml
.yml application/x-yaml
.z application/x-compress
.z application/x-compressed
.zip application/x-compressed
.zip application/x-zip-compressed
.zip application/zip
.zip multipart/x-zip
.zoo application/octet-stream
.zsh text/x-script.zsh
};
};
}

12
modules/home-manager/default.nix Normal file → Executable file
View File

@@ -1,26 +1,22 @@
{
username,
osConfig,
inputs,
...
}:
{
home = {
stateVersion = osConfig.system.stateVersion;
inherit (osConfig.system) stateVersion;
inherit username;
homeDirectory = "/home/${username}";
};
imports = [
inputs.ags.homeManagerModules.default
inputs.nixvim.homeManagerModules.nixvim
inputs.anyrun.homeManagerModules.default
./shell/asztal.nix
./clean-home-dir.nix
./programs/neovide.nix
# ./default-apps.nix
./programs/nixvim.nix
./programs/git.nix
./packages
./programs
./services
./theme/md3-evo.nix
./desktops/hyprland
];
}

View File

@@ -1,39 +0,0 @@
* {
font-family: "NotoSans NF";
}
window#window {
background: transparent;
}
box#main {
background: rgba(48, 52, 70, 0.4);
box-shadow: 0 0 15px rgba(0, 0, 0, 0.29);
border-radius: 24px;
}
entry#entry {
border: none;
box-shadow: none;
padding: 8px 24px;
}
entry#entry,
list#main {
border-radius: 24px;
background: transparent;
}
row#match {
border-radius: 8px;
padding: 0 4px;
}
row#plugin {
border-radius: 16px;
padding: 16px;
}
list#plugin {
background: transparent;
}

View File

@@ -1,15 +0,0 @@
{ pkgs }: {
enable = true;
config = {
plugins = with pkgs.anyrunPlugins; [
applications
symbols
rink
dictionary
shell
];
y.fraction = 0.2;
closeOnClick = true;
};
extraCss = builtins.readFile ./anyrun.css;
}

View File

@@ -1,241 +1,128 @@
{
config,
pkgs,
lib,
osConfig,
...
}:
let
hypr-cycle = pkgs.writeShellApplication {
name = "hypr-cycle";
text = ''
WORKSPACE=$(hyprctl activeworkspace -j | jq -r '.id')
WINDOW=$(hyprctl activewindow -j | jq -r '.address')
hyprctl clients -j | jq -r "map(select(.workspace.id == $WORKSPACE) | select(.class == \"$1\") | .address | select(. != $WINDOW)) | .[0]"
'';
};
cfg = osConfig.desktops.hyprland;
in
{
config = lib.mkIf osConfig.desktops.hyprland.enable {
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
enable = true;
systemd = {
enable = true;
variables = [ "--all" ];
};
settings = {
env = [
"XDG_SESSION_TYPE,wayland"
"NIXOS_OZONE_WL,1"
# Gnome file manager fix
"GIO_EXTRA_MODULES,${pkgs.gnome.gvfs}/lib/gio/modules"
];
exec-once = [
"systemctl --user start hyprland-session.target"
"gnome-keyring-daemon --start --components=secrets"
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
];
general = {
layout = "master";
resize_on_border = true;
};
master = {
orientation = "center";
new_is_master = true;
always_center_master = true;
mfact = 0.4;
allow_tearing = true;
layout = lib.mkIf cfg.scrolling "scrolling";
};
input = {
accel_profile = "flat";
kb_layout = "cc1-thea";
kb_layout = osConfig.services.xserver.xkb.layout;
kb_variant = osConfig.services.xserver.xkb.variant;
};
bind = import ./keybinds.nix;
bindm = import ./mousebinds.nix;
bindr = [ "SUPER,SUPER_L,exec,pkill anyrun || anyrun" ];
monitor = [
"DP-1,highrr,0x0,1"
"DP-1,addreserved,250,0,0,0"
bind = [
"SUPER,C,killactive"
"SUPER,P,togglefloating,"
"SUPER,P,pin,"
"SUPER,D,fullscreen,1"
"SUPER,V,fullscreen,0"
"SUPER,f,workspace,r-1"
"SUPER,h,workspace,r+1"
"SUPER_SHIFT,f,movetoworkspace,r-1"
"SUPER_SHIFT,h,movetoworkspace,r+1"
]
++ (
if cfg.scrolling then
[
"SUPER,up,layoutmsg,focus u"
"SUPER,down,layoutmsg,focus d"
"SUPER,right,layoutmsg,focus r"
"SUPER,left,layoutmsg,focus l"
"SUPER_SHIFT,up,layoutmsg,movewindowto u"
"SUPER_SHIFT,down,layoutmsg,movewindowto d"
"SUPER_SHIFT,left,layoutmsg,swapcol l"
"SUPER_SHIFT,right,layoutmsg,swapcol r"
"SUPER,mouse_up,layoutmsg,focus r"
"SUPER,mouse_down,layoutmsg,focus l"
]
else
[
"SUPER_SHIFT,up,movewindow,u"
"SUPER_SHIFT,down,movewindow,d"
"SUPER_SHIFT,left,movewindow,l"
"SUPER_SHIFT,right,movewindow,r"
"SUPER,up,movefocus,u"
"SUPER,down,movefocus,d"
"SUPER,left,movefocus,l"
"SUPER,right,movefocus,r"
"SUPER,mouse_up,workspace,r+1"
"SUPER,mouse_down,workspace,r-1"
]
);
bindm = [
"SUPER,mouse:272,movewindow"
"SUPER,mouse:273,resizewindow"
];
workspace = [
"special:calc,border:false,gapsout:200,on-created-empty:[noanim;silent] kitty -e qalc"
];
windowrulev2 =
let
firefoxPip = "class:^(firefox)$,title:^(Picture-in-Picture)$";
firefoxPipInitial = "class:^(firefox)$,title:^(Firefox)$";
in
[
"keepaspectratio,${firefoxPip}"
"noborder,${firefoxPip}"
"float,${firefoxPip}"
"float,${firefoxPipInitial}"
"pin,${firefoxPip}"
"pin,${firefoxPipInitial}"
"fakefullscreen,${firefoxPip}"
"fakefullscreen,${firefoxPipInitial}"
"move 22 72,${firefoxPip}"
"move 22 72,${firefoxPipInitial}"
# For some reason it really wants to be maximized
"suppressevent maximize,class:^(neovide)$"
# pinentry
"dimaround,class:^(gcr-prompter)$"
"noborder,class:^(gcr-prompter)$"
"rounding 10,class:^(gcr-prompter)$"
"animation slide,class:^(gcr-prompter)$"
# Flameshot fixes
"float,class:^(flameshot)$"
"animation fade,class:^(flameshot)$"
];
xwayland.force_zero_scaling = true;
misc = {
layers_hog_keyboard_focus = false;
disable_splash_rendering = true;
disable_hyprland_logo = true;
background_color = "0x000000";
force_default_wallpaper = 0;
vrr = 2;
};
layerrule = [
"blur, anyrun"
"ignorealpha 0.3, anyrun"
];
decoration = {
drop_shadow = "yes";
shadow_range = 16;
"col.shadow" = "rgba(00000044)";
dim_inactive = false;
blur = {
enabled = true;
size = 8;
passes = 3;
noise = 1.0e-2;
contrast = 0.9;
brightness = 0.8;
};
};
animations = {
enabled = "yes";
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 5, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
disable_splash_rendering = true;
vrr = lib.mkDefault 2;
};
decoration.border_part_of_window = false;
input.touchpad.natural_scroll = true;
};
};
shell.asztal.enable = true;
services.kdeconnect = {
services.udiskie = {
enable = true;
indicator = true;
tray = "never";
};
services.flameshot = {
enable = true;
package = pkgs.flameshot.overrideAttrs (
final: prev: {
cmakeFlags = [
"-DUSE_WAYLAND_CLIPBOARD=1"
"-DUSE_WAYLAND_GRIM=true"
];
nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.libsForQt5.kguiaddons ];
}
);
settings = {
General = {
uiColor = "#99d1db";
showDesktopNotification = false;
disabledTrayIcon = true;
};
};
};
services.darkman =
let
wallpaperPath = "${config.home.homeDirectory}/.local/state/wallpaper.jpg";
in
{
enable = false;
settings = {
lat = 52.52;
lng = 13.405;
};
darkModeScripts = {
kitty-theme = ''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${config.home.homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Frappe
'';
};
lightModeScripts = {
kitty-theme = ''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${config.home.homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Latte
'';
};
};
programs.kitty = import ./kitty.nix { inherit pkgs; };
programs.anyrun = import ./anyrun.nix { inherit pkgs; };
services.udiskie.enable = true;
services.udiskie.tray = "never";
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
# fonts
noto-fonts
# essentials
hyprpicker
grim
slurp
wl-clipboard
polkit_gnome
# qt/kde packages
qt6.qtwayland
qt5.qtwayland
kdePackages.breeze-icons
# gnome packages
evince
baobab
gnome.gvfs
gnome.gnome-keyring
gnome.nautilus
gnome.gnome-calendar
gnome.gnome-characters
gnome.gnome-contacts
gnome.gnome-clocks
gnome.gnome-calculator
gnome.simple-scan
gnome.eog
gnome.geary
gnome.ghex
gnome.gnome-weather
gnome.gnome-keyring
gnome.gnome-disk-utility
nautilus
simple-scan
eog
ghex
gnome-disk-utility
# fixes
xorg.xrandr
];
gtk = {
enable = true;
theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
#gtk3.extraCss = builtins.readFile ./gtk.css;
#gtk4.extraCss = builtins.readFile ./gtk.css;
iconTheme = {
name = "Tela";
package = pkgs.tela-icon-theme;
};
};
qt = {
enable = true;
platformTheme = "qtct";
font.name = builtins.elemAt osConfig.fonts.fontconfig.defaultFonts.sansSerif 0;
};
qt.enable = true;
home = {
pointerCursor = {
gtk.enable = true;
package = pkgs.capitaine-cursors;
name = "capitaine-cursors";
};
file.".config/hypr/shaders" = {
source = ./hypr/shaders;
recursive = true;
};
home.pointerCursor = {
gtk.enable = true;
package = pkgs.capitaine-cursors;
name = "capitaine-cursors";
};
};
}

View File

@@ -1,19 +0,0 @@
/* https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/named-colors.html */
/* TODO */
/*@define-color window_bg_color rgba(239, 241, 245, 0.8);
@define-color window_fg_color #4c4f69;
@define-color view_bg_color @window_fg_color;
@define-color view_fg_color @window_fg_color;
@define-color accent_bg_color #1e66f5;
@define-color accent_color @accent_bg_color;
@define-color headerbar_bg_color @window_bg_color;
@define-color headerbar_fg_color @window_fg_color;
@define-color popover_bg_color #252525;
@define-color popover_fg_color @view_fg_color;
@define-color dialog_bg_color @popover_bg_color;
@define-color dialog_fg_color @popover_fg_color;
@define-color card_bg_color rgba(140, 143, 161, 0.08);
@define-color card_fg_color @window_fg_color;
@define-color headerbar_bg_color rgba(239, 241, 245, 0.8);*/

View File

@@ -1,20 +0,0 @@
// vim: set ft=glsl:
// blue light filter shader
// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// green
pixColor[1] *= 0.855;
// blue
pixColor[2] *= 0.725;
gl_FragColor = pixColor;
}

View File

@@ -1,39 +0,0 @@
precision mediump float;
varying vec2 v_texcoord; // is in 0-1
uniform sampler2D tex;
uniform float alpha;
uniform vec2 topLeft;
uniform vec2 fullSize;
uniform float radius;
uniform int discardOpaque;
uniform int discardAlpha;
uniform float discardAlphaValue;
uniform int applyTint;
uniform vec3 tint;
uniform int primitiveMultisample;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
if (discardOpaque == 1 && pixColor[3] * alpha == 1.0)
discard;
if (discardAlpha == 1 && pixColor[3] <= discardAlphaValue)
discard;
if (applyTint == 1) {
pixColor[0] = pixColor[0] * tint[0];
pixColor[1] = pixColor[1] * tint[1];
pixColor[2] = pixColor[2] * tint[2];
}
)#" +
ROUNDED_SHADER_FUNC("pixColor") + R"#(
gl_FragColor = pixColor * alpha;
}

View File

@@ -1,24 +0,0 @@
// vim: set ft=glsl:
precision highp float;
varying highp vec2 v_texcoord;
uniform highp sampler2D tex;
#define STRENGTH 0.0027
void main() {
vec2 center = vec2(0.5, 0.5);
vec2 offset = (v_texcoord - center) * STRENGTH;
float rSquared = dot(offset, offset);
float distortion = 1.0 + 1.0 * rSquared;
vec2 distortedOffset = offset * distortion;
vec2 redOffset = vec2(distortedOffset.x, distortedOffset.y);
vec2 blueOffset = vec2(distortedOffset.x, distortedOffset.y);
vec4 redColor = texture2D(tex, v_texcoord + redOffset);
vec4 blueColor = texture2D(tex, v_texcoord + blueOffset);
gl_FragColor = vec4(redColor.r, texture2D(tex, v_texcoord).g, blueColor.b, 1.0);
}

View File

@@ -1,511 +0,0 @@
#version 100
precision highp float;
varying highp vec2 v_texcoord;
varying highp vec3 v_pos;
uniform highp sampler2D tex;
uniform lowp float time;
#define BORDER_COLOR vec4(vec3(0.0, 0.0, 0.0), 1.0) // black border
#define BORDER_RADIUS 1.0 // larger vignette radius
#define BORDER_SIZE 0.01 // small border size
#define CHROMATIC_ABERRATION_STRENGTH 0.00
#define DENOISE_INTENSITY 0.0001 //
#define DISTORTION_AMOUNT 0.00 // moderate distortion amount
#define HDR_BLOOM 0.75 // bloom intensity
#define HDR_BRIGHTNESS 0.011 // brightness
#define HDR_CONTRAST 0.011 // contrast
#define HDR_SATURATION 1.0// saturation
#define LENS_DISTORTION_AMOUNT 0.0
#define NOISE_THRESHOLD 0.0001
#define PHOSPHOR_BLUR_AMOUNT 0.77 // Amount of blur for phosphor glow
#define PHOSPHOR_GLOW_AMOUNT 0.77 // Amount of phosphor glow
#define SAMPLING_RADIUS 0.0001
#define SCANLINE_FREQUENCY 540.0
#define SCANLINE_THICKNESS 0.0507
#define SCANLINE_TIME time * 471.24
#define SHARPNESS 0.25
#define SUPERSAMPLING_SAMPLES 16.0
#define VIGNETTE_RADIUS 0.0 // larger vignette radius
#define PI 3.14159265359
#define TWOPI 6.28318530718
vec2 applyBarrelDistortion(vec2 coord, float amt) {
vec2 p = coord.xy / vec2(1.0);
vec2 v = p * 2.0 - vec2(1.0);
float r = dot(v, v);
float k = 1.0 + pow(r, 2.0) * pow(amt, 2.0);
vec2 result = v * k;
return vec2(0.5, 0.5) + 0.5 * result.xy;
}
vec4 applyColorCorrection(vec4 color) {
color.rgb *= vec3(1.0, 0.79, 0.89);
return vec4(color.rgb, 1.0);
}
vec4 applyBorder(vec2 tc, vec4 color, float borderSize, vec4 borderColor) {
float dist_x = min(tc.x, 1.0 - tc.x);
float dist_y = min(tc.y, 1.0 - tc.y);
float dist = min(dist_x, dist_y) * -1.0;
float border = smoothstep(borderSize, 0.0, dist);
border += smoothstep(borderSize, 0.0, dist);
return mix(color, borderColor, border);
}
vec4 applyFakeHDR(vec4 color, float brightness, float contrast, float saturation, float bloom) {
color.rgb = (color.rgb - vec3(0.5)) * exp2(brightness) + vec3(0.5);
vec3 crtfactor = vec3(1.05, 0.92, 1.0);
color.rgb = pow(color.rgb, crtfactor);
// // NTSC
// vec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721);
// // BT.709
// vec3 lumCoeff = vec3(0.299, 0.587, 0.114);
// BT.2020
vec3 lumCoeff = vec3(0.2627, 0.6780, 0.0593);
// // Warm NTSC
// vec3 lumCoeff = vec3(0.2125, 0.7010, 0.0865);
float luminance = dot(color.rgb, lumCoeff);
luminance = pow(luminance, 2.2);
color.rgb = mix(vec3(luminance), color.rgb, saturation);
color.rgb = mix(color.rgb, vec3(1.0), pow(max(0.0, luminance - 1.0 + bloom), 4.0));
return color;
}
vec4 applyVignette(vec4 color) {
vec2 center = vec2(0.5, 0.5); // center of screen
float radius = VIGNETTE_RADIUS; // radius of vignette effect
float softness = 1.0; // softness of vignette effect
float intensity = 0.7; // intensity of vignette effect
vec2 offset = v_texcoord - center; // offset from center of screen
float distance = length(offset); // distance from center of screen
float alpha = smoothstep(radius, radius - radius * softness, distance) * intensity; // calculate alpha value for vignette effect
return mix(vec4(0.0, 0.0, 0.0, alpha), color, alpha); // mix black with color using calculated alpha value
}
vec4 applyPhosphorGlow(vec2 tc, vec4 color, sampler2D tex) {
// Calculate average color value of the texture
vec4 texelColor = color;
float averageColor = (texelColor.r + texelColor.g + texelColor.b) / 3.0;
// Determine brightness-dependent color factor
float factor = mix(
mix(0.09,
mix(0.005, 0.0075, (averageColor - 0.1) / 0.1),
step(0.01, averageColor)), 0.0005,
step(0.02, averageColor));
// Apply phosphor glow effect
vec4 sum = vec4(0.0);
vec4 pixels[9];
pixels[0] = texture2D(tex, tc - vec2(0.001, 0.001));
pixels[1] = texture2D(tex, tc - vec2(0.001, 0.0));
pixels[2] = texture2D(tex, tc - vec2(0.001, -0.001));
pixels[3] = texture2D(tex, tc - vec2(0.0, 0.001));
pixels[4] = texture2D(tex, tc);
pixels[5] = texture2D(tex, tc + vec2(0.001, 0.001));
pixels[6] = texture2D(tex, tc + vec2(0.001, 0.0));
pixels[7] = texture2D(tex, tc + vec2(0.001, -0.001));
pixels[8] = texture2D(tex, tc + vec2(0.0, 0.001));
// Perform operations on input pixels in parallel
sum = pixels[0]
+ pixels[1]
+ pixels[2]
+ pixels[3]
+ pixels[4]
+ pixels[5]
+ pixels[6]
+ pixels[7]
+ pixels[8];
sum /= 9.0;
sum += texture2D(tex, tc - vec2(0.01, 0.01)) * 0.001;
sum += texture2D(tex, tc - vec2(0.0, 0.01)) * 0.001;
sum += texture2D(tex, tc - vec2(-0.01, 0.01)) * 0.001;
sum += texture2D(tex, tc - vec2(0.01, 0.0)) * 0.001;
sum += color * PHOSPHOR_BLUR_AMOUNT;
sum += texture2D(tex, tc - vec2(-0.01, 0.0)) * 0.001;
sum += texture2D(tex, tc - vec2(0.01, -0.01)) * 0.001;
sum += texture2D(tex, tc - vec2(0.0, -0.01)) * 0.001;
sum += texture2D(tex, tc - vec2(-0.01, -0.01)) * 0.001;
sum *= PHOSPHOR_GLOW_AMOUNT;
// Initialize sum_sum_factor to zero
vec4 sum_sum_factor = vec4(0.0);
// Compute sum_j for i = -1
vec4 sum_j = vec4(0.0);
sum_j += texture2D(tex, tc + vec2(-1, -1) * 0.01);
sum_j += texture2D(tex, tc + vec2(0, -1) * 0.01);
sum_j += texture2D(tex, tc + vec2(1, -1) * 0.01);
sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01);
sum_j += texture2D(tex, tc + vec2(0, 0) * 0.01);
sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01);
sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01);
sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01);
sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01);
sum_sum_factor += sum_j * vec4(0.011);
// Compute sum_j for i = 0
sum_j = vec4(0.0);
sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01);
sum_j += texture2D(tex, tc + vec2(0, 0) * 0.01);
sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01);
sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01);
sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01);
sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01);
sum_sum_factor += sum_j * vec4(0.011);
// Compute sum_j for i = 1
sum_j = vec4(0.0);
sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01);
sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01);
sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01);
sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01);
sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01);
sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01);
sum_sum_factor += sum_j * vec4(0.011);
color += mix(sum_sum_factor * sum_sum_factor * vec4(factor), sum, 0.5);
return color;
}
vec4 applyAdaptiveSharpen(vec2 tc, vec4 color, sampler2D tex) {
vec4 color_tl = texture2D(tex, tc + vec2(-1.0, -1.0) * 0.5 / 2160.0);
vec4 color_tr = texture2D(tex, tc + vec2(1.0, -1.0) * 0.5 / 2160.0);
vec4 color_bl = texture2D(tex, tc + vec2(-1.0, 1.0) * 0.5 / 2160.0);
vec4 color_br = texture2D(tex, tc + vec2(1.0, 1.0) * 0.5 / 2160.0);
float sharpness = SHARPNESS;
vec3 color_no_alpha = color.rgb;
vec3 color_tl_no_alpha = color_tl.rgb;
vec3 color_tr_no_alpha = color_tr.rgb;
vec3 color_bl_no_alpha = color_bl.rgb;
vec3 color_br_no_alpha = color_br.rgb;
float delta = (dot(color_no_alpha, vec3(0.333333)) + dot(color_tl_no_alpha, vec3(0.333333)) + dot(color_tr_no_alpha, vec3(0.333333)) + dot(color_bl_no_alpha, vec3(0.333333)) + dot(color_br_no_alpha, vec3(0.333333))) * 0.2 - dot(color_no_alpha, vec3(0.333333));
vec3 sharp_color_no_alpha = color_no_alpha + min(vec3(0.0), vec3(delta * sharpness));
vec4 sharp_color = vec4(sharp_color_no_alpha, color.a);
return sharp_color;
}
vec4 applyScanlines(vec2 tc, vec4 color) {
float scanline = (cos(tc.y * SCANLINE_FREQUENCY + SCANLINE_TIME) *
sin(tc.y * SCANLINE_FREQUENCY + SCANLINE_TIME)) * SCANLINE_THICKNESS;
float alpha = clamp(1.0 - abs(scanline), 0.0, 1.0);
return vec4(color.rgb * alpha, color.a);
}
vec4 applyChromaticAberration(vec2 uv, vec4 color) {
vec2 center = vec2(0.5, 0.5); // center of the screen
vec2 offset = (uv - center) * CHROMATIC_ABERRATION_STRENGTH; // calculate the offset from the center
// apply lens distortion
float rSquared = dot(offset, offset);
float distortion = 1.0 + LENS_DISTORTION_AMOUNT * rSquared;
vec2 distortedOffset = offset * distortion;
// apply chromatic aberration
vec2 redOffset = vec2(distortedOffset.x * 1.00, distortedOffset.y * 1.00);
vec2 blueOffset = vec2(distortedOffset.x * 1.00, distortedOffset.y * 1.00);
vec4 redColor = texture2D(tex, uv + redOffset);
vec4 blueColor = texture2D(tex, uv + blueOffset);
vec4 result = vec4(redColor.r, color.g, blueColor.b, color.a);
return result;
}
vec4 reduceGlare(vec4 color) {
// Calculate the intensity of the color by taking the average of the RGB components
float intensity = (color.r + color.g + color.b) / 3.0;
// Set the maximum intensity that can be considered for glare
float maxIntensity = 0.98;
// Use smoothstep to create a smooth transition from no glare to full glare
// based on the intensity of the color and the maximum intensity
float glareIntensity = smoothstep(maxIntensity - 0.02, maxIntensity, intensity);
// Set the amount of glare to apply to the color
float glareAmount = 0.02;
// Mix the original color with the reduced color that has glare applied to it
vec3 reducedColor = mix(color.rgb, vec3(glareIntensity), glareAmount);
// Return the reduced color with the original alpha value
return vec4(reducedColor, color.a);
}
// Apply a fake HDR effect to the input color.
// Parameters:
// - inputColor: the color to apply the effect to.
// - brightness: the brightness of the image. Should be a value between 0 and 1.
// - contrast: the contrast of the image. Should be a value between 0 and 1.
// - saturation: the saturation of the image. Should be a value between 0 and 2.
// - bloom: the intensity of the bloom effect. Should be a value between 0 and 1.
vec4 applyFakeHDREffect(vec4 inputColor, float brightness, float contrast, float saturation, float bloom) {
const float minBrightness = 0.0;
const float maxBrightness = 1.0;
const float minContrast = 0.0;
const float maxContrast = 1.0;
const float minSaturation = 0.0;
const float maxSaturation = 2.0;
const float minBloom = 0.0;
const float maxBloom = 1.0;
// Check input parameters for validity
if (brightness < minBrightness || brightness > maxBrightness) {
return vec4(0.0, 0.0, 0.0, 1.0); // Return black with alpha of 1.0 to indicate error
}
if (contrast < minContrast || contrast > maxContrast) {
return vec4(0.0, 0.0, 0.0, 1.0);
}
if (saturation < minSaturation || saturation > maxSaturation) {
return vec4(0.0, 0.0, 0.0, 1.0);
}
if (bloom < minBloom || bloom > maxBloom) {
return vec4(0.0, 0.0, 0.0, 1.0);
}
// Apply brightness and contrast
vec3 color = inputColor.rgb;
color = (color - vec3(0.5)) * exp2(brightness * 10.0) + vec3(0.5);
color = mix(vec3(0.5), color, pow(contrast * 4.0 + 1.0, 2.0));
// // NTSC
// vec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721);
// // BT.709
// vec3 lumCoeff = vec3(0.299, 0.587, 0.114);
// // BT.2020
// vec3 lumCoeff = vec3(0.2627, 0.6780, 0.0593);
// Warm NTSC
vec3 lumCoeff = vec3(0.2125, 0.7010, 0.0865);
// Apply saturation
float luminance = dot(color, lumCoeff);
vec3 grey = vec3(luminance);
color = mix(grey, color, saturation);
// Apply bloom effect
float threshold = 1.0 - bloom;
vec3 bloomColor = max(color - threshold, vec3(0.0));
bloomColor = pow(bloomColor, vec3(2.0));
bloomColor = mix(vec3(0.0), bloomColor, pow(min(luminance, threshold), 4.0));
color += bloomColor;
return vec4(color, inputColor.a);
}
vec4 bilateralFilter(sampler2D tex, vec2 uv, vec4 color, float sampleRadius, float noiseThreshold, float intensity) {
vec4 filteredColor = vec4(0.0);
float totalWeight = 0.0;
// Top-left pixel
vec4 sample = texture2D(tex, uv + vec2(-1.0, -1.0));
float dist = length(vec2(-1.0, -1.0));
float colorDist = length(sample - color);
float weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius));
filteredColor += sample * weight;
totalWeight += weight;
// Top pixel
sample = texture2D(tex, uv + vec2(0.0, -1.0));
dist = length(vec2(0.0, -1.0));
colorDist = length(sample - color);
weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius));
filteredColor += sample * weight;
totalWeight += weight;
// Top-right pixel
sample = texture2D(tex, uv + vec2(1.0, -1.0));
dist = length(vec2(1.0, -1.0));
colorDist = length(sample - color);
weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius));
filteredColor += sample * weight;
totalWeight += weight;
// Left pixel
sample = texture2D(tex, uv + vec2(-1.0, 0.0));
dist = length(vec2(-1.0, 0.0));
colorDist = length(sample - color);
weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius));
filteredColor += sample * weight;
totalWeight += weight;
// Center pixel
sample = texture2D(tex, uv);
dist = 0.0;
colorDist = length(sample - color);
weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius));
filteredColor += sample * weight;
totalWeight += weight;
// Right pixel
sample = texture2D(tex, uv + vec2(1.0, 0.0));
dist = length(vec2(1.0, 0.0));
colorDist = length(sample - color);
weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius));
filteredColor += sample * weight;
totalWeight += weight;
// Bottom-left pixel
sample = texture2D(tex, uv + vec2(-1.0, 1.0));
dist = length(vec2(-1.0, 1.0));
colorDist = length(sample - color);
weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius));
filteredColor += sample * weight;
totalWeight += weight;
// Bottom pixel
sample = texture2D(tex, uv + vec2(0.0, sampleRadius));
dist = length(vec2(0.0, sampleRadius));
colorDist = length(sample - color);
weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius));
filteredColor += sample * weight;
totalWeight += weight;
filteredColor /= totalWeight;
return mix(color, filteredColor, step(noiseThreshold, length(filteredColor - color)));
}
vec4 supersample(sampler2D tex, vec2 uv, float sampleRadius, float noiseThreshold, float intensity) {
float radiusSq = sampleRadius * sampleRadius;
vec2 poissonDisk;
vec4 color = vec4(0.0);
float r1_0 = sqrt(0.0 / 16.0);
float r2_0 = fract(1.0 / 3.0);
float theta_0 = TWOPI * r2_0;
poissonDisk = vec2(r1_0 * cos(theta_0), r1_0 * sin(theta_0));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_1 = sqrt(1.0 / 16.0);
float r2_1 = fract(2.0 / 3.0);
float theta_1 = TWOPI * r2_1;
poissonDisk = vec2(r1_1 * cos(theta_1), r1_1 * sin(theta_1));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_2 = sqrt(2.0 / 16.0);
float r2_2 = fract(3.0 / 3.0);
float theta_2 = TWOPI * r2_2;
poissonDisk = vec2(r1_2 * cos(theta_2), r1_2 * sin(theta_2));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_3 = sqrt(3.0 / 16.0);
float r2_3 = fract(4.0 / 3.0);
float theta_3 = TWOPI * r2_3;
poissonDisk = vec2(r1_3 * cos(theta_3), r1_3 * sin(theta_3));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_4 = sqrt(4.0 / 16.0);
float r2_4 = fract(5.0 / 3.0);
float theta_4 = TWOPI * r2_4;
poissonDisk = vec2(r1_4 * cos(theta_4), r1_4 * sin(theta_4));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_5 = sqrt(5.0 / 16.0);
float r2_5 = fract(6.0 / 3.0);
float theta_5 = TWOPI * r2_5;
poissonDisk = vec2(r1_5 * cos(theta_5), r1_5 * sin(theta_5));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_6 = sqrt(6.0 / 16.0);
float r2_6 = fract(7.0 / 3.0);
float theta_6 = TWOPI * r2_6;
poissonDisk = vec2(r1_6 * cos(theta_6), r1_6 * sin(theta_6));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_7 = sqrt(7.0 / 16.0);
float r2_7 = fract(8.0 / 3.0);
float theta_7 = TWOPI * r2_7;
poissonDisk = vec2(r1_7 * cos(theta_7), r1_7 * sin(theta_7));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_8 = sqrt(8.0 / 16.0);
float r2_8 = fract(9.0 / 3.0);
float theta_8 = TWOPI * r2_8;
poissonDisk = vec2(r1_8 * cos(theta_8), r1_8 * sin(theta_8));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_9 = sqrt(9.0 / 16.0);
float r2_9 = fract(10.0 / 3.0);
float theta_9 = TWOPI * r2_9;
poissonDisk = vec2(r1_9 * cos(theta_9), r1_9 * sin(theta_9));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_10 = sqrt(10.0 / 16.0);
float r2_10 = fract(11.0 / 3.0);
float theta_10 = TWOPI * r2_10;
poissonDisk = vec2(r1_10 * cos(theta_10), r1_10 * sin(theta_10));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_11 = sqrt(11.0 / 16.0);
float r2_11 = fract(12.0 / 3.0);
float theta_11 = TWOPI * r2_11;
poissonDisk = vec2(r1_11 * cos(theta_11), r1_11 * sin(theta_11));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_12 = sqrt(12.0 / 16.0);
float r2_12 = fract(13.0 / 3.0);
float theta_12 = TWOPI * r2_12;
poissonDisk = vec2(r1_12 * cos(theta_12), r1_12 * sin(theta_12));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_13 = sqrt(13.0 / 16.0);
float r2_13 = fract(14.0 / 3.0);
float theta_13 = TWOPI * r2_13;
poissonDisk = vec2(r1_13 * cos(theta_13), r1_13 * sin(theta_13));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_14 = sqrt(14.0 / 16.0);
float r2_14 = fract(15.0 / 3.0);
float theta_14 = TWOPI * r2_14;
poissonDisk = vec2(r1_14 * cos(theta_14), r1_14 * sin(theta_14));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
float r1_15 = sqrt(15.0 / 16.0);
float r2_15 = fract(16.0 / 3.0);
float theta_15 = TWOPI * r2_15;
poissonDisk = vec2(r1_15 * cos(theta_15), r1_15 * sin(theta_15));
color += texture2D(tex, uv + poissonDisk * sampleRadius);
return bilateralFilter(tex, uv, color, sampleRadius, noiseThreshold, intensity);
}
void main() {
vec2 tc_no_dist = v_texcoord;
vec2 tc = applyBarrelDistortion(tc_no_dist, DISTORTION_AMOUNT);
// [-1, 1]
vec2 tc_no_dist_symmetric = tc_no_dist * 2.0 - 1.0;
// [0,1]
vec2 tc_no_dist_normalized = (tc_no_dist_symmetric + 1.0) / 2.0;
// vec4 color = texture2D(tex, tc);
vec4 color = supersample(tex, tc, SAMPLING_RADIUS, NOISE_THRESHOLD, DENOISE_INTENSITY);
color = applyAdaptiveSharpen(tc, color, tex);
color = applyPhosphorGlow(tc, color, tex);
color = reduceGlare(color);
color = mix(applyFakeHDREffect(color, HDR_BRIGHTNESS, HDR_CONTRAST, HDR_SATURATION, HDR_BLOOM), color, 0.5);
color = applyColorCorrection(color);
color /= SUPERSAMPLING_SAMPLES;
color = mix(applyChromaticAberration(tc, color), color, 0.25);
color = mix(color, applyVignette(color), 0.37);
color = applyBorder(tc_no_dist_normalized, color, 1.0 - BORDER_SIZE * BORDER_RADIUS, BORDER_COLOR);
color = mix(applyBorder(tc, color, BORDER_SIZE, BORDER_COLOR), color, 0.05);
color = applyScanlines(tc, color);
gl_FragColor = color;
gl_FragColor.a = 1.0;
}

View File

@@ -1,42 +0,0 @@
precision highp float;
varying vec2 v_texcoord;
uniform sampler2D tex;
uniform float time;
void warpco(inout vec2 tc) {
tc -= 0.5;
tc *= length(tc) * 2.0;
tc += 0.5;
}
float rand1d(float seed) {
return sin(seed*1454.0);
}
float rand2d(vec2 co)
{
return fract(sin(dot(co.xy, vec2(12.9898,78.233))) * 43758.5453);
}
vec3 rgb(in vec2 tc, float freq, float amp, inout vec4 centre) {
vec2 off = vec2(1.0/800.0, 0.0) * sin(tc.t * freq + time) * amp;
vec2 off2 = vec2(1.0/800.0, 0.0) * sin(tc.t * freq - time * 1.5) * amp;
centre = texture2D(tex, tc);
return vec3(texture2D(tex, tc-off).r, centre.g, texture2D(tex, tc+off2).b);
}
void main() {
// vec2 px = 1.0 / textureSize(tex, 0).st;
vec2 tc = v_texcoord;
warpco(tc);
tc = mix(v_texcoord, tc, sin(time * 2.0)*0.07);
tc.x += rand2d(floor(tc * 20.0 + floor(time * 2.5))) * 0.01;
tc.x += rand1d(floor(tc.x * 40.0)) * 0.005 * rand1d(time * 0.001);
tc.y += sin(tc.x + time) * 0.02;
vec4 centre;
vec3 bent = rgb(tc, 100.0, 5.0, centre);
vec3 col = mix(centre.rgb, bent, sin(time));
gl_FragColor = vec4(col, centre.a);
// gl_FragColor = vec4(texture2D(tex, v_texcoord));
}

View File

@@ -1,21 +0,0 @@
// vim: set ft=glsl:
// blue light filter shader
// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// red
pixColor[0] *= 0.7;
// green
pixColor[1] *= 0.6;
// blue
pixColor[2] *= 0.5;
gl_FragColor = pixColor;
}

View File

@@ -1,31 +0,0 @@
//---------------------------------------------------------------------------
// Fragment
//---------------------------------------------------------------------------
#version 420 core
//---------------------------------------------------------------------------
precision mediump float;
in vec2 pos; // screen position <-1,+1>
out vec4 gl_FragColor; // fragment output color
uniform sampler2D txr; // texture to blur
uniform float xs,ys; // texture resolution
uniform float r = 6.0; // blur radius
varying vec2 v_texcoord;
uniform sampler2D tex;
//---------------------------------------------------------------------------
void main()
{
float x,y,xx,yy,rr=r*r,dx,dy,w,w0;
w0=0.3780/pow(r,1.975);
vec2 p;
vec4 pixColor = texture2D(tex, v_texcoord);
for (dx=1.0/xs,x=-r,p.x=0.5+(pos.x*0.5)+(x*dx);x<=r;x++,p.x+=dx){ xx=x*x;
for (dy=1.0/ys,y=-r,p.y=0.5+(pos.y*0.5)+(y*dy);y<=r;y++,p.y+=dy){ yy=y*y;
if (xx+yy<=rr)
{
w=w0*exp((-xx-yy)/(2.0*rr));
pixColor+=texture2D(txr,p)*w;
}}}
gl_FragColor = pixColor;
}
//---------------------------------------------------------------------------

View File

@@ -1,28 +0,0 @@
// vim: set ft=glsl:
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
uniform float blurFactor;
uniform vec2 resolution;
const int numSamples = 120000;
uniform sampler2D accumulator;
void main() {
float blurFactor = 120000.0;
vec4 currentColor = texture2D(tex, v_texcoord);
vec4 prevColor = texture2D(accumulator, v_texcoord);
vec2 velocity = (v_texcoord - gl_FragCoord.xy / resolution) * 2.0;
vec4 colorDiff = currentColor - prevColor;
float motionBlur = length(velocity) * blurFactor;
vec4 finalColor = prevColor + colorDiff * 2.0;
gl_FragColor = finalColor;
}

View File

@@ -1,14 +0,0 @@
// vim: set ft=glsl:
// blue light filter shader
// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
gl_FragColor = pixColor;
}

View File

@@ -1,41 +0,0 @@
// -*- mode:c -*-
precision lowp float;
varying vec2 v_texcoord;
uniform sampler2D tex;
float distanceSquared(vec3 pixColor, vec3 solarizedColor) {
vec3 distanceVector = pixColor - solarizedColor;
return dot(distanceVector, distanceVector);
}
void main() {
vec3 solarized[16];
solarized[0] = vec3(0.,0.169,0.212);
solarized[1] = vec3(0.027,0.212,0.259);
solarized[2] = vec3(0.345,0.431,0.459);
solarized[3] = vec3(0.396,0.482,0.514);
solarized[4] = vec3(0.514,0.58,0.588);
solarized[5] = vec3(0.576,0.631,0.631);
solarized[6] = vec3(0.933,0.91,0.835);
solarized[7] = vec3(0.992,0.965,0.89);
solarized[8] = vec3(0.71,0.537,0.);
solarized[9] = vec3(0.796,0.294,0.086);
solarized[10] = vec3(0.863,0.196,0.184);
solarized[11] = vec3(0.827,0.212,0.51);
solarized[12] = vec3(0.424,0.443,0.769);
solarized[13] = vec3(0.149,0.545,0.824);
solarized[14] = vec3(0.165,0.631,0.596);
solarized[15] = vec3(0.522,0.6,0.);
vec3 pixColor = vec3(texture2D(tex, v_texcoord));
int closest = 0;
float closestDistanceSquared = distanceSquared(pixColor, solarized[0]);
for (int i = 1; i < 15; i++) {
float newDistanceSquared = distanceSquared(pixColor, solarized[i]);
if (newDistanceSquared < closestDistanceSquared) {
closest = i;
closestDistanceSquared = newDistanceSquared;
}
}
gl_FragColor = vec4(solarized[closest], 1.);
}

View File

@@ -1,39 +0,0 @@
// vibrance for hyprland
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
// see https://github.com/CeeJayDK/SweetFX/blob/a792aee788c6203385a858ebdea82a77f81c67f0/Shaders/Vibrance.fx#L20-L30
const vec3 VIB_RGB_BALANCE = vec3(1.0, 1.0, 1.0);
const float VIB_VIBRANCE = 0.15;
const vec3 VIB_coeffVibrance = VIB_RGB_BALANCE * -VIB_VIBRANCE;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// RGB
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
// vec3 VIB_coefLuma = vec3(0.333333, 0.333334, 0.333333); // was for `if VIB_LUMA == 1`
vec3 VIB_coefLuma = vec3(0.212656, 0.715158, 0.072186); // try both and see which one looks nicer.
float luma = dot(VIB_coefLuma, color);
float max_color = max(color[0], max(color[1], color[2]));
float min_color = min(color[0], min(color[1], color[2]));
float color_saturation = max_color - min_color;
vec3 p_col = vec3(vec3(vec3(vec3(sign(VIB_coeffVibrance) * color_saturation) - 1.0) * VIB_coeffVibrance) + 1.0);
pixColor[0] = mix(luma, color[0], p_col[0]);
pixColor[1] = mix(luma, color[1], p_col[1]);
pixColor[2] = mix(luma, color[2], p_col[2]);
gl_FragColor = pixColor;
}

View File

@@ -1,49 +0,0 @@
[
"SUPER,Q,killactive"
"SUPER,T,exec,kitty"
"SUPER,TAB,exec,ags -t overview"
"SUPER,C,togglespecialworkspace,calc"
"SUPER_SHIFT,C,exec,hyprpicker | wl-copy"
"SUPER_SHIFT,V,exec,XDG_CURRENT_DESKTOP=sway flameshot gui --clipboard"
"SUPER,P,togglefloating,"
"SUPER,P,pin,"
"SUPER,D,fullscreen,1"
"SUPER,V,fullscreen,0"
"SUPER_SHIFT,up,movewindow,u"
"SUPER_SHIFT,down,movewindow,d"
"SUPER_SHIFT,left,movewindow,l"
"SUPER_SHIFT,right,movewindow,r"
"SUPER,up,movefocus,u"
"SUPER,down,movefocus,d"
"SUPER,left,movefocus,l"
"SUPER,right,movefocus,r"
"SUPER,f,workspace,r-1"
"SUPER,h,workspace,r+1"
"SUPER_SHIFT,f,movetoworkspace,r-1"
"SUPER_SHIFT,h,movetoworkspace,r+1"
"SUPER,mouse_up,workspace,r+1"
"SUPER,mouse_down,workspace,r-1"
"SUPER,1,workspace,1"
"SUPER,2,workspace,2"
"SUPER,3,workspace,3"
"SUPER,4,workspace,4"
"SUPER,5,workspace,5"
"SUPER,6,workspace,6"
"SUPER,7,workspace,7"
"SUPER,8,workspace,8"
"SUPER,9,workspace,9"
"SUPER_SHIFT,1,movetoworkspace,1"
"SUPER_SHIFT,2,movetoworkspace,2"
"SUPER_SHIFT,3,movetoworkspace,3"
"SUPER_SHIFT,4,movetoworkspace,4"
"SUPER_SHIFT,5,movetoworkspace,5"
"SUPER_SHIFT,6,movetoworkspace,6"
"SUPER_SHIFT,7,movetoworkspace,7"
"SUPER_SHIFT,8,movetoworkspace,8"
"SUPER_SHIFT,9,movetoworkspace,9"
]

View File

@@ -1,16 +0,0 @@
{ pkgs }:
{
enable = true;
shellIntegration.enableZshIntegration = true;
extraConfig = ''
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono
font_size 13
include ./current-theme.conf
'';
settings = {
background_opacity = "0.8";
window_padding_width = 10;
};
}

View File

@@ -1 +0,0 @@
[ "SUPER,mouse:272,movewindow" "SUPER,mouse:273,resizewindow" ]

View File

@@ -0,0 +1,2 @@
The configuration I use is located in [`/modules/home-manager/programs/nixvim.nix`](../../programs/nixvim.nix).
This module has to be included in home manager first as shown in [`/modules/home-manager/default.nix`](../../default.nix)

View File

@@ -0,0 +1,64 @@
{
lib,
config,
...
}:
let
cfg = config.presets.aerial;
in
{
options.presets.aerial = {
enable = lib.mkEnableOption "aerial";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "<C-Up>";
action = # vim
":AerialPrev<CR>";
}
{
key = "<C-Down>";
action = # vim
":AerialNext<CR>";
}
{
key = "<leader>fs";
mode = "n";
action = # vim
":Telescope aerial<CR>";
}
];
plugins = {
aerial = {
enable = true;
settings = {
autojump = true;
highlight_on_jump = false;
filter_kind = false;
open_automatic = false;
show_guides = true;
backends = [
"lsp"
"treesitter"
"markdown"
"asciidoc"
"man"
];
layout = {
placement = "edge";
direction = "right";
};
};
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>fs";
group = "Symbols";
icon = "󰡱";
}
];
};
};
}

View File

@@ -0,0 +1,83 @@
{ lib, config, ... }:
let
cfg = config.presets.auto-format;
in
{
options.presets.auto-format = {
enable = lib.mkEnableOption "auto-format";
varName = lib.mkOption {
type = lib.types.str;
default = "disable_autoformat";
};
commandName = lib.mkOption {
type = lib.types.str;
default = "AutoFormatToggle";
};
};
config = lib.mkIf cfg.enable {
userCommands.${cfg.commandName}.command.__raw = # lua
''
function(args)
if args.bang then
vim.b.${cfg.varName} = not vim.b.${cfg.varName}
else
vim.g.${cfg.varName} = not vim.g.${cfg.varName}
end
local lualine, lib = pcall(require, 'lualine')
if lualine then
lib.refresh()
end
end
'';
keymaps = [
{
key = "<leader>af";
mode = "n";
options.silent = true;
action = "<cmd>:${cfg.commandName}<CR>";
}
{
key = "<leader>aF";
mode = "n";
options.silent = true;
action = "<cmd>:${cfg.commandName}!<CR>";
}
];
plugins = {
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>a";
group = "Auto Actions";
icon = "󰁨";
}
{
__unkeyed-1 = "<leader>af";
desc = "Tggle auto-format";
icon = "󱌓";
}
{
__unkeyed-1 = "<leader>aF";
desc = "Tggle auto-format (buffer)";
icon = "󱌓";
}
];
conform-nvim.settings.format_after_save = # lua
''
function(bufnr)
if vim.g.${cfg.varName} or vim.b[bufnr].${cfg.varName} then
return
end
return { timeout_ms = 500, lsp_fallback = true };
end
'';
lualine.settings.sections.lualine_x = lib.mkOrder 600 [
"(vim.g.${cfg.varName} or vim.b.${cfg.varName}) and '󱌓' or nil"
];
};
};
}

View File

@@ -0,0 +1,110 @@
{ lib, config, ... }:
let
cfg = config.presets.auto-save;
in
{
options.presets.auto-save = {
enable = lib.mkEnableOption "auto save";
disableOnStart = lib.mkEnableOption "disable auto save on start";
event = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [
"BufHidden"
"FocusLost"
];
};
};
config = lib.mkIf cfg.enable {
extraConfigLua = # lua
''
function PerformAutoSave(buf)
buf = buf or vim.api.nvim_get_current_buf()
if vim.b.disable_autosave or vim.g.disable_autosave then return end
if vim.fn.getbufvar(buf, "&modifiable") ~= 1 then return end
if not vim.api.nvim_buf_get_option(buf, 'modified') then return end
if vim.api.nvim_buf_get_option(buf, 'buftype') ~= "" then return end
vim.api.nvim_buf_call(buf, function()
vim.cmd('silent! w')
print("Auto save at " .. os.date("%H:%M:%S"))
end)
end
'';
autoCmd = [
{
event = cfg.event;
pattern = [ "*" ];
callback.__raw = # lua
"function(args) PerformAutoSave(args.buf) end";
}
];
globals.disable_autosave = cfg.disableOnStart;
userCommands.ToggleAutoSave = {
bang = true;
command.__raw = # lua
''
function(args)
if args.bang then
vim.b.disable_autosave = not vim.b.disable_autosave
else
vim.g.disable_autosave = not vim.g.disable_autosave
end
local lualine, lib = pcall(require, 'lualine')
if lualine then
lib.refresh()
end
end
'';
};
keymaps = [
{
key = "<leader>as";
mode = "n";
options.silent = true;
action = "<cmd>:ToggleAutoSave<CR>";
}
{
key = "<leader>aS";
mode = "n";
options.silent = true;
action = "<cmd>:ToggleAutoSave!<CR>";
}
];
plugins = {
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>a";
group = "Auto Actions";
icon = "󰁨";
}
{
__unkeyed-1 = "<leader>as";
desc = "Tggle auto-save";
icon = "󱙃";
}
{
__unkeyed-1 = "<leader>aS";
desc = "Tggle auto-save (buffer)";
icon = "󱙃";
}
];
/*
neo-tree.eventHandlers.window_before_open = # lua
"function() PerformAutoSave() end";
*/
lualine.settings.sections.lualine_x = lib.mkOrder 700 [
# lua
"(vim.g.disable_autosave or vim.b.disable_autosave) and '󱙃' or nil"
];
};
};
}

View File

@@ -0,0 +1,106 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.base.completion;
in
{
options.presets.base.completion = {
enable = lib.mkEnableOption "completion";
copilot = lib.mkEnableOption "Copilot";
ollama = lib.mkEnableOption "Ollama";
};
config = lib.mkIf cfg.enable {
extraConfigLua =
lib.mkIf cfg.ollama
#lua
''
require('minuet').setup({
provider = 'openai_fim_compatible',
n_completions = 1,
context_window = 1024,
provider_options = {
openai_fim_compatible = {
api_key = 'TERM',
name = 'Ollama',
end_point = 'http://localhost:11434/v1/completions',
model = 'deepseek-coder-v2:16b',
optional = {
max_tokens = 56,
stop = { '\n' },
top_p = 0.9,
},
},
},
virtualtext = {
show_on_completion_menu = true,
auto_trigger_ft = { "*" },
keymap = {
accept = '<A-l>',
},
},
throttle = 0,
debounce = 0,
})
'';
plugins = {
luasnip.enable = true;
lspkind = {
enable = true;
settings.mode = "symbol_text";
};
lualine.settings.sections.lualine_x = lib.mkIf cfg.ollama (
lib.mkBefore [
{ __unkeyed-1.__raw = "require('minuet.lualine')"; }
]
);
copilot-lua = lib.mkIf cfg.copilot {
enable = true;
settings.suggestion.auto_trigger = true;
};
cmp = {
enable = true;
settings = {
mapping = {
"<C-n>" = # lua
"cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
"<C-p>" = # lua
"cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
"<C-y>" = # lua
"cmp.mapping.confirm({select = true})";
"<C-Enter>" = # lua
"cmp.mapping.complete()";
};
sources = [
{ name = "path"; }
{ name = "luasnip"; }
{ name = "nvim_lsp"; }
{ name = "nvim_lsp_signature_help"; }
{ name = "nvim_lsp_document_symbol"; }
];
formatting.fields = [
"abbr"
"kind"
];
snippet.expand = # lua
"function(args) require('luasnip').lsp_expand(args.body) end";
window = {
completion = {
border = "solid";
zindex = 10;
};
documentation = {
border = "solid";
zindex = 10;
};
};
};
};
};
extraPlugins = lib.mkIf cfg.ollama [ pkgs.vimPlugins.minuet-ai-nvim ];
};
}

View File

@@ -0,0 +1,99 @@
{
lib,
config,
...
}:
let
cfg = config.presets.base.coverage;
in
{
options.presets.base.coverage = {
enable = lib.mkEnableOption "coverage";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "<leader>cs";
action = # vim
":CoverageSummary<CR>";
}
{
key = "<leader>cr";
action = # vim
":CoverageClear<CR>:CoverageLoad<CR>:CoverageShow<CR>";
}
{
key = "<leader>ch";
action = # vim
":CoverageHide<CR>";
}
{
key = "<leader>cc";
action = # vim
":CoverageShow<CR>";
}
];
autoCmd = [
{
event = [ "BufEnter" ];
callback.__raw = # lua
''
function()
local ftype = vim.bo.filetype
local ok, lang = pcall(require, "coverage.languages." .. ftype)
if not ok then
return
end
local config = require("coverage.config")
local util = require("coverage.util")
local Path = require("plenary.path")
local ft_config = config.opts.lang[ftype]
if ft_config == nil then
return
end
local p = Path:new(util.get_coverage_file(ft_config.coverage_file))
if not p:exists() then
return
end
require("coverage").load(true)
end
'';
}
];
plugins = {
coverage = {
enable = true;
autoReload = true;
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>c";
desc = "Coverage";
icon = "󰠞";
}
{
__unkeyed-1 = "<leader>cs";
desc = "Summary";
icon = "";
}
{
__unkeyed-1 = "<leader>cr";
desc = "Reload";
icon = "󰑓";
}
{
__unkeyed-1 = "<leader>ch";
desc = "Hide";
icon = "󱨃";
}
{
__unkeyed-1 = "<leader>cc";
desc = "Show";
icon = "󱨂";
}
];
};
};
}

View File

@@ -0,0 +1,158 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.base.diagnostics;
in
{
options.presets.base.diagnostics = {
enable = lib.mkEnableOption "diagnostics";
};
config = lib.mkIf cfg.enable {
extraConfigLuaPre = # lua
''
vim.lsp.set_log_level("off")
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "solid" })
'';
diagnostic.settings = {
virtual_text.prefix = "";
signs = false;
float = {
focusable = false;
header = "";
border = "solid";
scope = "cursor";
prefix = "";
};
underline = true;
update_in_insert = true;
severity_sort = true;
};
keymaps = [
{
key = "<leader>sn";
mode = "n";
options.silent = true;
action.__raw = # lua
"function() vim.diagnostic.open_float(nil) end";
}
{
key = "<leader>sa";
mode = "n";
options.silent = true;
action.__raw = # lua
"require('actions-preview').code_actions";
}
{
key = "<leader>sx";
mode = "n";
options.silent = true;
action.__raw = # lua
"vim.lsp.buf.format";
}
{
key = "<leader>sR";
mode = "n";
options.silent = true;
action = "<cmd>:LspRestart<CR>";
}
{
key = "<leader>sc";
mode = "n";
action = ":IncRename ";
}
{
key = "<leader>sh";
mode = "n";
options.silent = true;
action.__raw = # lua
"function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({0}), {0}) end";
}
];
plugins = {
actions-preview.enable = true;
lsp = {
enable = true;
inlayHints = false;
};
lsp-signature.enable = true;
telescope = {
enable = true;
keymaps = {
"<leader>sr" = "lsp_references";
"<leader>sd" = "lsp_definitions";
"<leader>si" = "lsp_implementations";
"<leader>sw" = "lsp_workspace_symbols";
"<leader>st" = "lsp_type_definitions";
};
};
inc-rename.enable = true;
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>s";
group = "LSP";
icon = "󱐋";
}
{
__unkeyed-1 = "<leader>sr";
desc = "References";
icon = "󱁉";
}
{
__unkeyed-1 = "<leader>sc";
desc = "Incremental Rename";
icon = "󰑕";
}
{
__unkeyed-1 = "<leader>sR";
desc = "Restart LSP";
icon = "󰜉";
}
{
__unkeyed-1 = "<leader>sd";
desc = "Definitions";
icon = "󰜬";
}
{
__unkeyed-1 = "<leader>si";
desc = "Implementations";
icon = "󰴽";
}
{
__unkeyed-1 = "<leader>sw";
desc = "Workspace Symbols";
icon = "󰷐";
}
{
__unkeyed-1 = "<leader>st";
desc = "Type Definitions";
icon = "󱍕";
}
{
__unkeyed-1 = "<leader>sh";
icon = "󰞂";
desc = "Inlay Hints";
}
{
__unkeyed-1 = "<leader>sa";
desc = "Code Actions";
icon = "";
}
{
__unkeyed-1 = "<leader>sn";
desc = "Diagnostics";
icon = "";
}
{
__unkeyed-1 = "<leader>sx";
desc = "LSP Format";
icon = "󰉢";
}
];
};
};
}

View File

@@ -0,0 +1,63 @@
{ lib, config, ... }:
let
cfg = config.presets.base.find;
in
{
options.presets.base.find = {
enable = lib.mkEnableOption "file finding";
};
config = lib.mkIf cfg.enable {
plugins = {
web-devicons.enable = true;
telescope = {
enable = true;
keymaps = {
"<leader>ff" = {
action = "git_files";
mode = "n";
};
"<leader>fa" = {
action = "find_files";
mode = "n";
};
"<leader>fg" = {
action = "live_grep";
mode = "n";
};
"<leader>fc" = {
action = "buffers";
mode = "n";
};
};
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>f";
group = "Find";
icon = "󰍉";
}
{
__unkeyed-1 = "<leader>ff";
desc = "File";
icon = "󰈢";
}
{
__unkeyed-1 = "<leader>fa";
desc = "All Files";
icon = "󱪡";
}
{
__unkeyed-1 = "<leader>fg";
desc = "Grep";
icon = "󰑑";
}
{
__unkeyed-1 = "<leader>fc";
desc = "Current";
icon = "󰈙";
}
];
};
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.base.formatting;
in
{
options.presets.base.formatting = {
enable = lib.mkEnableOption "formatting";
prettier = lib.mkEnableOption "prettier formatter";
};
config = lib.mkIf cfg.enable {
plugins.conform-nvim = {
enable = true;
settings.formatters_by_ft = lib.mkIf cfg.prettier {
javascript = [ "prettierd" ];
markdown = [ "prettierd" ];
typescript = [ "prettierd" ];
json = [ "prettierd" ];
yaml = [ "prettierd" ];
html = [ "prettierd" ];
angular = [ "prettierd" ];
css = [ "prettierd" ];
scss = [ "prettierd" ];
less = [ "prettierd" ];
svelte = [ "prettierd" ];
};
};
extraPackages = lib.mkIf cfg.prettier [ pkgs.prettierd ];
};
}

View File

@@ -0,0 +1,51 @@
{ lib, config, ... }:
let
cfg = config.presets.base.leap;
in
{
options.presets.base.leap = {
enable = lib.mkEnableOption "leap";
};
config = lib.mkIf cfg.enable {
plugins.leap.enable = true;
keymaps = [
{
key = "s";
mode = [
"n"
"x"
"o"
];
action.__raw = ''
function()
require('leap').leap({
windows = { vim.api.nvim_get_current_win() },
inclusive = true
})
end
'';
options.desc = "Leap";
}
{
key = "R";
mode = [
"x"
"o"
];
action.__raw = ''
function ()
require('leap.treesitter').select {
-- To increase/decrease the selection in a clever-f-like manner,
-- with the trigger key itself (vRRRRrr...). The default keys
-- (<enter>/<backspace>) also work, so feel free to skip this.
opts = require('leap.user').with_traversal_keys('R', 'r')
}
end
'';
}
];
};
}

View File

@@ -0,0 +1,19 @@
{ lib, config, ... }:
let
cfg = config.presets.base.minimap;
in
{
options.presets.base.minimap = {
enable = lib.mkEnableOption "minimap";
};
config = lib.mkIf cfg.enable {
globals = {
minimap_width = 10;
minimap_auto_start = 1;
minimap_auto_start_win_enter = 1;
minimap_close_buftypes = [ "nofile" ];
minimap_block_filetypes = [ "NvimTree" ];
};
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
config,
hmConfig,
...
}:
let
cfg = config.presets.base.spellcheck;
in
{
options.presets.base.spellcheck = {
enable = lib.mkEnableOption "Spellcheck";
};
config = lib.mkIf cfg.enable {
plugins.lsp.servers.harper_ls = {
enable = true;
settings = {
userDictPath = "${hmConfig.xdg.configHome}/harper-user-dictionary.txt";
};
};
};
}

View File

@@ -0,0 +1,75 @@
{ lib, config, ... }:
let
cfg = config.presets.base.status-line;
in
{
options.presets.base.status-line = {
enable = lib.mkEnableOption "status line";
};
config = lib.mkIf cfg.enable {
opts.showmode = false;
plugins = {
notify = {
enable = true;
settings.stages = "static";
};
telescope = {
enable = true;
keymaps."<leader>n" = # vim
"notify";
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>n";
desc = "Notifications";
icon = "󰍩";
}
];
lualine = {
enable = true;
settings = {
options = {
globalstatus = true;
/*
section_separators = {
left = "";
right = "";
};
*/
component_separators = {
left = "";
right = "";
};
};
sections = {
lualine_a = [
{
__unkeyed-1 = "mode";
/*
separator = {
right = "";
left = "";
};
*/
icon = "";
}
];
lualine_x = lib.mkAfter [ { __unkeyed-1 = "filetype"; } ];
lualine_z = [
{
__unkeyed-1 = "location";
/*
separator = {
right = "";
left = "";
};
*/
}
];
};
};
};
};
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.base.syntax;
in
{
options.presets.base.syntax = {
enable = lib.mkEnableOption "syntax highlighting";
};
config = lib.mkIf cfg.enable {
plugins = {
treesitter = {
enable = true;
settings = {
highlight = {
additional_vim_regex_highlighting = true;
enable = true;
};
indent.enable = true;
};
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
nixvimInjections = true;
};
indent-blankline = {
enable = lib.mkDefault true;
settings = {
indent.char = "";
scope.show_start = false;
};
};
illuminate.enable = lib.mkDefault true;
nvim-autopairs.enable = lib.mkDefault true;
colorizer.enable = lib.mkDefault true;
ts-autotag = {
enable = lib.mkDefault true;
settings.opts.enable_close_on_slash = lib.mkDefault true;
};
};
};
}

View File

@@ -0,0 +1,51 @@
{ lib, config, ... }:
let
cfg = config.presets.base.tree;
in
{
options.presets.base.tree = {
enable = lib.mkEnableOption "file tree";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "<leader>t";
mode = "n";
action = # vim
"<cmd>:Neotree toggle<CR>";
}
];
plugins = {
web-devicons.enable = true;
neo-tree = {
enable = true;
settings = {
event_handlers = [
{
event = "neo_tree_buffer_leave";
handler.__raw = ''
function()
require('neo-tree').close_all()
end
'';
}
];
filesystem = {
use_libuv_file_watcher = true;
follow_current_file.enabled = true;
filtered_items.visible = true;
};
popupBorderStyle = "rounded";
};
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>t";
desc = "Tree";
icon = "󰙅";
}
];
};
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
pkgs,
hostname,
username,
...
}:
{
options.programs.nixvim = lib.mkOption {
type = pkgs.lib.types.submoduleWith {
specialArgs = {
inherit pkgs hostname username;
};
modules = [
./plugins/strudel.nix
./plugins/tidal.nix
./aerial.nix
./auto-save.nix
./auto-format.nix
./harpoon.nix
./mergetool.nix
./lazygit.nix
./trouble.nix
./undotree.nix
./base/completion.nix
./base/coverage.nix
./base/diagnostics.nix
./base/find.nix
./base/formatting.nix
./base/leap.nix
./base/spellcheck.nix
./base/status-line.nix
./base/syntax.nix
./base/tree.nix
./languages/angular.nix
./languages/c.nix
./languages/css.nix
./languages/cue.nix
./languages/dart.nix
./languages/js.nix
./languages/lua.nix
./languages/nix.nix
./languages/python.nix
./languages/rust.nix
./languages/shell.nix
./languages/strudel.nix
./languages/svelte.nix
./remaps/half-page-scroll.nix
./remaps/no-accidental-macro.nix
./remaps/paste-keep-buffer.nix
./remaps/wrapped-line-nav.nix
];
};
};
}

View File

@@ -0,0 +1,58 @@
{ lib, config, ... }:
let
cfg = config.presets.harpoon;
in
{
options.presets.harpoon = {
enable = lib.mkEnableOption "Harpoon";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "hh";
mode = "n";
action = ":Telescope harpoon marks<CR>";
}
];
plugins = {
telescope.enable = true;
harpoon = {
enable = true;
enableTelescope = true;
keymaps = {
addFile = "hm";
navNext = "hn";
navPrev = "hp";
};
};
which-key.settings.spec = [
{
__unkeyed-1 = "h";
group = "Harpoon";
icon = "󱀺";
}
{
__unkeyed-1 = "hh";
desc = "Marks";
icon = "󰈢";
}
{
__unkeyed-1 = "hm";
desc = "Add File";
icon = "󱪝";
}
{
__unkeyed-1 = "hn";
desc = "Next";
icon = "";
}
{
__unkeyed-1 = "hp";
desc = "Prev";
icon = "";
}
];
};
};
}

View File

@@ -0,0 +1,58 @@
{ lib, config, ... }:
let
cfg = config.presets.languages.angular;
in
{
options.presets.languages.angular = {
enable = lib.mkEnableOption "Angular";
};
config = lib.mkIf cfg.enable {
plugins = {
lsp.enabledServers = [
{
name = "angularls";
extraOptions = {
cmd = [
"ngserver"
"--stdio"
"--tsProbeLocations"
""
"--ngProbeLocations"
""
];
on_new_config.__raw = # lua
''
function(new_config, new_root_dir)
new_config.cmd = {
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
"--stdio",
"--tsProbeLocations",
new_root_dir .. "/node_modules",
"--ngProbeLocations",
new_root_dir .. "/node_modules",
}
end
'';
filetypes = [
"typescript"
"html"
"typescriptreact"
"typescript.tsx"
"angular"
"html.angular"
];
on_attach.__raw = # lua
''
function(client, bufnr)
if vim.bo[bufnr].filetype == "html" then
vim.bo[bufnr].filetype = "angular"
end
end
'';
};
}
];
};
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
config,
...
}:
let
cfg = config.presets.languages.c;
in
{
options.presets.languages.c = {
enable = lib.mkEnableOption "C/C++";
cppcheck = lib.mkEnableOption "cppcheck";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft = {
c = [ "clang-format" ];
cpp = [ "clang-format" ];
};
none-ls = {
enable = true;
sources.diagnostics = {
cppcheck = lib.mkIf cfg.cppcheck {
enable = true;
};
};
};
lsp.servers = {
cmake.enable = true;
clangd = {
enable = true;
packageFallback = true;
cmd = [
"clangd"
"--offset-encoding=utf-16"
"--clang-tidy"
"--background-index"
"--limit-references=0"
"--cross-file-rename"
];
settings.InlayHints = {
Designators = true;
Enabled = true;
ParameterNames = true;
DeducedTypes = true;
};
};
};
};
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.languages.css;
in
{
options.presets.languages.css = {
enable = lib.mkEnableOption "CSS";
stylelint = lib.mkEnableOption "stylelint";
};
config = lib.mkIf cfg.enable {
plugins = {
none-ls = lib.mkIf cfg.stylelint {
enable = true;
sources = {
diagnostics.stylelint.enable = true;
formatting.stylelint.enable = true;
};
};
lsp.servers.cssls.enable = true;
};
extraPackages = lib.mkIf cfg.stylelint [ pkgs.nodePackages.stylelint ];
};
}

View File

@@ -0,0 +1,16 @@
{ lib, config, ... }:
let
cfg = config.presets.languages.cue;
in
{
options.presets.languages.cue = {
enable = lib.mkEnableOption "CUE";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.cue = [ "cue_fmt" ];
lsp.servers.cue.enable = true;
};
};
}

View File

@@ -0,0 +1,16 @@
{ lib, config, ... }:
let
cfg = config.presets.languages.dart;
in
{
options.presets.languages.dart = {
enable = lib.mkEnableOption "Dart";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.dart = [ "dart_format" ];
lsp.servers.dartls.enable = true;
};
};
}

View File

@@ -0,0 +1,75 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.languages.js;
in
{
options.presets.languages.js = {
enable = lib.mkEnableOption "JS";
eslint = lib.mkEnableOption "ESLint";
npm = lib.mkEnableOption "NPM package completion";
};
config = lib.mkIf cfg.enable {
extraConfigLua =
lib.mkIf cfg.npm # lua
''
require("cmp-npm").setup({})
'';
plugins = {
lspkind = lib.mkIf cfg.npm {
cmp.after = # lua
''
function(entry, vim_item, kind)
if entry.source.name == "npm" then
kind.kind = ""
kind.kind_hl_group = "CmpItemKindNpm"
end
kind.kind = kind.kind .. " "
return kind
end
'';
};
cmp.settings.sources = lib.mkIf cfg.npm [
{
name = "npm";
keywordLength = 4;
priority = 10;
}
];
lsp.servers = {
ts_ls = {
enable = true;
settings = {
typescript.inlayHints = {
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayVariableTypeHints = true;
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayEnumMemberValueHints = true;
};
javascript.inlayHints = {
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayVariableTypeHints = true;
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayEnumMemberValueHints = true;
};
};
};
eslint.enable = lib.mkIf cfg.eslint true;
};
};
extraPackages = [ pkgs.nodePackages.typescript-language-server ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.languages.lua;
in
{
options.presets.languages.lua = {
enable = lib.mkEnableOption "Lua";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.lua = [ "stylua" ];
lsp.servers.lua_ls.enable = true;
};
extraPackages = [ pkgs.stylua ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
pkgs,
hostname,
config,
...
}:
let
cfg = config.presets.languages.nix;
in
{
options.presets.languages.nix = {
enable = lib.mkEnableOption "Nix";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.nix = [ "nixfmt" ];
lsp.servers = {
nixd = {
enable = true;
settings = {
nixpkgs.expr = # nix
"import (builtins.getFlake (builtins.toString ./.)).inputs.nixpkgs { }";
formatting.command = [ "nixfmt" ];
options = {
nixos.expr = # nix
"(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${hostname}.options";
home-manager.expr = # nix
"(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${hostname}.options.home-manager.users.type.getSubOptions []";
};
};
};
nil_ls = {
enable = false;
settings = {
formatting.command = [ "nixfmt" ];
nix = {
maxMemoryMB = 8192;
flake.autoEvalInputs = true;
};
};
};
};
};
extraPackages = [ pkgs.nixfmt-rfc-style ];
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.languages.python;
in
{
options.presets.languages.python = {
enable = lib.mkEnableOption "Python";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.python = [ "black" ];
lsp.servers.pyright.enable = true;
};
extraPackages = [ pkgs.black ];
};
}

View File

@@ -0,0 +1,42 @@
{ lib, config, ... }:
let
cfg = config.presets.languages.rust;
in
{
options.presets.languages.rust = {
enable = lib.mkEnableOption "Rust";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.rust = [ "rustfmt" ];
lsp.servers.rust_analyzer = {
enable = true;
installCargo = false;
installRustc = false;
settings.inlayHints = {
bindingModeHints.enable = false;
chainingHints.enable = true;
closingBraceHints = {
enable = true;
minLines = 25;
};
closureReturnTypeHints.enable = "never";
lifetimeElisionHints = {
enable = "never";
useParameterNames = false;
};
maxLength = 25;
parameterHints.enable = true;
reborrowHints.enable = "never";
renderColons = true;
typeHints = {
enable = true;
hideClosureInitialization = false;
hideNamedConstructor = false;
};
};
};
};
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.languages.shell;
in
{
options.presets.languages.shell = {
enable = lib.mkEnableOption "Shell/Bash";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.sh = [ "shfmt" ];
lsp.servers.bashls.enable = true;
};
extraPackages = [ pkgs.shfmt ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.languages.strudel;
in
{
options.presets.languages.strudel = {
enable = lib.mkEnableOption "Strudel";
};
config = lib.mkIf cfg.enable {
plugins = {
strudel.enable = true;
web-devicons.customIcons = {
str = {
icon = " ";
color = "#34E2E1";
cterm_color = "14";
name = "Strudel";
};
};
};
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
config,
...
}:
let
cfg = config.presets.languages.svelte;
in
{
options.presets.languages.svelte = {
enable = lib.mkEnableOption "Svelte";
};
config = lib.mkIf cfg.enable {
plugins.lsp.servers.svelte = {
enable = true;
settings.typescript.inlayHints = {
parameterNames.enabled = "all";
parameterTypes.enabled = true;
variableTypes.enabled = true;
propertyDeclarationTypes.enabled = true;
functionLikeReturnTypes.enabled = true;
enumMemberValues.enabled = true;
};
};
};
}

View File

@@ -0,0 +1,79 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.lazygit;
in
{
options.presets.lazygit = {
enable = lib.mkEnableOption "LazyGit";
toggleBind = lib.mkOption {
type = lib.types.str;
default = "<leader>g";
};
commandName = lib.mkOption {
type = lib.types.str;
default = "ToggleLazyGit";
};
};
config = lib.mkIf cfg.enable {
extraConfigLua = # lua
''
LazygitTerminal = require("toggleterm.terminal").Terminal:new({
cmd = "${lib.getExe pkgs.lazygit}",
dir = "git_dir",
direction = "float",
on_open = function(term)
vim.cmd("startinsert!")
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
end,
on_close = function(_)
vim.cmd("startinsert!")
end,
})
function LazygitToggle()
lazygit:toggle()
end
'';
userCommands.${cfg.commandName}.command.__raw = # lua
''
function()
LazygitTerminal:toggle()
end
'';
keymaps = [
{
key = cfg.toggleBind;
mode = "n";
options.silent = true;
action = "<cmd>:${cfg.commandName}<CR>";
}
];
plugins = {
toggleterm = {
enable = true;
settings = {
direction = lib.mkDefault "vertical";
size = lib.mkDefault 60;
};
};
which-key.settings.spec = [
{
__unkeyed-1 = cfg.toggleBind;
desc = "Git";
icon = "";
}
];
};
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.mergetool;
in
{
options.presets.mergetool = {
enable = lib.mkEnableOption "Mergetool";
};
config = lib.mkIf cfg.enable {
globals = {
mergetool_layout = "mr";
mergetool_prefer_revision = "local";
};
extraPlugins = [ pkgs.vimPlugins.vim-mergetool ];
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.plugins.mkNeovimPlugin {
name = "strudel";
package = "strudel-nvim";
maintainers = [ lib.maintainers.theaninova ];
description = "A Neovim based strudel.cc controller, live coding using Strudel from Neovim.";
settingsOptions = {
ui = {
maximise_menu_panel = defaultNullOpts.mkBool true ''
Maximise the menu panel
'';
hide_menu_panel = defaultNullOpts.mkBool false ''
Hide the Strudel menu panel (and handle)
'';
hide_top_bar = defaultNullOpts.mkBool false ''
Hide the default Strudel top bar (controls)
'';
hide_code_editor = defaultNullOpts.mkBool false ''
Hide the Strudel code editor
'';
hide_error_display = defaultNullOpts.mkBool false ''
Hide the Strudel eval error display under the editor
'';
};
start_on_launch = defaultNullOpts.mkBool true ''
Automatically start playback when launching Strudel
'';
update_on_save = defaultNullOpts.mkBool false ''
Set to `true` to automatically trigger the code evaluation after saving the buffer content
Only works if the playback was already started (doesn't start the playback on save)
'';
sync_cursor = defaultNullOpts.mkBool true ''
Enable two-way cursor position sync between Neovim and Strudel editor
'';
report_eval_errors = defaultNullOpts.mkBool true ''
Report evaluation errors from Strudel as Neovim notifications
'';
custom_css_file = defaultNullOpts.mkStr null ''
Path to a custom CSS file to style the Strudel web editor (base64-encoded and injected at launch)
This allows you to override or extend the default Strudel UI appearance
'';
headless = defaultNullOpts.mkBool false ''
Headless mode: set to `true` to run the browser without launching a window
'';
browser_data_dir = defaultNullOpts.mkStr "~/.cache/strudel-nvim/" ''
Path to the directory where Strudel browser user data (cookies, sessions, etc.) is stored
'';
browser_exec_path = defaultNullOpts.mkStr null ''
Path to a (chromium-based) browser executable of choice
'';
};
}

View File

@@ -0,0 +1,13 @@
{
lib,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.plugins.mkVimPlugin {
name = "vim-tidal";
package = "vim-tidal";
maintainers = [ lib.maintainers.theaninova ];
description = "Vim plugin for TidalCycles";
}

View File

@@ -0,0 +1,22 @@
{ lib, config, ... }:
let
cfg = config.presets.remaps.half-page-scroll;
in
{
options.presets.remaps.half-page-scroll = {
enable = lib.mkEnableOption "half page scroll";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "<C-d>";
action = "<C-d>zz";
}
{
key = "<C-u>";
action = "<C-u>zz";
}
];
};
}

View File

@@ -0,0 +1,19 @@
{ lib, config, ... }:
let
cfg = config.presets.remaps.no-accidental-macro;
in
{
options.presets.remaps.no-accidental-macro = {
enable = lib.mkEnableOption "no accidental macro";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "Q";
mode = "n";
action = "<nop>";
}
];
};
}

View File

@@ -0,0 +1,33 @@
{ lib, config, ... }:
let
cfg = config.presets.remaps.paste-keep-buffer;
in
{
options.presets.remaps.paste-keep-buffer = {
enable = lib.mkEnableOption "paste in visual keeps the buffer";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "p";
mode = "v";
action = ''"_dP'';
}
{
key = "<leader>p";
action = ''"_dP'';
}
];
plugins.which-key = {
enable = true;
settings.spec = [
{
__unkeyed-1 = "<leader>p";
desc = "Paste Keep Buffer";
icon = "";
}
];
};
};
}

View File

@@ -0,0 +1,22 @@
{ lib, config, ... }:
let
cfg = config.presets.remaps.wrapped-line-nav;
in
{
options.presets.remaps.wrapped-line-nav = {
enable = lib.mkEnableOption "Navigate wrapped lines up and down";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "<up>";
action = "g<up>";
}
{
key = "<down>";
action = "g<down>";
}
];
};
}

View File

@@ -0,0 +1,83 @@
{ lib, config, ... }:
let
cfg = config.presets.trouble;
in
{
options.presets.trouble = {
enable = lib.mkEnableOption "trouble";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "<leader>xx";
mode = "n";
action.__raw = # lua
"function() require('trouble').toggle('diagnostics') end";
}
{
key = "<leader>xw";
mode = "n";
action.__raw = # lua
"function() require('trouble').toggle('workspace_diagnostics') end";
}
{
key = "<leader>xd";
mode = "n";
action.__raw = # lua
"function() require('trouble').toggle('document_diagnostics') end";
}
{
key = "<leader>xq";
mode = "n";
action.__raw = # lua
"function() require('trouble').toggle('quickfix') end";
}
{
key = "<leader>xl";
mode = "n";
action.__raw = # lua
"function() require('trouble').toggle('loclist') end";
}
];
plugins = {
web-devicons.enable = true;
trouble.enable = true;
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>x";
group = "Trouble";
icon = {
icon = "";
color = "red";
};
}
{
__unkeyed-1 = "<leader>xx";
desc = "Toggle";
icon = "󰺲";
}
{
__unkeyed-1 = "<leader>xw";
desc = "Workspace Diagnostics";
icon = "󰙅";
}
{
__unkeyed-1 = "<leader>xd";
desc = "Document Diagnostics";
icon = "󱪗";
}
{
__unkeyed-1 = "<leader>xq";
desc = "Quickfix";
icon = "";
}
{
__unkeyed-1 = "<leader>xl";
desc = "Loclist";
icon = "󰷐";
}
];
};
};
}

View File

@@ -0,0 +1,34 @@
{ lib, config, ... }:
let
cfg = config.presets.undotree;
in
{
options.presets.undotree = {
enable = lib.mkEnableOption "Undotree";
};
config = lib.mkIf cfg.enable {
opts = {
undodir.__raw = # lua
"os.getenv('HOME') .. '/.config/nvim/undodir'";
undofile = true;
};
keymaps = [
{
key = "<leader>u";
mode = "n";
action = "<cmd>:UndotreeToggle<CR>";
}
];
plugins = {
undotree.enable = true;
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>u";
desc = "Undotree";
icon = "󰕌";
}
];
};
};
}

View File

@@ -1,56 +1,71 @@
{ pkgs, ... }:
{
xdg.configFile."ranger/rc.conf".source = ./ranger.conf;
services.flatpak.packages = [
{
flatpakref = "https://releases.threema.ch/flatpak/threema-desktop/ch.threema.threema-desktop.flatpakref";
sha256 = "0lghiiiphbkqgiprqirxifldvix0j4k04jh1z9f911shrzjgqq4s";
}
];
programs.mpv.enable = true;
home.packages = with pkgs; [
# nix
cachix
lorri
# lorri
vulnix
gccdiag
# browsers
firefox
chromium
brave
# media
jellyfin-media-player
youtube-dl
# tartube
yt-dlp
f3d
mpv
jellyfin-mpv-shim
makemkv
libfaketime
handbrake
metadata-cleaner
#bitwarden
mediainfo
mediainfo-gui
prismlauncher
# chat apps
(import ./threema-desktop.nix { inherit pkgs; })
(vesktop.override { withSystemVencord = false; })
element-desktop
# vesktop
discord
thunderbird
signal-desktop
# cinny-desktop
# office
libreoffice
apostrophe # markdown editor
apostrophe
# creative
gimp
gimp3
inkscape-with-extensions
scribus
# scribus
audacity
pinta
kdePackages.kdenlive
losslesscut-bin
shotcut
blender-hip
# development
insomnia
avalonia-ilspy
ghidra
ida-free
# utils
libqalculate
ranger
neofetch
filezilla
yubikey-manager
(pkgs.writeShellApplication {
name = "fix-yubikey";
text = ''
gpg-connect-agent --hex "scd apdu 00 f1 00 00" /bye
'';
})
];
}

View File

@@ -1,8 +0,0 @@
{ pkgs }:
pkgs.threema-desktop.overrideAttrs (prev: {
postFixup =
prev.postFixup
+ ''
echo "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" >> $out/bin/threema
'';
})

View File

@@ -1,5 +1,9 @@
{ pkgs, ... }:
{
services.flatpak.update.auto = {
enable = true;
onCalendar = "weekly";
};
programs = {
home-manager.enable = true;
rbw = {
@@ -10,9 +14,6 @@
pinentry = pkgs.pinentry-gnome3;
};
};
git = import ./git.nix;
nixvim = import ./nixvim { inherit pkgs; };
firefox = import ./firefox.nix { inherit pkgs; };
gpg.enable = true;
btop = {
enable = true;
@@ -32,13 +33,15 @@
src = zsh-nix-shell;
}
];
initExtraFirst = ''
if [[ -r "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
source "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
fi
[[ ! -f ${./.p10k.zsh} ]] || source ${./.p10k.zsh}
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
'';
initContent =
pkgs.lib.mkBefore # sh
''
if [[ -r "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
source "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
fi
[[ ! -f ${./.p10k.zsh} ]] || source ${./.p10k.zsh}
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
'';
};
direnv = {
enable = true;

View File

@@ -1,81 +0,0 @@
{ pkgs }:
{
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
CaptivePortal = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DisableFirefoxAccounts = true;
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = false;
FirefoxHome = {
Search = true;
Pocket = false;
Snippets = false;
TopSites = true;
Highlights = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
};
};
profiles.default = {
id = 0;
name = "default";
isDefault = true;
bookmarks = [
{
name = "Monkeytype";
url = "https://monkeytype.com/";
}
{
name = "YouTube";
url = "https://youtube.com/";
}
];
search = {
force = true;
default = "Google";
engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [ { template = "https://nixos.wiki/index.php?search={searchTerms}"; } ];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@nw" ];
};
"Wikipedia (en)".metaData.alias = "@wiki";
};
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
ublacklist
sponsorblock
bitwarden
];
};
}

View File

@@ -1,23 +1,28 @@
{ ... }:
{
enable = true;
userName = "Thea Schöbl";
userEmail = "dev@theaninova.de";
signing = {
key = "6C9E EFC5 1AE0 0131 78DE B9C8 68FF FB1E C187 88CA";
signByDefault = true;
};
extraConfig = {
pull.rebase = true;
merge = {
tool = "nvim-mergetool";
conflictstyle = "diff3";
programs.git = {
enable = true;
signing = {
key = "6C9E EFC5 1AE0 0131 78DE B9C8 68FF FB1E C187 88CA";
signByDefault = true;
};
mergetool.nvim-mergetool = {
cmd = ''
nvim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE"
'';
trustExitCode = true;
settings = {
user = {
email = "dev@theaninova.de";
name = "Thea Schöbl";
};
pull.rebase = true;
init.defaultBranch = "main";
merge = {
tool = "nvim-mergetool";
conflictstyle = "diff3";
};
mergetool.nvim-mergetool = {
cmd = # sh
''nvim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE"'';
trustExitCode = true;
};
mergetool.prompt = false;
};
mergetool.prompt = false;
};
}

View File

@@ -1,5 +1,48 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.neovide ];
xdg.configFile."neovide/config.toml".source = ./neovide.toml;
xdg.configFile."neovide/config.toml".source = (pkgs.formats.toml { }).generate "neovide" {
maximized = false;
fork = true;
font = {
normal = [ "FiraCode Nerd Font" ];
size = 12;
edging = "subpixelantialias";
hinting = "full";
features."FiraCode Nerd Font" = [
"+zero"
"+onum"
"+ss04"
"+cv19"
"+cv23"
"+ss09"
"+cv26"
"+ss06"
"+ss10"
];
};
box-drawing = {
mode = "native";
sizes.default = [
1
3
];
};
};
wayland.windowManager.hyprland.settings.windowrulev2 = [
# For some reason it really wants to be maximized
"suppressevent maximize,class:^(neovide)$"
];
programs.nixvim = {
globals = {
neovide_text_gamma = 0.0;
neovide_text_contrast = 0.0;
neovide_position_animation_length = 0.3;
neovide_remember_window_size = false;
neovide_hide_mouse_when_typing = true;
experimental_layer_grouping = true;
neovide_cursor_vfx_mode = "pixiedust";
neovide_cursor_trail_size = 0.7;
};
};
}

View File

@@ -1,20 +0,0 @@
maximized = false
srgb = true
[font]
normal = ["FiraCode Nerd Font"]
size = 16
edging = "subpixelantialias"
[font.features]
"FiraCode Nerd Font" = [
"+zero",
"+onum",
"+ss04",
"+cv19",
"+cv23",
"+ss09",
"+ss06",
"+ss07",
"+ss10",
]

View File

@@ -0,0 +1,127 @@
{ ... }:
{
programs.nixvim = {
enable = true;
defaultEditor = true;
vimAlias = true;
opts = {
number = true;
relativenumber = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
expandtab = true;
smartindent = true;
signcolumn = "yes";
scrolloff = 12;
hlsearch = false;
incsearch = true;
ignorecase = true;
smartcase = true;
updatetime = 50;
fillchars.eob = " ";
};
clipboard = {
register = "unnamedplus";
providers.wl-copy.enable = true;
};
globals.mapleader = ";";
presets = {
auto-save.enable = true;
auto-format.enable = true;
lazygit.enable = true;
mergetool.enable = true;
undotree.enable = true;
aerial.enable = true;
base = {
completion = {
enable = true;
copilot = true;
};
diagnostics.enable = true;
coverage.enable = false;
find.enable = true;
formatting = {
enable = true;
prettier = true;
};
leap.enable = true;
spellcheck.enable = true;
status-line.enable = true;
syntax.enable = true;
tree.enable = true;
};
languages = {
c.enable = true;
css = {
enable = true;
stylelint = true;
};
cue.enable = true;
dart.enable = true;
js = {
enable = true;
eslint = true;
npm = true;
};
lua.enable = true;
nix.enable = true;
python.enable = true;
rust.enable = true;
shell.enable = true;
strudel.enable = true;
svelte.enable = true;
};
remaps = {
half-page-scroll.enable = true;
no-accidental-macro.enable = true;
paste-keep-buffer.enable = true;
wrapped-line-nav.enable = true;
};
};
plugins = {
which-key.enable = true;
schemastore.enable = true;
todo-comments.enable = true;
origami.enable = false;
nvim-surround.enable = true;
fidget.enable = true;
vim-tidal.enable = true;
treesitter-context = {
enable = false; # TODO: looks weird with Neovide
settings.line_numbers = false;
};
lsp.servers = {
html.enable = true;
svelte.enable = true;
dockerls.enable = true;
yamlls = {
enable = true;
settings.customTags = [
"!if mapping"
"!any sequence"
"!not scalar"
"!flat sequence"
"!repeat mapping"
"!param scalar"
"!macro mapping"
];
};
jsonls.enable = true;
taplo.enable = true;
};
};
};
}

View File

@@ -1,65 +0,0 @@
function(colors)
return {
CmpItemKindCopilot = { fg = colors.teal },
CmpItemKindNpm = { fg = colors.maroon },
-- IntelliJ Theme
Constant = { fg = colors.mauve },
Character = { link = "Keyword" },
Number = { fg = colors.sapphire },
Boolean = { link = "Keyword" },
Identifier = { fg = colors.text },
Function = { fg = colors.blue },
Statement = { fg = colors.text },
Conditional = { link = "Keyword" },
Repeat = { link = "Keyword" },
Label = { link = "Keyword" },
Operator = { fg = colors.text },
Keyword = { fg = colors.peach },
Exception = { link = "Keyword" },
Include = { link = "Keyword" },
Structure = { fg = colors.yellow },
Type = { fg = colors.teal },
SpellBad = { sp = colors.green, style = { "underdotted" } },
SpellCap = { sp = colors.green, style = { "underdotted" } },
SpellLocal = { sp = colors.green, style = { "underdotted" } },
SpellRare = { sp = colors.green, style = { "underdotted" } },
["@constructor"] = { link = "Keyword" },
["@constructor.typescript"] = { link = "@constructor" },
["@parameter"] = { link = "Identifier" },
["@tag"] = { link = "Structure" },
["@tag.delimiter"] = { link = "Structure" },
["@tag.attribute"] = { fg = colors.mauve, style = { "italic" } }, -- Constant
["@keyword.function"] = { link = "Keyword" },
["@keyword.operator"] = { link = "Keyword" },
["@keyword.return"] = { link = "Keyword" },
["@keyword.export"] = { link = "Keyword" },
["@punctuation.special"] = { link = "Operator" },
["@conditional.ternary"] = { link = "Operator" },
["@type.builtin"] = { link = "Keyword" },
["@variable.builtin"] = { link = "Keyword" },
["@lsp.typemod.class.defaultLibrary"] = { fg = colors.yellow, style = { "bold" } }, -- Structure
["@lsp.typemod.variable.defaultLibrary"] = { fg = colors.mauve, style = { "bold" } }, -- Constant
["@lsp.typemod.function.defaultLibrary"] = { fg = colors.blue, style = { "bold" } }, -- Function
["@variable"] = { link = "Constant" },
["@field"] = { link = "Constant" },
["@label.json"] = { link = "Constant" },
["@label.jsonc"] = { link = "Constant" },
["@property"] = { link = "Constant" },
["@property.typescript"] = { link = "@property" },
["@lsp.type.property"] = { link = "Constant" },
["@lsp.type.interface"] = { link = "Structure" },
["@lsp.type.namespace"] = { link = "Structure" },
["@attribute.typescript"] = { link = "Structure" },
["@lsp.mod.local"] = { fg = colors.text },
["@lsp.mod.readonly"] = { style = { "italic" } },
}
end

View File

@@ -1,482 +0,0 @@
{ pkgs }:
let
darkman = pkgs.vimUtils.buildVimPlugin {
name = "darkman";
src = pkgs.buildGoModule rec {
pname = "darkman.nvim";
version = "0.0.1";
vendorHash = "sha256-HpyKzvKVN9hVRxxca4sdWRo91H32Ha9gxitr7Qg5MY8=";
src = pkgs.fetchFromGitHub {
owner = "4e554c4c";
repo = "darkman.nvim";
rev = "150aa63a13837c44abd87ff20d3a806321a17b2d";
sha256 = "sha256-ssEYdM460I1rufjgh63CEkLi4K+bEWbwku/6gQbytno=";
};
postInstall = ''
cp -r lua $out
'';
};
};
in
{
enable = true;
defaultEditor = true;
vimAlias = true;
opts = {
number = true;
relativenumber = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
expandtab = true;
smartindent = true;
signcolumn = "yes";
undodir = {
__raw = "os.getenv('HOME') .. '/.config/nvim/undodir'";
};
undofile = true;
scrolloff = 12;
termguicolors = true;
hlsearch = false;
incsearch = true;
updatetime = 50;
fillchars.eob = " ";
};
keymaps = import ./keymaps.nix;
globals = {
minimap_width = 10;
minimap_auto_start = 1;
minimap_auto_start_win_enter = 1;
minimap_close_buftypes = [ "nofile" ];
minimap_block_filetypes = [ "NvimTree" ];
mapleader = ";";
mergetool_layout = "mr";
mergetool_prefer_revision = "local";
neovide_transparency = 0.8;
neovide_padding_top = 10;
neovide_padding_bottom = 10;
neovide_padding_left = 10;
neovide_padding_right = 10;
neovide_floating_blur_amount_x = 10;
neovide_floating_blur_amount_y = 10;
neovide_floating_shadow = false;
neovide_cursor_vfx_mode = "pixiedust";
};
clipboard = {
register = "unnamedplus";
providers.wl-copy.enable = true;
};
extraConfigVim = ''
if !exists("g:neovide")
hi Normal guibg=NONE ctermbg=NONE
endif
set noshowmode
'';
extraConfigLua = builtins.readFile ./extra-config.lua;
colorschemes.catppuccin = {
enable = true;
settings = {
term_colors = true;
transparent_background = true;
background = {
dark = "frappe";
light = "latte";
};
integrations.native_lsp.underlines = {
errors = [ "undercurl" ];
warnings = [ "undercurl" ];
};
custom_highlights = builtins.readFile ./custom-highlights.lua;
};
};
plugins = {
lualine = {
enable = true;
theme = "catppuccin";
globalstatus = true;
sectionSeparators = {
left = "";
right = "";
};
componentSeparators = {
left = "";
right = "";
};
sections = {
lualine_a = [
{
name = "mode";
separator = {
right = "";
left = "";
};
icon = "";
}
];
lualine_x = [
"(vim.g.disable_autoformat or vim.b.disable_autoformat) and '󱌓' or nil"
{ name = "filetype"; }
];
lualine_z = [
{
name = "location";
separator = {
right = "";
left = "";
};
}
];
};
};
auto-save = {
enable = true;
triggerEvents = [
"FocusLost"
"BufLeave"
];
};
indent-blankline = {
enable = true;
settings = {
indent.char = "";
scope.show_start = false;
};
};
illuminate.enable = true;
nvim-autopairs.enable = true;
nvim-colorizer.enable = true;
neo-tree = {
enable = true;
filesystem.filteredItems.visible = true;
eventHandlers = {
file_opened = ''
function()
require('neo-tree').close_all()
end
'';
};
};
undotree.enable = true;
notify = {
enable = true;
backgroundColour = "#000000";
};
toggleterm = {
enable = true;
settings = {
direction = "vertical";
size = 60;
};
};
luasnip.enable = true;
ts-autotag.enable = true;
leap.enable = true;
harpoon = {
enable = true;
enableTelescope = true;
keymaps = {
addFile = "hm";
navNext = "hn";
navPrev = "hp";
};
};
telescope = {
enable = true;
keymaps = {
"<leader>ff" = "git_files";
"<leader>fa" = "find_files";
"<leader>fg" = "live_grep";
"<leader>fb" = "buffers";
"<leader>sr" = "lsp_references";
"<leader>sd" = "lsp_definitions";
"<leader>si" = "lsp_implementations";
"<leader>ss" = "lsp_document_symbols";
"<leader>sw" = "lsp_workspace_symbols";
"<leader>st" = "lsp_type_definitions";
"<leader>sh" = "diagnostics";
};
};
trouble = {
enable = true;
settings.use_diagnostic_signs = true;
};
treesitter = {
enable = true;
indent = true;
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
nixvimInjections = true;
};
conform-nvim = {
enable = true;
formattersByFt = {
lua = [ "stylua" ];
javascript = [ "prettier" ];
markdown = [ "prettier" ];
typescript = [ "prettier" ];
json = [ "prettier" ];
yaml = [ "prettier" ];
html = [ "prettier" ];
angular = [ "prettier" ];
css = [ "prettier" ];
scss = [ "prettier" ];
less = [ "prettier" ];
svelte = [ "prettier" ];
rust = [ "rustfmt" ];
bash = [ "shfmt" ];
nix = [ "nixfmt" ];
};
formatOnSave = ''
function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
return { timeout_ms = 500, lsp_fallback = true };
end
'';
};
none-ls = {
enable = true;
sources = {
diagnostics.stylelint.enable = true;
formatting.stylelint.enable = true;
};
};
lsp = {
enable = true;
keymaps = {
diagnostic = { };
};
enabledServers = [
{
name = "angularls";
extraOptions = {
cmd = [
"ngserver"
"--stdio"
"--tsProbeLocations"
""
"--ngProbeLocations"
""
];
on_new_config = {
__raw = ''
function(new_config, new_root_dir)
new_config.cmd = {
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
"--stdio",
"--tsProbeLocations",
new_root_dir .. "/node_modules",
"--ngProbeLocations",
new_root_dir .. "/node_modules",
}
end
'';
};
filetypes = [
"typescript"
"html"
"typescriptreact"
"typescript.tsx"
"angular"
"html.angular"
];
on_attach = {
__raw = ''
function(client, bufnr)
if vim.bo[bufnr].filetype == "html" then
vim.bo[bufnr].filetype = "angular"
end
end
'';
};
};
}
];
servers = {
html.enable = true;
cssls.enable = true;
svelte.enable = true;
tsserver.enable = true;
eslint.enable = true;
dockerls.enable = true;
yamlls.enable = true;
jsonls.enable = true;
taplo.enable = true;
rust-analyzer = {
enable = true;
installCargo = false;
installRustc = false;
};
pylsp.enable = true;
clangd = {
enable = true;
cmd = [
"clangd"
"--offset-encoding=utf-16"
];
};
nil_ls.enable = true;
lua-ls.enable = true;
bashls.enable = true;
};
};
lspkind = {
enable = true;
mode = "symbol_text";
cmp = {
after = ''
function(entry, vim_item, kind)
if entry.source.name == "npm" then
kind.kind = ""
kind.kind_hl_group = "CmpItemKindNpm"
end
kind.kind = kind.kind .. " "
return kind
end
'';
};
symbolMap = {
Copilot = "";
};
};
cmp = {
enable = true;
settings = {
mapping = {
"<C-n>" = "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
"<C-p>" = "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
"<C-Space>" = "cmp.mapping.confirm({select = true})";
"<C-Enter>" = "cmp.mapping.complete()";
};
sources = [
{ name = "path"; }
{ name = "luasnip"; }
{
name = "npm";
keywordLength = 4;
priority = 10;
}
{ name = "nvim_lsp"; }
{ name = "nvim_lsp_signature_help"; }
{ name = "nvim_lsp_document_symbol"; }
];
formatting.fields = [
"abbr"
"kind"
];
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
window = {
completion.border = "rounded";
documentation.border = "rounded";
};
};
};
which-key = {
enable = true;
registrations = {
"<leader>p" = "Paste Keep Buffer";
"<leader>n" = "Hover";
"<leader>g" = "Git";
"<leader>u" = "Undotree";
"<leader>s" = {
name = "LSP";
r = "References";
d = "Definitions";
i = "Implementations";
s = "Document Symbols";
w = "Workspace Symbols";
t = "Type Definitions";
h = "Diagnostics";
a = "Code Actions";
f = "Auto Formatting";
x = "LSP Format";
};
"<leader>x" = {
name = "Trouble";
x = "Toggle";
w = "Workspace Diagnostics";
d = "Document Diagnostics";
q = "Quickfix";
l = "Loclist";
};
"<leader>f" = {
name = "Find";
t = "Tree";
f = "File";
a = "Untracked Files";
g = "Grep";
b = "Buffer";
};
h = {
name = "Harpoon";
m = "Mark";
n = "Next";
p = "Prev";
};
};
};
copilot-lua = {
enable = true;
suggestion.autoTrigger = true;
};
openscad = {
enable = true;
fuzzyFinder = "fzf";
};
nix.enable = true;
};
extraPackages = [
pkgs.nodePackages.typescript-language-server
pkgs.nodePackages.stylelint
pkgs.nodePackages.prettier
pkgs.jq
pkgs.html-tidy
pkgs.nixfmt-rfc-style
pkgs.stylua
pkgs.shfmt
pkgs.fzf
];
extraPlugins = with pkgs.vimPlugins; [
vim-mergetool
darkman
rest-nvim
plenary-nvim
actions-preview-nvim
];
}

View File

@@ -1,70 +0,0 @@
require("darkman").setup()
require("cmp-npm").setup({})
require("rest-nvim").setup({})
require("actions-preview").setup({})
if vim.g.neovide then
vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "*",
callback = function()
local flavour = require("catppuccin").options.background[vim.o.background]
local palette = require("catppuccin.palettes").get_palette(flavour)
vim.cmd("hi Normal guibg=" .. palette.base)
vim.cmd("set pumblend=100")
end,
})
-- no idea why this is needed
vim.opt.linespace = -1
end
local signs = {
{ name = "DiagnosticSignError", text = "" },
{ name = "DiagnosticSignWarn", text = "" },
{ name = "DiagnosticSignHint", text = "󰌵" },
{ name = "DiagnosticSignInfo", text = "" },
}
for _, sign in ipairs(signs) do
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
end
vim.diagnostic.config({
virtual_text = true,
signs = true,
underline = true,
update_in_insert = true,
severity_sort = false,
})
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
local Terminal = require("toggleterm.terminal").Terminal
local lazygit = Terminal:new({
cmd = "lazygit",
dir = "git_dir",
direction = "float",
on_open = function(term)
vim.cmd("startinsert!")
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
end,
on_close = function(term)
vim.cmd("startinsert!")
end,
})
function _lazygit_toggle()
lazygit:toggle()
end
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", { noremap = true, silent = true })
vim.api.nvim_create_user_command("ConformToggle", function(args)
if args.bang then
vim.b.disable_autoformat = not vim.b.disable_autoformat
else
vim.g.disable_autoformat = not vim.g.disable_autoformat
end
end, {
desc = "Disable autoformat-on-save",
bang = true,
})

View File

@@ -1,112 +0,0 @@
[
{
key = "<leader>u";
mode = "n";
action = "<cmd>:UndotreeToggle<CR>";
}
# Find/Navigate
{
key = "<leader>ft";
action = "<cmd>:Neotree toggle<CR>";
}
{
key = "J";
mode = "v";
action = ":m '>+1<CR>gv=gv";
}
{
key = "K";
mode = "v";
action = ":m '<-2<CR>gv=gv";
}
{
key = "<C-d>";
mode = "n";
action = "<C-d>zz";
}
{
key = "<C-u>";
mode = "n";
action = "<C-u>zz";
}
{
key = "<leader>p";
mode = "x";
action = ''"_dP'';
}
{
key = "<leader>p";
mode = "n";
action = ''"_dP'';
}
{
key = "<leader>p";
mode = "v";
action = ''"_dP'';
}
{
key = "<leader>n";
mode = "n";
options.silent = true;
action = "vim.lsp.buf.hover";
lua = true;
}
{
key = "hh";
mode = "n";
action = ":Telescope harpoon marks<CR>";
}
# LSP Actions
{
key = "<leader>sa";
mode = "n";
options.silent = true;
lua = true;
action = "require('actions-preview').code_actions";
}
{
key = "<leader>sf";
mode = "n";
options.silent = true;
action = "<cmd>:ConformToggle<CR>";
}
{
key = "<leader>sx";
mode = "n";
options.silent = true;
lua = true;
action = "vim.lsp.buf.format";
}
# Trouble
{
key = "<leader>xx";
mode = "n";
lua = true;
action = "require('trouble').toggle";
}
{
key = "<leader>xw";
mode = "n";
lua = true;
action = "function() require('trouble').toggle('workspace_diagnostics') end";
}
{
key = "<leader>xd";
mode = "n";
lua = true;
action = "function() require('trouble').toggle('document_diagnostics') end";
}
{
key = "<leader>xq";
mode = "n";
lua = true;
action = "function() require('trouble').toggle('quickfix') end";
}
{
key = "<leader>xl";
mode = "n";
lua = true;
action = "function() require('trouble').toggle('loclist') end";
}
]

View File

@@ -4,7 +4,7 @@
gpg-agent = {
enable = true;
enableSshSupport = true;
pinentryPackage = pkgs.pinentry-gnome3;
pinentry.package = pkgs.pinentry-gnome3;
};
# fix pinentry on non-gnome with this in
# the system config: services.dbus.packages = with pkgs; [ gcr ];

View File

@@ -1,39 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.shell.asztal;
in
{
options.shell.asztal = {
enable = mkEnableOption (mdDoc "Enable a shell based on AGS");
};
config = mkIf cfg.enable {
systemd.user.services.asztal = {
Unit = {
Description = "asztal";
PartOf = [
"graphical-session.target"
"tray.target"
];
};
Service = {
ExecStart = "${pkgs.asztal}/bin/asztal";
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
Restart = "always";
KillMode = "mixed";
Environment = "PATH=/run/current-system/sw/bin/:${with pkgs; lib.makeBinPath [ ]}";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
}

View File

@@ -0,0 +1,90 @@
# MD3 Evo Theming
MD3 Evo is a theming system derived from the Material Design 3 color sytem.
<div>
<img src="./dark.png">
<img src="./light.png">
</div>
## Features
- Wallpaper colors
- Dynamic color and dark mode switching at runtime (no `nixos-rebuild`)
- Dark and light mode support
- User contrast options
- Color flavours
- Faithful ANSI colors that still adapt to your theme
- Static syntax highlighting colors that blends with your theme
- Customizable syntax highlighting tokens
- Transparency and blur support
## CLI Usage
```sh
# Open wallpaper picker
theme wallpaper
# Set wallpaper by path
theme wallpaper ~/Pictures/wallpaper.png
# Switch theme
theme toggle
theme light
theme dark
# Get current theme
theme mode
```
## Integrations
| Name | Status | Comment |
| -------- | ------ | ------------------------------------------------------------------------------- |
| Neovim | ✅ | |
| Hyprland | ✅ | |
| Kitty | ✅ | Missing some parts I don't use. Transparency is tinted weirdly for some reason. |
| Anyrun | ✅ | |
| Vesktop | 🚧 | Contrast is weird in some places |
| GTK3 | 🚧 | |
| GTK4 | 🚧 | Runtime switching is unreliable |
## NixOS/Home Manager Module
```nix
# Default options
theming.md3-evo = {
enable = false;
flavour = "tonal-spot";
contrast = 0;
transparency = 0.8;
radius = 24;
padding = 12;
blur = 16;
semantic = {
blend = false;
danger = "#ff0000";
warning = "#ffff00";
success = "#00ff00";
info = "#0000ff";
};
syntax = {
blend = true;
keywords = "#ff8000";
functions = "#0000ff";
properties = "#ff00ff";
constants = "#ff00ff";
strings = "#00ff00";
numbers = "#00ffff";
structures = "#ffff00";
types = "#00ffff";
};
ansi = {
blend = true;
red = "#ff0000";
green = "#00ff00";
yellow = "#ffff00";
orange = "#ff8000";
blue = "#0000ff";
magenta = "#ff00ff";
cyan = "#00ffff";
};
};
```

View File

@@ -0,0 +1,7 @@
box#main {
background: alpha({{colors.surface.default.hex}}, 0.4);
}
* {
color: {{colors.on_surface.default.hex}};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@@ -0,0 +1,47 @@
/**
* @name Matugen
* @author Theaninova
* @version 6.9.0
* @description reactive material theme
*/
@import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/BasicBackground/BasicBackground.css);
:root {
--transparencycolor: {{colors.surface.default.red}}, {{colors.surface.default.green}}, {{colors.surface.default.blue}};
--transparencyalpha: {{custom.transparency}};
--messagetransparency: 0;
--guildchanneltransparency: 0;
--chatinputtransparency: 0;
--memberlisttransparency: 0;
--accentcolor: {{colors.surface_variant.default.red}}, {{colors.surface_variant.default.green}}, {{colors.surface_variant.default.blue}};
--settingsicons: 1;
--font: "NotoSans Nerd Font";
--textshadow: transparent;
--background: transparent;
--backgroundposition: center;
--backgroundsize: cover;
--backgroundblur: 0;
--popout: var(--background);
--popoutposition: var(--backgroundposition);
--popoutsize: var(--backgroundsize);
--popoutblur: var(--backgroundblur);
--backdrop: rgba({{colors.surface.default.red}}, {{colors.surface.default.green}}, {{colors.surface.default.blue}}, {{custom.transparency}});
--backdropposition: center;
--backdropsize: cover: --backdropblur: 0;
--textbrightest: {{colors.primary.default.red}}, {{colors.primary.default.green}}, {{colors.primary.default.blue}};
--textbrighter: {{colors.on_surface.default.red}}, {{colors.on_surface.default.green}}, {{colors.on_surface.default.blue}};
--textbright: {{colors.tertiary.default.red}}, {{colors.tertiary.default.green}}, {{colors.tertiary.default.blue}};
--textdark: {{colors.on_surface_variant.default.red}}, {{colors.on_surface_variant.default.green}}, {{colors.on_surface_variant.default.blue}};
--textdarker: {{colors.secondary.default.red}}, {{colors.secondary.default.green}}, {{colors.secondary.default.blue}};
--textdarkest: {{colors.outline.default.red}}, {{colors.outline.default.green}}, {{colors.outline.default.blue}};
--text-link: {{colors.primary.default.red}}, {{colors.primary.default.green}}, {{colors.primary.default.blue}};
--version1_0_5: none; /* DO NOT CHANGE THIS VARIABLE , USED TO HIDE UPDATE NOTICE */
}

View File

@@ -0,0 +1,124 @@
let
transparent = color: "alpha(${color}, {{custom.transparency}})";
mkBgColor = color: {
${color} = {
background_lift = "{{colors.${color}_dim.default.hex}}";
background = "{{colors.${color}_dim.default.hex}}";
foreground = "{{colors.on_${color}.default.hex}}";
};
};
mkColor = color: {
${color} = {
standalone = "{{colors.${color}_fixed_dim.default.hex}}";
background = "{{colors.${color}_fixed.default.hex}}";
foreground = "{{colors.on_${color}_fixed.default.hex}}";
};
};
mkSemantic = color: {
${color} = {
standalone = "{{colors.${color}.default.hex}}";
background = "{{colors.${color}.default.hex}}";
foreground = "{{colors.on_${color}.default.hex}}";
};
};
colors =
(mkColor "primary")
// (mkColor "secondary")
// (mkColor "tertiary")
// (mkSemantic "danger")
// (mkSemantic "warning")
// (mkSemantic "success")
// (mkSemantic "error")
// (mkSemantic "info")
// (mkBgColor "background")
// (mkBgColor "surface")
// (mkBgColor "surface_variant")
// {
outline = "{{colors.outline.default.hex}}";
container = {
lowest = "{{colors.surface_container_lowest.default.hex}}";
low = "{{colors.surface_container_low.default.hex}}";
default = "{{colors.surface_container.default.hex}}";
high = "{{colors.surface_container_high.default.hex}}";
highest = "{{colors.surface_container_highest.default.hex}}";
foreground = "{{colors.on_surface.default.hex}}";
};
shade = {
default = "rgba(0, 0, 0, 0.07)";
darker = "rgba(0, 0, 0, 0.12)";
};
};
# https://github.com/AvengeMedia/DankMaterialShell/blob/master/matugen/templates/gtk-colors.css
gtk = rec {
accent_color = colors.primary.standalone;
accent_bg_color = colors.primary.background;
accent_fg_color = colors.primary.foreground;
window_bg_color = transparent colors.surface.background;
window_fg_color = colors.surface.foreground;
popover_bg_color = transparent colors.surface.background;
popover_fg_color = colors.surface.foreground;
headerbar_bg_color = transparent colors.surface.background;
headerbar_fg_color = colors.surface.foreground;
view_bg_color = transparent colors.surface.background_lift;
view_fg_color = colors.surface.foreground;
card_bg_color = colors.surface.background_lift;
card_fg_color = colors.surface.foreground;
sidebar_bg_color = window_bg_color;
sidebar_fg_color = window_fg_color;
sidebar_border_color = colors.surface.background;
sidebar_backdrop_color = window_bg_color;
destructive_color = colors.danger.standalone;
destructive_bg_color = colors.danger.background;
destructive_fg_color = colors.danger.foreground;
success_color = colors.success.standalone;
success_bg_color = colors.success.background;
success_fg_color = colors.success.foreground;
warning_color = colors.warning.standalone;
warning_bg_color = colors.warning.background;
warning_fg_color = colors.warning.foreground;
error_color = colors.error.standalone;
error_bg_color = colors.error.background;
error_fg_color = colors.error.foreground;
/*
headerbar_border_color = colors.outline;
headerbar_backdrop_color = transparent colors.background.background;
headerbar_shade_color = colors.shade.default;
headerbar_darker_shade_color = colors.shade.darker;
card_shade_color = colors.shade.default;
dialog_bg_color = transparent colors.background.background;
dialog_fg_color = colors.background.foreground;
popover_shade_color = colors.shade.default;
shade_color = colors.shade.default;
scrollbar_outline_color = colors.outline;
thumbnail_bg_color = colors.secondary.background;
thumbnail_fg_color = colors.secondary.foreground;
sidebar_shade_color = colors.shade.default;
secondary_sidebar_bg_color = transparent colors.surface_variant.background;
secondary_sidebar_fg_color = colors.surface_variant.foreground;
secondary_sidebar_backdrop_color = transparent colors.surface_variant.background;
secondary_sidebar_shade_color = colors.shade.default;
*/
};
in
builtins.concatStringsSep "\n" (
builtins.map (name: "@define-color ${name} ${builtins.getAttr name gtk};") (builtins.attrNames gtk)
)

View File

@@ -0,0 +1,20 @@
general {
col.inactive_border = 0x00000000
col.active_border = 0x00000000
# col.inactive_border = rgba({{colors.surface.default.hex_stripped}}{{custom.transparency_hex | to_lower}})
# col.active_border = rgb({{colors.primary.default.hex_stripped}})
border_size = 0
extend_border_grab_area = 4
gaps_in = {{custom.padding}}
gaps_out = {{custom.double_padding}}
}
decoration {
rounding = {{custom.radius}}
blur {
size = {{custom.blur}}
passes = 3
popups = true
}
}

View File

@@ -0,0 +1,31 @@
background_tint 0.0
background_opacity {{custom.transparency}}
background {{colors.surface.default.hex}}
foreground {{colors.on_surface.default.hex}}
selection_background {{colors.primary.default.hex}}
selection_foreground {{colors.on_primary.default.hex}}
url_color {{colors.tertiary.default.hex}}
cursor {{colors.on_surface.default.hex}}
# normal
color0 {{colors.surface.default.hex}}
color1 {{colors.red.default.hex}}
color2 {{colors.green.default.hex}}
color3 {{colors.yellow.default.hex}}
color4 {{colors.blue.default.hex}}
color5 {{colors.magenta.default.hex}}
color6 {{colors.cyan.default.hex}}
color7 {{colors.on_surface.default.hex}}
# bright
color8 {{colors.outline_variant.default.hex}}
color9 {{colors.red.default.hex}}
color10 {{colors.green.default.hex}}
color11 {{colors.yellow.default.hex}}
color12 {{colors.blue.default.hex}}
color13 {{colors.magenta.default.hex}}
color14 {{colors.cyan.default.hex}}
color15 {{colors.on_surface_variant.default.hex}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

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