Compare commits

...

76 Commits

Author SHA1 Message Date
1a1211a8fa update system 2026-02-16 13:33:25 +01:00
eed1fb7e13 update system 2026-02-12 14:15:30 +01:00
4e8a6e0136 update system 2026-01-25 12:01:53 +01:00
04e918cc38 update system 2026-01-21 13:39:34 +01:00
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
153 changed files with 5705 additions and 3199 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

580
flake.lock generated
View File

@@ -1,100 +1,22 @@
{
"nodes": {
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1730444665,
"narHash": "sha256-i3FxeHjsHw4AePx3AWVVywy92EEobx/ZER4ignWxNrE=",
"owner": "Kirottu",
"repo": "anyrun",
"rev": "b3b4f2253d43af3311b3d3fc86973fc3e9559c33",
"type": "github"
},
"original": {
"owner": "Kirottu",
"repo": "anyrun",
"type": "github"
}
},
"devshell": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1728330715,
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
"owner": "numtide",
"repo": "devshell",
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"dirt-samples-src": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"lastModified": 1698439458,
"narHash": "sha256-Mp8qBpsOvW9Zguv95Kv7EU6S3ICaF2aO02Wz6xGURtE=",
"owner": "tidalcycles",
"repo": "dirt-samples",
"rev": "9a6dff8f9ec3cd55b287290cf04e01afa6b8f532",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"owner": "tidalcycles",
"repo": "dirt-samples",
"type": "github"
}
},
"flake-compat_2": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"anyrun",
"nixpkgs"
]
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@@ -102,11 +24,11 @@
]
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"lastModified": 1765835352,
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
"type": "github"
},
"original": {
@@ -115,76 +37,6 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730302582,
"narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -192,11 +44,11 @@
]
},
"locked": {
"lastModified": 1730450782,
"narHash": "sha256-0AfApF8aexgB6o34qqLW2cCX4LaWJajBVdU6ddiWZBM=",
"lastModified": 1768984719,
"narHash": "sha256-O6nXCW9FN39qw204e5Nl3qgaxKFcSvdpx0bULqfwyTA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8ca921e5a806b5b6171add542defe7bdac79d189",
"rev": "d6e3935ec6e43c8f54cd0132276c82d951e1453e",
"type": "github"
},
"original": {
@@ -205,126 +57,109 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730016908,
"narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e83414058edd339148dc142a8437edb9450574c8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729544999,
"narHash": "sha256-YcyJLvTmN6uLEBGCvYoMLwsinblXMkoYkNLEO4WnKus=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "65c207c92befec93e22086da9456d3906a4e999c",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.5",
"repo": "ixx",
"type": "github"
}
},
"matugen": {
"inputs": {
"nixpkgs": "nixpkgs",
"systems": "systems_2"
},
"locked": {
"lastModified": 1716548249,
"narHash": "sha256-9jvSsYOCYpG7JN1YDdptu19EhG+fZuX278IbiTJ7814=",
"owner": "Theaninova",
"repo": "matugen",
"rev": "f79700eb42e5a6b7062ccdfcec3956e26573fc01",
"type": "github"
},
"original": {
"owner": "Theaninova",
"ref": "add-home-manager-module",
"repo": "matugen",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
],
"systems": "systems"
},
"locked": {
"lastModified": 1730184279,
"narHash": "sha256-6OB+WWR6gnaWiqSS28aMJypKeK7Pjc2Wm6L0MtOrTuA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "b379bd4d872d159e5189053ce9a4adf86d56db4b",
"lastModified": 1731508795,
"narHash": "sha256-+UibbVz5CTisKMms/5VXGe39FYr56qzaEtX4TWQPkjk=",
"owner": "InioX",
"repo": "matugen",
"rev": "cb9f81eb0150f6253895ea0adb1daa8534c15fc7",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"owner": "InioX",
"ref": "v2.4.1",
"repo": "matugen",
"type": "github"
}
},
"nixos-cosmic": {
"niri": {
"inputs": {
"flake-compat": "flake-compat",
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"rust-overlay": "rust-overlay"
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1730425244,
"narHash": "sha256-/iW9B9LZXXvSo6Hk7oRTN6gxEp3vcmXjmOjKZMPxe9E=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "36545ab9f31f961df11f5882ce14aab10a0781a8",
"lastModified": 1768974509,
"narHash": "sha256-V+Uv2EL6MMdYGF4Zg0sWHeRLSgqzC4to01taYDItCNY=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "2f38ab793de773496d2184aa3aa377bc8c99557b",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"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": 1768678265,
"narHash": "sha256-Ub8eed4DsfIDWyg30xEe+8bSxL/z5Af/gCjmvJ0V/Hs=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "d7184a04b904e07113f4623610775ae78d32394c",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1767983141,
"narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "440818969ac2cbd77bfe025e884d0aa528991374",
"type": "github"
},
"original": {
"owner": "gmodena",
"ref": "latest",
"repo": "nix-flatpak",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"lastModified": 1768886240,
"narHash": "sha256-C2TjvwYZ2VDxYWeqvvJ5XPPp6U7H66zeJlRaErJKoEM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0",
"type": "github"
},
"original": {
@@ -336,56 +171,34 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730137625,
"narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=",
"lastModified": 1768773494,
"narHash": "sha256-XsM7GP3jHlephymxhDE+/TKKO1Q16phz/vQiLBGhpF4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "64b80bfb316b57cdb8919a9110ef63393d74382a",
"rev": "77ef7a29d276c6d8303aece3444d61118ef71ac2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1730200266,
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
"systems": "systems_2"
},
"locked": {
"lastModified": 1730368298,
"narHash": "sha256-5z4pDqRSSovXPPtN1BNEJOkGoCd/XSYuCWh8AsvoTio=",
"lastModified": 1768910181,
"narHash": "sha256-YRU0IHMzXluZxr0JDfq9jtblb4DV7MIB5wj2jYMFKQc=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "42ea1626cb002fa759a6b1e2841bfc80a4e59615",
"rev": "5b138edcb2f1c3ed4b29eca3658f04f0639b98b3",
"type": "github"
},
"original": {
@@ -394,73 +207,30 @@
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1730472538,
"narHash": "sha256-3m4OVGKsbPzMlnS0gVptIZBRlxgqQz+WhfwT+rT823Y=",
"owner": "nix-community",
"repo": "NUR",
"rev": "52c21ec8fde46366b1a5555e18d854ee18012ac8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730337772,
"narHash": "sha256-uTxvqDohfG85+zldO5Tf1B+fuAF8ZhMouNwG5S6OAnA=",
"owner": "NuschtOS",
"repo": "search",
"rev": "4e0a7a95a3df3333771abc4df6a656e7baf67106",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"anyrun": "anyrun",
"home-manager": "home-manager",
"matugen": "matugen",
"nixos-cosmic": "nixos-cosmic",
"nixpkgs": "nixpkgs_2",
"niri": "niri",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"nur": "nur"
"tidalcycles": "tidalcycles"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
]
},
"superdirt-src": {
"flake": false,
"locked": {
"lastModified": 1730341826,
"narHash": "sha256-RFaeY7EWzXOmAL2IQEACbnrEza3TgD5UQApHR4hGHhY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "815d1b3ee71716fc91a7bd149801e1f04d45fbc5",
"lastModified": 1697377840,
"narHash": "sha256-9qU9CHYAXbN1IE3xXDqGipuroifVaSVXj3c/cDfwM80=",
"owner": "musikinformatik",
"repo": "superdirt",
"rev": "c7f32998572984705d340e7c1b9ed9ad998a39b6",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"owner": "musikinformatik",
"repo": "superdirt",
"type": "github"
}
},
@@ -480,21 +250,6 @@
}
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -509,24 +264,111 @@
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"tidal-src": {
"flake": false,
"locked": {
"lastModified": 1730321837,
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc",
"lastModified": 1712519522,
"narHash": "sha256-LbvxQmVxHElidCgvt+w0g1k+QQbNLebK46vtRCgsLeQ=",
"owner": "tidalcycles",
"repo": "tidal",
"rev": "88f09edf6bef2228d5f530dea872b08a9d803066",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"owner": "tidalcycles",
"ref": "v1.9.5",
"repo": "tidal",
"type": "github"
}
},
"tidalcycles": {
"inputs": {
"dirt-samples-src": "dirt-samples-src",
"nixpkgs": [
"nixpkgs"
],
"superdirt-src": "superdirt-src",
"tidal-src": "tidal-src",
"vim-tidal-src": "vim-tidal-src",
"vowel-src": "vowel-src"
},
"locked": {
"lastModified": 1730626669,
"narHash": "sha256-nFyZrvTPn9OM9UZmuAwy3e1Ba0ZuYc2FaDCOOhGtqg4=",
"owner": "mitchmindtree",
"repo": "tidalcycles.nix",
"rev": "0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4",
"type": "github"
},
"original": {
"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": 1768765571,
"narHash": "sha256-C1JbyJ3ftogmN3vmLNfyPtnJw2wY64TiUTIhFtk1Leg=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "ed1cef792b4def3321ff9ab5479df09609f17a69",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}

173
flake.nix
View File

@@ -1,22 +1,25 @@
{
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:Theaninova/matugen/add-home-manager-module";
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";
};
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
tidalcycles = {
url = "github:mitchmindtree/tidalcycles.nix/?ref=0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4";
inputs.nixpkgs.follows = "nixpkgs";
};
};
@@ -24,74 +27,131 @@
outputs =
{
nixpkgs,
nur,
home-manager,
nixvim,
anyrun,
matugen,
nixos-cosmic,
nix-flatpak,
niri,
tidalcycles,
...
}@inputs:
let
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";
permittedInsecurePackages = [ "nix-2.25.0pre20240807_cfe66dbe" ];
};
overlays = [
nur.overlay
(final: prev: {
anyrunPlugins = anyrun.packages.${prev.system};
matugen = matugen.packages.${prev.system}.default;
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
lpc21isp = prev.callPackage ./overlays/lpc21isp { };
rquickshare = prev.callPackage ./overlays/rquickshare { };
cura = prev.callPackage ./overlays/cura { };
})
];
}
);
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
nixos-cosmic.nixosModules.default
niri.nixosModules.niri
nix-flatpak.nixosModules.nix-flatpak
{
nix.settings = {
substituters = [ "https://cosmic.cachix.org/" ];
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
};
}
{
_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 = [
matugen.homeManagerModules.default
./modules/home-manager
./hosts/${hostname}/home.nix
];
@@ -103,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,24 +2,13 @@
{
imports = [ ./hardware-configuration.nix ];
nix = {
package = pkgs.nixVersions.git;
settings.experimental-features = [
"nix-command"
"flakes"
];
gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--deleteOlderThan 10d";
};
};
# Bootloader.
boot = {
loader.timeout = 0;
quiet.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_xanmod_stable;
kernelModules = [ "sg" ];
loader = {
systemd-boot = {
@@ -46,40 +35,91 @@
};
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;
dunst.enable = true;
};
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
desktops = {
hyprland.enable = true;
# gamescope.enable = true;
desktops.hyprland = {
enable = true;
scrolling = true;
};
locale.preset.theaninova.enable = true;
services.ollama = {
enable = true;
acceleration = "rocm";
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
];
};
services.xserver.xkb.variant = "altgr-intl";
services.xserver.xkb.layout = "us";
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;
sane.enable = true;
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
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;
@@ -89,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="󰟵 "
'';
@@ -104,8 +148,10 @@
users.users.${username} = {
isNormalUser = true;
extraGroups = [
"wireshark"
"scanner"
"lp"
"storage"
"networkmanager"
"audio"
"video"
@@ -118,8 +164,12 @@
# 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
@@ -129,6 +179,8 @@
graphicsmagick
ffmpeg
nfs-utils
opensc
openssl
# Essential command line apps
neovim
mc
@@ -140,7 +192,24 @@
];
networking = {
firewall.allowedUDPPorts = [ 50765 ];
firewall = {
allowedTCPPorts = [
25565
5173
];
allowedUDPPorts = [
25565
50765
];
/*
allowedUDPPortRanges = [
{
from = 1;
to = 65535;
}
];
*/
};
networkmanager = {
enable = true;

View File

@@ -1,5 +1,52 @@
{ ... }:
{ pkgs, ... }:
{
theme.md3-evo.enable = true;
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,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
};
};
}

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

@@ -1,20 +1,18 @@
{
username,
osConfig,
inputs,
...
}:
{
home = {
stateVersion = osConfig.system.stateVersion;
inherit (osConfig.system) stateVersion;
inherit username;
homeDirectory = "/home/${username}";
};
imports = [
inputs.nixvim.homeManagerModules.nixvim
inputs.anyrun.homeManagerModules.default
./programs/nixvim/presets
./programs/neovide.nix
./programs/nixvim.nix
./programs/git.nix
./packages
./programs
./services

View File

@@ -1,40 +0,0 @@
@import "./theme.css";
* {
font-family: "NotoSans NF";
}
window#window {
background: transparent;
}
box#main {
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,160 +1,113 @@
{
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 = [
"gnome-keyring-daemon --start --components=secrets"
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
];
general = {
allow_tearing = true;
layout = lib.mkIf cfg.scrolling "scrolling";
};
input = {
accel_profile = "flat";
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" ];
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)$";
pipPadding = toString (config.theme.md3-evo.padding * 2);
in
[
"keepaspectratio,${firefoxPip}"
"noborder,${firefoxPip}"
"float,${firefoxPip}"
"float,${firefoxPipInitial}"
"pin,${firefoxPip}"
"pin,${firefoxPipInitial}"
"fullscreenstate 2 0,${firefoxPip}"
"fullscreenstate 2 0,${firefoxPipInitial}"
"move ${pipPadding} ${pipPadding},${firefoxPip}"
"move ${pipPadding} ${pipPadding},${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)$"
bind = [
"SUPER,C,killactive"
"SUPER,P,togglefloating,"
"SUPER,P,pin,"
"SUPER,D,fullscreen,1"
"SUPER,V,fullscreen,0"
"float,class:^(zenity)$"
];
"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"
];
misc = {
layers_hog_keyboard_focus = false;
disable_splash_rendering = true;
disable_hyprland_logo = true;
background_color = "rgb(000000)";
force_default_wallpaper = 0;
};
layerrule = [
"blur, anyrun"
"ignorealpha 0.3, anyrun"
];
decoration = {
drop_shadow = "yes";
shadow_range = 16;
"col.shadow" = "rgba(00000044)";
};
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;
};
};
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;
};
};
};
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-keyring
nautilus
gnome-calendar
gnome-characters
gnome-contacts
gnome-clocks
gnome-calculator
simple-scan
eog
geary
ghex
gnome-weather
gnome-keyring
gnome-disk-utility
# fixes
xorg.xrandr
@@ -162,27 +115,14 @@
gtk = {
enable = true;
iconTheme = {
name = "Tela";
package = pkgs.tela-icon-theme;
};
};
qt = {
enable = true;
platformTheme.name = "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,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,14 +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 12.75
'';
settings = {
window_padding_width = 10;
text_composition_strategy = "1.0 0";
};
}

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,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

@@ -15,29 +15,31 @@ in
config = lib.mkIf cfg.enable {
extraConfigLuaPre = # lua
''
require("actions-preview").setup({})
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" })
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";
@@ -64,15 +66,20 @@ in
action = ":IncRename ";
}
{
key = "<leader>sn";
key = "<leader>sh";
mode = "n";
options.silent = true;
action.__raw = # lua
"vim.lsp.buf.hover";
"function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({0}), {0}) end";
}
];
plugins = {
lsp.enable = true;
actions-preview.enable = true;
lsp = {
enable = true;
inlayHints = false;
};
lsp-signature.enable = true;
telescope = {
enable = true;
keymaps = {
@@ -81,7 +88,6 @@ in
"<leader>si" = "lsp_implementations";
"<leader>sw" = "lsp_workspace_symbols";
"<leader>st" = "lsp_type_definitions";
"<leader>sh" = "diagnostics";
};
};
inc-rename.enable = true;
@@ -91,11 +97,6 @@ in
group = "LSP";
icon = "󱐋";
}
{
__unkeyed-1 = "<leader>sn";
desc = "Hover";
icon = "";
}
{
__unkeyed-1 = "<leader>sr";
desc = "References";
@@ -133,14 +134,19 @@ in
}
{
__unkeyed-1 = "<leader>sh";
icon = "󱖫";
desc = "Diagnostics";
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";
@@ -148,6 +154,5 @@ in
}
];
};
extraPlugins = [ pkgs.vimPlugins.actions-preview-nvim ];
};
}

View File

@@ -13,10 +13,22 @@ in
telescope = {
enable = true;
keymaps = {
"<leader>ff" = "git_files";
"<leader>fa" = "find_files";
"<leader>fg" = "live_grep";
"<leader>fb" = "buffers";
"<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 = [
@@ -32,7 +44,7 @@ in
}
{
__unkeyed-1 = "<leader>fa";
desc = "Untracked Files";
desc = "All Files";
icon = "󱪡";
}
{
@@ -41,8 +53,8 @@ in
icon = "󰑑";
}
{
__unkeyed-1 = "<leader>fb";
desc = "Buffer";
__unkeyed-1 = "<leader>fc";
desc = "Current";
icon = "󰈙";
}
];

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,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

@@ -12,7 +12,7 @@ in
plugins = {
notify = {
enable = true;
stages = "static";
settings.stages = "static";
};
telescope = {
enable = true;
@@ -31,10 +31,12 @@ in
settings = {
options = {
globalstatus = true;
section_separators = {
left = ""; # "";
right = ""; # "";
};
/*
section_separators = {
left = "";
right = "";
};
*/
component_separators = {
left = "";
right = "";
@@ -44,10 +46,12 @@ in
lualine_a = [
{
__unkeyed-1 = "mode";
separator = {
right = ""; # "";
left = ""; # "";
};
/*
separator = {
right = "";
left = "";
};
*/
icon = "";
}
];
@@ -55,10 +59,12 @@ in
lualine_z = [
{
__unkeyed-1 = "location";
separator = {
right = ""; # "";
left = ""; # "";
};
/*
separator = {
right = "";
left = "";
};
*/
}
];
};

View File

@@ -35,7 +35,7 @@ in
};
illuminate.enable = lib.mkDefault true;
nvim-autopairs.enable = lib.mkDefault true;
nvim-colorizer.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

@@ -1,8 +1,21 @@
{ lib, ... }:
{
lib,
pkgs,
hostname,
username,
...
}:
{
options.programs.nixvim = lib.mkOption {
type = lib.types.submoduleWith {
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
@@ -12,9 +25,12 @@
./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
@@ -22,6 +38,7 @@
./languages/angular.nix
./languages/c.nix
./languages/css.nix
./languages/cue.nix
./languages/dart.nix
./languages/js.nix
./languages/lua.nix
@@ -29,10 +46,13 @@
./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,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,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,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,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 ];
};
}

View File

@@ -15,7 +15,7 @@ in
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.python = [ "black" ];
lsp.servers.pylsp.enable = true;
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,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,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.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

@@ -13,7 +13,7 @@ in
key = "<leader>xx";
mode = "n";
action.__raw = # lua
"require('trouble').toggle";
"function() require('trouble').toggle('diagnostics') end";
}
{
key = "<leader>xw";
@@ -42,10 +42,7 @@ in
];
plugins = {
web-devicons.enable = true;
trouble = {
enable = true;
settings.use_diagnostic_signs = true;
};
trouble.enable = true;
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>x";

View File

@@ -1,58 +1,73 @@
{ 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
vulnix
gccdiag
# browsers
firefox
chromium
brave
# media
jellyfin-media-player
yt-dlp
f3d
mpv
jellyfin-mpv-shim
makemkv
libfaketime
handbrake
metadata-cleaner
mediainfo
mediainfo-gui
prismlauncher
# chat apps
vesktop
discord
element-desktop
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
pkgsRocm.blender
# development
insomnia
avalonia-ilspy
# ghidra
# ida-free
ghidra
kdePackages.kate
# utils
kdePackages.ark
libqalculate
ranger
neofetch
filezilla
# rquickshare
yubikey-manager
(pkgs.writeShellApplication {
name = "fix-yubikey";
text = ''
gpg-connect-agent --hex "scd apdu 00 f1 00 00" /bye
'';
})
];
}

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,14 +33,15 @@
src = zsh-nix-shell;
}
];
initExtraFirst = # 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
'';
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;
init.defaultBranch = "main";
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 = # sh
''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

@@ -6,7 +6,7 @@
fork = true;
font = {
normal = [ "FiraCode Nerd Font" ];
size = 12.75;
size = 12;
edging = "subpixelantialias";
hinting = "full";
features."FiraCode Nerd Font" = [
@@ -21,7 +21,18 @@
"+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;
@@ -31,6 +42,7 @@
neovide_hide_mouse_when_typing = true;
experimental_layer_grouping = true;
neovide_cursor_vfx_mode = "pixiedust";
neovide_cursor_trail_size = 0.7;
};
};
}

View File

@@ -0,0 +1,128 @@
{ ... }:
{
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;
buf_ls.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,103 +0,0 @@
{ pkgs }:
{
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;
updatetime = 50;
fillchars.eob = " ";
};
clipboard = {
register = "unnamedplus";
providers.wl-copy.enable = true;
};
globals.mapleader = ";";
presets = {
auto-save.enable = true;
auto-format.enable = true;
harpoon.enable = true;
lazygit.enable = true;
mergetool.enable = true;
trouble.enable = true;
undotree.enable = true;
base = {
completion.enable = true;
diagnostics.enable = true;
find.enable = true;
formatting = {
enable = true;
prettier = true;
};
status-line.enable = true;
syntax.enable = true;
tree.enable = true;
};
languages = {
angular.enable = true;
c.enable = true;
css = {
enable = true;
stylelint = 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;
};
remaps = {
half-page-scroll.enable = true;
no-accidental-macro.enable = true;
paste-keep-buffer.enable = true;
};
};
plugins = {
leap.enable = true;
vim-surround.enable = true;
which-key.enable = true;
schemastore.enable = true;
# TODO: looks weird with neovide
# treesitter-context.enable = true;
lsp.servers = {
html.enable = true;
svelte.enable = true;
dockerls.enable = true;
yamlls.enable = true;
jsonls.enable = true;
taplo.enable = true;
};
copilot-lua = {
enable = true;
suggestion.autoTrigger = true;
};
};
}

View File

@@ -1,51 +0,0 @@
{ lib, config, ... }:
let
cfg = config.presets.base.completion;
in
{
options.presets.base.completion = {
enable = lib.mkEnableOption "completion";
};
config = lib.mkIf cfg.enable {
plugins = {
luasnip.enable = true;
lspkind = {
enable = true;
mode = "symbol_text";
};
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-.>" = # 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 = "rounded";
documentation.border = "rounded";
};
};
};
};
};
}

View File

@@ -1,53 +0,0 @@
{ 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>ft";
action = "<cmd>:Neotree toggle<CR>";
}
{
key = "<leader>ss";
action = "<cmd>:Neotree document_symbols right toggle<CR>";
}
];
plugins = {
web-devicons.enable = true;
neo-tree = {
enable = true;
filesystem = {
useLibuvFileWatcher = true;
followCurrentFile.enabled = true;
filteredItems.visible = true;
};
extraSources = [ "document_symbols" ];
popupBorderStyle = "rounded";
eventHandlers.neo_tree_buffer_leave = # lua
''
function()
require('neo-tree').close_all()
end
'';
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>ft";
desc = "Tree";
icon = "󰙅";
}
{
__unkeyed-1 = "<leader>ss";
desc = "Document Symbols";
icon = "󱏒";
}
];
};
};
}

View File

@@ -1,25 +0,0 @@
{ lib, config, ... }:
let
cfg = config.presets.languages.c;
in
{
options.presets.languages.c = {
enable = lib.mkEnableOption "C/C++";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft = {
c = [ "clang-format" ];
cpp = [ "clang-format" ];
};
lsp.servers.clangd = {
enable = true;
cmd = [
"clangd"
"--offset-encoding=utf-16"
];
};
};
};
}

View File

@@ -1,51 +0,0 @@
{
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;
eslint.enable = lib.mkIf cfg.eslint true;
};
};
extraPackages = [ pkgs.nodePackages.typescript-language-server ];
};
}

View File

@@ -1,23 +0,0 @@
{
lib,
pkgs,
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.nil_ls.enable = true;
nix.enable = true;
};
extraPackages = [ pkgs.nixfmt-rfc-style ];
};
}

View File

@@ -1,20 +0,0 @@
{ 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.formattters_by_ft.rust = [ "rustfmt" ];
lsp.servers.rust_analyzer = {
enable = true;
installCargo = false;
installRustc = false;
};
};
};
}

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

@@ -2,27 +2,36 @@ let
transparent = color: "alpha(${color}, {{custom.transparency}})";
mkBgColor = color: {
${color} = {
background = "{{colors.${color}.default.hex}}";
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}_container.default.hex}}";
foreground = "{{colors.on_${color}_container.default.hex}}";
background = "{{colors.${color}.default.hex}}";
foreground = "{{colors.on_${color}.default.hex}}";
};
};
colors =
(mkColor "primary")
// (mkColor "secondary")
// (mkColor "tertiary")
// (mkColor "danger")
// (mkColor "warning")
// (mkColor "success")
// (mkColor "error")
// (mkColor "info")
// (mkSemantic "danger")
// (mkSemantic "warning")
// (mkSemantic "success")
// (mkSemantic "error")
// (mkSemantic "info")
// (mkBgColor "background")
// (mkBgColor "surface")
// (mkBgColor "surface_variant")
// {
outline = "{{colors.outline.default.hex}}";
@@ -40,11 +49,33 @@ let
};
};
gtk = {
# 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;
@@ -61,45 +92,31 @@ let
error_bg_color = colors.error.background;
error_fg_color = colors.error.foreground;
window_bg_color = transparent colors.background.background;
window_fg_color = colors.background.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;
view_bg_color = transparent colors.background.background;
view_fg_color = colors.background.foreground;
card_shade_color = colors.shade.default;
headerbar_bg_color = transparent colors.background.background;
headerbar_fg_color = colors.background.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;
dialog_bg_color = transparent colors.background.background;
dialog_fg_color = colors.background.foreground;
popover_shade_color = colors.shade.default;
card_bg_color = colors.container.default;
card_fg_color = colors.container.foreground;
card_shade_color = colors.shade.default;
shade_color = colors.shade.default;
scrollbar_outline_color = colors.outline;
dialog_bg_color = transparent colors.background.background;
dialog_fg_color = colors.background.foreground;
thumbnail_bg_color = colors.secondary.background;
thumbnail_fg_color = colors.secondary.foreground;
popover_bg_color = transparent colors.background.background;
popover_fg_color = colors.background.foreground;
popover_shade_color = colors.shade.default;
sidebar_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_bg_color = transparent colors.background.background;
sidebar_fg_color = colors.background.foreground;
sidebar_backdrop_color = transparent colors.background.background;
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;
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" (

View File

@@ -1,7 +1,9 @@
general {
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 = 4
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}}

View File

@@ -1,6 +1,7 @@
{
pkgs,
lib,
osConfig,
config,
...
}:
@@ -11,6 +12,15 @@ in
{
options.theme.md3-evo = {
enable = lib.mkEnableOption "the MD3-EVO theme";
auto-dark = {
enable = lib.mkEnableOption "Automatically switch between light and dark mode";
lon = lib.mkOption {
type = lib.types.float;
};
lat = lib.mkOption {
type = lib.types.float;
};
};
flavour = lib.mkOption {
type = lib.types.enum [
"content"
@@ -32,7 +42,7 @@ in
};
transparency = lib.mkOption {
type = lib.types.numbers.between 0 1;
default = 0.8;
default = 0.9;
description = "The transparency of apps";
};
radius = lib.mkOption {
@@ -168,217 +178,367 @@ in
};
};
config = lib.mkIf cfg.enable {
home.packages = [
pkgs.adw-gtk3
(pkgs.writeShellApplication {
name = "theme";
runtimeInputs = [
pkgs.matugen
pkgs.swww
pkgs.zenity
];
text = ''
WALLPAPER=${config.xdg.configHome}/matugen/wallpaper
config =
let
theme-script = (
pkgs.writeShellApplication {
name = "theme";
runtimeInputs = [
pkgs.matugen
pkgs.swww
pkgs.zenity
pkgs.sunwait
];
text = ''
WALLPAPER=${config.xdg.configHome}/matugen/wallpaper
STATE=${config.xdg.stateHome}/md3-evo
SCHEME=$(dconf read /org/gnome/desktop/interface/color-scheme)
if [ "$SCHEME" = "'prefer-light'" ]; then
MODE="light"
else
MODE="dark"
fi
if [ $# -eq 0 ]; then
echo -e "\033[1mUsage:\033[0m mode|light|dark|toggle|wallpaper"
exit 1
elif [ "$1" = "mode" ]; then
echo -e "$MODE"
exit 0
elif [ "$1" = "wallpaper" ]; then
if [ $# -eq 1 ]; then
PICKED=$(zenity --file-selection --file-filter='Images | *.png *.jpg *.jpeg *.svg *.bmp *.gif')
cp "$PICKED" "$WALLPAPER"
else
cp "$2" "$WALLPAPER"
fi
elif [ "$1" = "toggle" ]; then
if [ "$MODE" = "light" ]; then
MODE="dark"
else
SCHEME=$(dconf read /org/gnome/desktop/interface/color-scheme)
if [ "$SCHEME" = "'prefer-light'" ]; then
MODE="light"
else
MODE="dark"
fi
elif [ "$1" = "light" ] || [ "$1" = "dark" ]; then
MODE="$1"
elif [ "$1" = "init" ]; then
echo -e "\033[1mSetting up matugen\033[0m"
else
echo -e "\033[31mInvalid argument\033[0m"
exit 1
fi
if [ ! -f $WALLPAPER ]; then
echo -e "\033[31,1mNo wallpaper set\033[0m"
exit 1
fi
if [ ! -d "$STATE" ]; then
mkdir -p "$STATE"
fi
if [ -f "$STATE/mode" ]; then
MODE=$(cat "$STATE/mode")
fi
if [ "$MODE" = "light" ]; then
GTK_THEME="adw-gtk3"
else
GTK_THEME="adw-gtk3-dark"
fi
if [ $# -eq 0 ]; then
echo -e "\033[1mUsage:\033[0m mode|light|dark|auto|toggle|wallpaper"
exit 1
elif [ "$1" = "mode" ]; then
echo -e "$MODE"
exit 0
elif [ "$1" = "wallpaper" ]; then
if [ $# -eq 1 ]; then
PICKED=$(zenity --file-selection --file-filter='Images | *.png *.jpg *.jpeg *.svg *.bmp *.gif')
cp "$PICKED" "$WALLPAPER"
else
cp "$2" "$WALLPAPER"
fi
elif [ "$1" = "toggle" ]; then
if [ "$MODE" = "light" ]; then
MODE="dark"
else
MODE="light"
fi
echo "$MODE" > "$STATE/mode"
elif [ "$1" = "light" ] || [ "$1" = "dark" ] || [ "$1" == "auto" ]; then
MODE="$1"
echo "$MODE" > "$STATE/mode"
elif [ "$1" = "init" ]; then
echo -e "\033[1mSetting up matugen\033[0m"
else
echo -e "\033[31mInvalid argument\033[0m"
exit 1
fi
matugen image "$WALLPAPER" --type scheme-${cfg.flavour} --contrast ${builtins.toString cfg.contrast} --mode "$MODE"
sed -i "s/set background=dark/set background=$MODE/g" ${config.xdg.configHome}/nvim/colors/md3-evo.vim
if [ ! -f $WALLPAPER ]; then
echo -e "\033[31,1mNo wallpaper set\033[0m"
exit 1
fi
dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'"
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'"
THEME_SERVICE_PATH="${config.xdg.configHome}/systemd/user/theme-init.timer"
if [ "$MODE" = "auto" ]; then
TIME=$(sunwait poll ${builtins.toString cfg.auto-dark.lat}N ${builtins.toString cfg.auto-dark.lon}E || :)
if [ "$TIME" = "DAY" ]; then
MODE="light"
NEXT=6
else
MODE="dark"
NEXT=4
fi
NEXT=$(sunwait report ${builtins.toString cfg.auto-dark.lat}N ${builtins.toString cfg.auto-dark.lon}E | awk "/Daylight:/ {print \$$NEXT}")
cat <<EOF | tee "$THEME_SERVICE_PATH" > /dev/null
[Unit]
Description=Next theme change timer
if command -v hyprctl &> /dev/null; then
hyprctl reload
fi
[Timer]
OnCalendar=*-*-* $(date -d "$NEXT today + 5 minutes" +'%H:%M'):00
AccuracySec=1min
for i in $(pgrep -u "$USER" -x nvim); do
kill -USR1 "$i"
done
'';
})
];
[Install]
WantedBy=timers.target
EOF
else
rm -f "$THEME_SERVICE_PATH"
fi
systemctl --user daemon-reload &> /dev/null || :
systemctl --user restart theme-init.timer &> /dev/null || :
programs.kitty = {
extraConfig = ''
include ${config.xdg.configHome}/kitty/theme.conf
'';
};
if command -v niri &> /dev/null; then
niri msg action do-screen-transition --delay-ms 500
fi
programs.nixvim = {
opts.termguicolors = true;
colorscheme = "md3-evo";
autoCmd = [
{
event = [ "Signal" ];
pattern = [ "SIGUSR1" ];
command = # vim
"colorscheme md3-evo";
nested = true;
if [ "$MODE" = "light" ]; then
GTK_THEME="adw-gtk3"
else
GTK_THEME="adw-gtk3-dark"
fi
matugen image "$WALLPAPER" --type scheme-${cfg.flavour} --contrast ${builtins.toString cfg.contrast} --mode "$MODE"
dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'"
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'"
dconf write /org/gnome/desktop/interface/icon-theme "'Adwaita'"
'';
}
);
in
lib.mkIf cfg.enable {
home.packages = [
pkgs.adw-gtk3
pkgs.swww
theme-script
];
plugins.lualine.settings.options.theme.__raw = # lua
"function() return vim.g.lualine_theme end";
};
gtk = {
gtk3.extraCss = # css
"@import './theme.css';";
gtk4.extraCss = # css
"@import './theme.css';";
};
gtk = {
gtk3.extraCss = # css
"@import './theme.css';";
gtk4.extraCss = # css
"@import './theme.css';";
theme = {
name = "Adwaita";
};
iconTheme = {
name = "Tela";
package = pkgs.tela-icon-theme;
};
};
qt.platformTheme.name = "qtct";
wayland.windowManager.hyprland = {
settings.exec-once = [
"${pkgs.swww}/bin/swww-daemon"
"theme init"
];
extraConfig = ''
source=./theme.conf
'';
};
programs.matugen = {
enable = true;
settings = {
config = {
reload_apps = true;
reload_apps_list = {
kitty = config.programs.kitty.enable;
waybar = false;
dunst = config.services.dunst.enable;
systemd.user.services = {
swww-daemon = {
Unit = {
Description = "Swww Daemon";
After = [ "graphical-session.target" ];
};
set_wallpaper = true;
wallpaper_tool = "Swww";
custom_colors =
let
mkColor = category: color: {
color = cfg.${category}.${color};
blend = cfg.${category}.blend;
};
in
{
red = mkColor "ansi" "red";
green = mkColor "ansi" "green";
yellow = mkColor "ansi" "yellow";
orange = mkColor "ansi" "orange";
blue = mkColor "ansi" "blue";
magenta = mkColor "ansi" "magenta";
cyan = mkColor "ansi" "cyan";
keywords = mkColor "syntax" "keywords";
functions = mkColor "syntax" "functions";
constants = mkColor "syntax" "constants";
properties = mkColor "syntax" "properties";
strings = mkColor "syntax" "strings";
numbers = mkColor "syntax" "numbers";
structures = mkColor "syntax" "structures";
types = mkColor "syntax" "types";
danger = mkColor "semantic" "danger";
warning = mkColor "semantic" "warning";
success = mkColor "semantic" "success";
info = mkColor "semantic" "info";
};
custom_keywords = {
padding = builtins.toString cfg.padding;
double_padding = builtins.toString (cfg.padding * 2);
radius = builtins.toString cfg.radius;
transparency = builtins.toString cfg.transparency;
blur = builtins.toString cfg.blur;
flavour = cfg.flavour;
contrast = builtins.toString cfg.contrast;
transparency_hex =
let
zeroPad = hex: if builtins.stringLength hex == 1 then "0${hex}" else hex;
in
zeroPad (lib.trivial.toHexString (builtins.floor (cfg.transparency * 255)));
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${pkgs.swww}/bin/swww-daemon";
Restart = "always";
};
};
theme-init = {
Unit = {
Description = "MD3 Evo Theme Init";
After = [
"graphical-session.target"
"swww-daemon.service"
];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${lib.getExe theme-script} init";
Restart = "on-failure";
};
};
};
templates =
let
gtk = pkgs.writeText "gtk4.css" (import ./gtk.nix);
in
{
kitty = {
input_path = ./kitty.conf;
output_path = "${config.xdg.configHome}/kitty/theme.conf";
};
nvim = {
input_path = ./nvim.vim;
output_path = "${config.xdg.configHome}/nvim/colors/md3-evo.vim";
};
hyprland = {
input_path = ./hyprland.conf;
output_path = "${config.xdg.configHome}/hypr/theme.conf";
};
anyrun = {
input_path = ./anyrun.css;
output_path = "${config.xdg.configHome}/anyrun/theme.css";
};
gtk3 = {
input_path = gtk;
output_path = "${config.xdg.configHome}/gtk-3.0/theme.css";
};
gtk4 = {
input_path = gtk;
output_path = "${config.xdg.configHome}/gtk-4.0/theme.css";
};
vesktop = {
input_path = ./discord.css;
output_path = "${config.xdg.configHome}/vesktop/themes/matugen.theme.css";
wayland.windowManager.hyprland = {
settings = {
windowrulev2 = [ "float,class:^(zenity)$" ];
decoration = {
inactive_opacity = 0.8;
shadow = {
enabled = true;
range = 32;
render_power = 8;
color = "rgba(000000aa)";
color_inactive = "rgba(00000011)";
};
};
animations = {
enabled = "yes";
bezier = [
"expoOut, 0.16, 1, 0.3, 1"
];
animation = [
"windowsIn, 1, 5, expoOut, slide bottom"
"windows, 1, 5, expoOut, slide"
"windowsOut, 1, 5, expoOut, slide bottom"
"border, 1, 10, default"
"fade, 1, 7, default"
"fadeShadow, 1, 10, default"
"fadeDim, 1, 10, default"
"workspaces, 1, 6, default"
];
};
};
extraConfig = ''
source=./theme.conf
'';
};
# TODO: include is coming in the next release
/*
xdg.configFile.niri-config = {
enable = osConfig.programs.niri.enable;
target = "niri/override.kdl";
text = ''
include "${config.xdg.configHome}/niri/config.kdl"
include "${config.programs.matugen.settings.templates.niri.output_path}"
'';
};
home.sessionVariables.NIRI_CONFIG = "${config.xdg.configHome}/niri/override.kdl";
*/
programs = {
kitty.extraConfig = ''
include ${config.programs.matugen.settings.templates.kitty.output_path}
'';
nixvim = {
opts.termguicolors = true;
colorscheme = "md3-evo";
autoCmd = [
{
event = [ "Signal" ];
pattern = [ "SIGUSR1" ];
command = # vim
"colorscheme md3-evo";
nested = true;
}
];
plugins.lualine.settings.options.theme.__raw = # lua
"function() return vim.g.lualine_theme end";
};
matugen = {
enable = true;
settings = {
config = {
version_check = false;
reload_apps_list = {
waybar = config.programs.waybar.enable;
dunst = config.services.dunst.enable;
};
wallpaper.command = lib.getExe pkgs.swww;
custom_colors =
let
mkColor = category: color: {
inherit (cfg.${category}) blend;
color = cfg.${category}.${color};
};
in
{
red = mkColor "ansi" "red";
green = mkColor "ansi" "green";
yellow = mkColor "ansi" "yellow";
orange = mkColor "ansi" "orange";
blue = mkColor "ansi" "blue";
magenta = mkColor "ansi" "magenta";
cyan = mkColor "ansi" "cyan";
keywords = mkColor "syntax" "keywords";
functions = mkColor "syntax" "functions";
constants = mkColor "syntax" "constants";
properties = mkColor "syntax" "properties";
strings = mkColor "syntax" "strings";
numbers = mkColor "syntax" "numbers";
structures = mkColor "syntax" "structures";
types = mkColor "syntax" "types";
danger = mkColor "semantic" "danger";
warning = mkColor "semantic" "warning";
success = mkColor "semantic" "success";
info = mkColor "semantic" "info";
};
custom_keywords = {
inherit (cfg) flavour;
padding = builtins.toString cfg.padding;
double_padding = builtins.toString (cfg.padding * 2);
radius = builtins.toString cfg.radius;
transparency = builtins.toString cfg.transparency;
blur = builtins.toString cfg.blur;
contrast = builtins.toString cfg.contrast;
transparency_hex =
let
zeroPad = hex: if builtins.stringLength hex == 1 then "0${hex}" else hex;
in
zeroPad (lib.trivial.toHexString (builtins.floor (cfg.transparency * 255)));
};
};
templates =
let
gtk = pkgs.writeText "gtk4.css" (import ./gtk.nix);
signal =
name: signal:
(pkgs.writeShellScript "kill-${name}" ''
pkill -${signal} -u "$USER" -x ${name} || :
'');
in
{
nvim = {
input_path = ./nvim.vim;
output_path = "${config.xdg.configHome}/nvim/colors/md3-evo.vim";
post_hook = signal "nvim" "USR1";
};
gtk3 = {
input_path = gtk;
output_path = "${config.xdg.configHome}/gtk-3.0/theme.css";
};
gtk4 = {
input_path = gtk;
output_path = "${config.xdg.configHome}/gtk-4.0/theme.css";
};
vesktop = {
input_path = ./discord.css;
output_path = "${config.xdg.configHome}/vesktop/themes/matugen.theme.css";
};
}
// (lib.optionalAttrs osConfig.programs.niri.enable {
niri = {
input_path = ./niri.kdl;
output_path = "${config.xdg.configHome}/niri/md3-evo.kdl";
};
})
// (lib.optionalAttrs config.programs.kitty.enable {
kitty = {
input_path = ./kitty.conf;
output_path = "${config.xdg.configHome}/kitty/theme.conf";
post_hook = signal ".kitty-wrapped" "USR1";
};
})
// (lib.optionalAttrs osConfig.programs.hyprland.enable {
hyprland = {
input_path = ./hyprland.conf;
output_path = "${config.xdg.configHome}/hypr/theme.conf";
post_hook = pkgs.writeShellScript "reload-hyprland-theme" ''
if command -v hyprctl &> /dev/null; then
hyprctl reload
fi
'';
};
})
// (lib.optionalAttrs config.programs.waybar.enable {
waybar = {
input_path = ./waybar.css;
output_path = "${config.xdg.configHome}/waybar/style.css";
post_hook = signal "waybar" "USR2";
};
})
// (lib.optionalAttrs config.services.swaync.enable {
swaync = {
input_path = ./swaync.css;
output_path = "${config.xdg.configHome}/swaync/style.css";
post_hook = pkgs.writeShellScript "reload-swaync" ''
if which swaync-client; then
swaync-client --reload-css
fi
'';
};
});
};
};
};
};
};
}

View File

@@ -0,0 +1,12 @@
layout {
gaps {{custom.padding}}
struts {{custom.double_padding}}
}
overview {
backdrop-color "{{colors.surface.default.hex}}"
}
window-rule {
geometry-corner-radius {{custom.radius}}
}

View File

@@ -4,14 +4,19 @@ if exists("syntax_on")
endif
let g:colors_name="md3-evo"
let g:neovide_transparency = {{custom.transparency}}
let g:neovide_opacity = 1.0
let g:neovide_floating_corner_radius = 0.5
let g:neovide_normal_opacity = {{custom.transparency}}
let g:neovide_padding_top = {{custom.padding}}
let g:neovide_padding_bottom = {{custom.padding}}
let g:neovide_padding_left = {{custom.padding}}
let g:neovide_padding_right = {{custom.padding}}
let g:neovide_floating_blur_amount_x = {{custom.blur}}
let g:neovide_floating_blur_amount_y = {{custom.blur}}
let g:neovide_floating_shadow = 0
let g:neovide_floating_shadow = v:true
let g:neovide_floating_z_height = 10
let g:neovide_light_angle_degrees = 45
let g:neovide_light_radius = 5
let g:terminal_color_0 = "{{colors.surface.default.hex}}"
let g:terminal_color_1 = "{{colors.red.default.hex}}"
@@ -32,7 +37,7 @@ let g:terminal_color_14 = "{{colors.cyan.default.hex}}"
let g:terminal_color_15 = "{{colors.on_surface_variant.default.hex}}"
set termguicolors
set background=dark
set background={{mode | to_lower}}
if exists("g:neovide")
hi! Normal guibg={{colors.surface.default.hex}} guifg={{colors.on_surface.default.hex}}
@@ -67,7 +72,12 @@ hi! TabLineFill guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.d
hi! SpecialKey guifg={{colors.primary.default.hex}}
hi! Directory guifg={{colors.primary.default.hex}}
hi! Search guifg={{colors.on_tertiary.default.hex}} guibg={{colors.tertiary.default.hex}}
hi! Search guifg={{colors.on_primary.default.hex}} guibg={{colors.primary.default.hex}}
hi! link IncSearch Search
hi! link CurSearch Search
hi! link LeapMatch Search
hi! link LeapLabel Search
hi! CmpItemKindCopilot guifg={{colors.cyan.default.hex}}
hi! CmpItemKindNpm guifg={{colors.red.default.hex}}
@@ -77,6 +87,10 @@ hi! ErrorMsg guibg={{colors.danger_container.default.hex}} guifg={{colors.on_dan
hi! WarningMsg guibg={{colors.warning_container.default.hex}} guifg={{colors.on_warning_container.default.hex}}
hi! NvimInternalError guibg={{colors.danger.default.hex}} guifg={{colors.on_danger.default.hex}}
hi! CoverageCovered guifg={{colors.success.default.hex}}
hi! CoverageUncovered guifg={{colors.danger.default.hex}}
hi! CoveragePartial guifg={{colors.warning.default.hex}}
hi! DiagnosticError guifg={{colors.danger.default.hex}}
hi! DiagnosticWarn guifg={{colors.warning.default.hex}}
hi! DiagnosticInfo guifg={{colors.info.default.hex}}
@@ -199,11 +213,14 @@ hi! link @keyword.import.cpp PreProc
hi! Type gui=none guifg={{colors.types.default.hex}}
hi! link @lsp.type.interface Type
hi! link AerialLine CursorLine
hi! IlluminatedWordText gui=none guibg={{colors.surface_container_highest.default.hex}}
hi! IlluminatedWordRead gui=none guibg={{colors.surface_container_highest.default.hex}}
hi! IlluminatedWordWrite gui=none guibg={{colors.surface_container_highest.default.hex}}
hi! MatchParen gui=none guibg={{colors.surface_container_highest.default.hex}}
hi! LspInlayHint gui=italic guifg={{colors.outline.default.hex}} guibg={{colors.surface_container_highest.default.hex}}
let g:lualine_theme = {
\ "insert": {
\ "a": {"fg": "{{colors.on_green.default.hex}}", "bg": "{{colors.green.default.hex}}", "gui": "bold"},

View File

@@ -0,0 +1,167 @@
# Somewhat adapted from https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/groups/syntax.lua
{ C, O }:
{
Comment.fg = C.outline; # just comments
SpecialComment.link = C.keywords; # special things inside a comment
Constant.fg = C.constants; # (preferred) any constant
String.fg = C.strings; # a string constant: "this is a string"
Character.fg = C.keywords; # a character constant: 'c', '\n'
Number.fg = C.numbers; # a number constant: 234, 0xff
Float.fg = C.numbers; # a floating point constant: 2.3e10
Boolean.fg = C.keywords; # a boolean constant: TRUE, false
Identifier.fg = C.on_surface; # (preferred) any variable name
Function.fg = C.functions; # function name (also: methods for classes)
Statement.fg = C.mauve; # (preferred) any statement
Conditional.fg = C.keywords; # if, then, else, endif, switch, etc.
Repeat.fg = C.keywords; # for, do, while, etc.
Label.fg = C.keywords; # case, default, etc.
Operator.fg = C.on_surface; # "sizeof", "+", "*", etc.
Keyword.fg = C.keywords; # any other keyword
Exception.fg = C.keywords; # try, catch, throw
PreProc.link = C.structures; # (preferred) generic Preprocessor
Include.fg = C.keywords; # preprocessor #include
Define.fg = C.keywords; # preprocessor #define
Macro.fg = C.keywords; # same as Define
PreCondit.fg = C.keywords; # preprocessor #if, #else, #endif, etc.
StorageClass.fg = C.keywords; # static, register, volatile, etc.
Structure.fg = C.structures; # struct, union, enum, etc.
Special.fg = C.keywords; # (preferred) any special symbol
Type.fg = C.types; # (preferred) int, long, char, etc.
Typedef.link = "Type"; # A typedef
SpecialChar.link = "Special"; # special character in a constant
Tag = C.structures; # you can use CTRL-] on this
Delimiter.fg = C.on_surface; # character that needs attention
Debug.link = "Special"; # debugging statements
Underlined.style = [ "underline" ]; # (preferred) text that stands out, HTML links
Bold.style = [ "bold" ];
Italic.style = [ "italic" ];
# ("Ignore", below, may be invisible...)
# Ignore = { }; # (preferred) left blank, hidden |hl-Ignore|
Error = {
bg = C.danger_container; # (preferred) any erroneous construct
fg = C.on_danger_container;
};
Todo = {
bg = C.yellow_container;
fg = C.on_yellow_container;
}; # (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
qfLineNr.fg = C.yellow;
qfFileName.fg = C.blue;
htmlH1 = {
fg = C.pink;
style = [ "bold" ];
};
htmlH2 = {
fg = C.blue;
style = [ "bold" ];
};
# mkdHeading = { fg = C.peach; style = [ "bold" ]; };
# mkdCode = { bg = C.terminal_black; fg = C.text; };
mkdCodeDelimiter = {
bg = C.base;
fg = C.text;
};
mkdCodeStart = {
fg = C.flamingo;
style = [ "bold" ];
};
mkdCodeEnd = {
fg = C.flamingo;
style = [ "bold" ];
};
# mkdLink = { fg = C.blue; style = [ "underline" ]; };
# debugging
debugPC = {
bg = if O.transparent_background then C.none else C.crust;
}; # used for highlighting the current line in terminal-debug
debugBreakpoint = {
bg = C.base;
fg = C.overlay0;
}; # used for breakpoint colors in terminal-debug
# illuminate
illuminatedWord = {
bg = C.surface1;
};
illuminatedCurWord = {
bg = C.surface1;
};
# diff
Added.fg = C.green;
Changed.fg = C.blue;
diffAdded.fg = C.green;
diffRemoved.fg = C.red;
diffChanged.fg = C.blue;
diffOldFile.fg = C.yellow;
diffNewFile.fg = C.peach;
diffFile.fg = C.blue;
diffLine.fg = C.overlay0;
diffIndexLine.fg = C.teal;
DiffAdd = {
bg = U.darken C.green 0.18 C.base;
}; # diff mode: Added line |diff.txt|
DiffChange = {
bg = U.darken C.blue 0.07 C.base;
}; # diff mode: Changed line |diff.txt|
DiffDelete = {
bg = U.darken C.red 0.18 C.base;
}; # diff mode: Deleted line |diff.txt|
DiffText = {
bg = U.darken C.blue 0.30 C.base;
}; # diff mode: Changed text within a changed line |diff.txt|
# NeoVim
healthError.fg = C.red;
healthSuccess.fg = C.teal;
healthWarning.fg = C.yellow;
# misc
# glyphs
GlyphPalette1.fg = C.red;
GlyphPalette2.fg = C.teal;
GlyphPalette3.fg = C.yellow;
GlyphPalette4.fg = C.blue;
GlyphPalette6.fg = C.teal;
GlyphPalette7.fg = C.text;
GlyphPalette9.fg = C.red;
# rainbow
rainbow1.fg = C.red;
rainbow2.fg = C.peach;
rainbow3.fg = C.yellow;
rainbow4.fg = C.green;
rainbow5.fg = C.sapphire;
rainbow6.fg = C.lavender;
# csv
csvCol0.fg = C.red;
csvCol1.fg = C.peach;
csvCol2.fg = C.yellow;
csvCol3.fg = C.green;
csvCol4.fg = C.sky;
csvCol5.fg = C.blue;
csvCol6.fg = C.lavender;
csvCol7.fg = C.mauve;
csvCol8.fg = C.pink;
# markdown
markdownHeadingDelimiter = {
fg = C.peach;
style = [ "bold" ];
};
markdownCode.fg = C.flamingo;
markdownCodeBlock.fg = C.flamingo;
markdownLinkText = {
fg = C.blue;
style = [ "underline" ];
};
markdownH1.link = "rainbow1";
markdownH2.link = "rainbow2";
markdownH3.link = "rainbow3";
markdownH4.link = "rainbow4";
markdownH5.link = "rainbow5";
markdownH6.link = "rainbow6";
}

View File

@@ -0,0 +1,415 @@
{ C, O }:
let
self = {
# Reference: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
# Identifiers
"@variable".fg = C.on_surface; # Any variable name that does not have another highlight.
"@variable.builtin".fg = C.keywords; # Variable names that are defined by the languages, like this or self.
"@variable.parameter".fg = C.on_surface; # For parameters of a function.
"@variable.member".fg = C.properties; # For fields.
"@constant".fg = C.constants; # For constants
"@constant.builtin".fg = C.keywords; # For constant that are built in the language: nil in Lua.
"@constant.macro".link = "Macro"; # For constants that are defined by macros: NULL in C.
"@module".fg = C.structures; # For identifiers referring to modules and namespaces.
"@label".link = "Label"; # For labels: label: in C and :label: in Lua.
# Literals
"@string".link = "String"; # For strings.
/*
"@string.documentation" = {
fg = C.teal;
style = O.styles.strings or { };
}; # For strings documenting code (e.g. Python docstrings).
"@string.regexp" = {
fg = C.pink;
style = O.styles.strings or { };
}; # For regexes.
"@string.escape" = {
fg = C.pink;
style = O.styles.strings or { };
}; # For escape characters within a string.
"@string.special".link = "Special"; # other special strings (e.g. dates)
"@string.special.path".link = "Special"; # filenames
"@string.special.symbol".fg = C.flamingo; # symbols or atoms
"@string.special.url" = {
fg = C.blue;
style = [
"italic"
"underline"
];
}; # urls, links and emails
"@punctuation.delimiter.regex" = {
link = "@string.regexp";
};
*/
"@character".link = "Character"; # character literals
"@character.special".link = "SpecialChar"; # special characters (e.g. wildcards)
"@boolean".link = "Boolean"; # For booleans.
"@number".link = "Number"; # For all numbers
"@number.float".link = "Float"; # For floats.
# Types
"@type".link = "Type"; # For types.
"@type.builtin".fg = C.keywords; # For builtin types.
"@type.definition".link = "Type"; # type definitions (e.g. `typedef` in C)
"@attribute".fg = C.properties; # attribute annotations (e.g. Python decorators)
"@property".fg = C.properties; # fields, like accessing `bar` property on `foo.bar`. Overriden later for data languages and CSS.
# Functions
"@function".link = "Function"; # For function (calls and definitions).
"@function.builtin" = {
fg = C.functions;
style = [ "bold" ];
}; # For builtin functions: table.insert in Lua.
"@function.call".link = "Function"; # function calls
"@function.macro".link = "Macro"; # For macro defined functions (calls and definitions): each macro_rules in Rust.
"@function.method".link = "Function"; # For method definitions.
"@function.method.call".link = "Function"; # For method calls.
"@constructor" = {
fg = C.yellow;
}; # For constructor calls and definitions: = { } in Lua, and Java constructors.
"@operator" = {
link = "Operator";
}; # For any operator: +, but also -> and * in C.
# Keywords
"@keyword".link = "Keyword"; # For keywords that don't fall in previous categories.
"@keyword.modifier".link = "Keyword"; # For keywords modifying other constructs (e.g. `const`, `static`, `public`)
"@keyword.type".link = "Keyword"; # For keywords describing composite types (e.g. `struct`, `enum`)
"@keyword.coroutine".link = "Keyword"; # For keywords related to coroutines (e.g. `go` in Go, `async/await` in Python)
"@keyword.function" = {
fg = C.mauve;
style = O.styles.keywords or { };
}; # For keywords used to define a function.
"@keyword.operator" = {
fg = C.mauve;
style = O.styles.keywords or { };
}; # For new keyword operator
"@keyword.import" = {
link = "Include";
}; # For includes: #include in C, use or extern crate in Rust, or require in Lua.
"@keyword.repeat" = {
link = "Repeat";
}; # For keywords related to loops.
"@keyword.return" = {
fg = C.mauve;
style = O.styles.keywords or { };
};
"@keyword.debug".link = "Exception"; # For keywords related to debugging
"@keyword.exception".link = "Exception"; # For exception related keywords.
"@keyword.conditional".link = "Conditional"; # For keywords related to conditionals.
"@keyword.conditional.ternary".link = "Operator"; # For ternary operators (e.g. `?` / `:`)
"@keyword.directive".link = "PreProc"; # various preprocessor directives & shebangs
"@keyword.directive.define".link = "Define"; # preprocessor definition directives
"@keyword.export" = {
fg = C.mauve;
style = O.styles.keywords;
}; # JS & derivative
# Punctuation
"@punctuation.delimiter".link = "Delimiter"; # For delimiters (e.g. `;` / `.` / `,`).
"@punctuation.bracket".fg = C.overlay2; # For brackets and parenthesis.
"@punctuation.special".link = "Special"; # For special punctuation that does not fall in the categories before (e.g. `{}` in string interpolation).
# Comment
"@comment".link = "Comment";
"@comment.documentation".link = "Comment"; # For comments documenting code
"@comment.error" = {
fg = C.base;
bg = C.red;
};
"@comment.warning" = {
fg = C.base;
bg = C.yellow;
};
"@comment.hint" = {
fg = C.base;
bg = C.blue;
};
"@comment.todo" = {
fg = C.base;
bg = C.flamingo;
};
"@comment.note" = {
fg = C.base;
bg = C.rosewater;
};
# Markup
"@markup" = {
fg = C.text;
}; # For strings considerated text in a markup language.
"@markup.strong" = {
fg = C.red;
style = [ "bold" ];
}; # bold
"@markup.italic" = {
fg = C.red;
style = [ "italic" ];
}; # italic
"@markup.strikethrough" = {
fg = C.text;
style = [ "strikethrough" ];
}; # strikethrough text
"@markup.underline" = {
link = "Underlined";
}; # underlined text
"@markup.heading".fg = C.blue; # titles like: # Example
"@markup.heading.markdown".style = [ "bold" ]; # bold headings in markdown, but not in HTML or other markup
"@markup.math".fg = C.blue; # math environments (e.g. `$ ... $` in LaTeX)
"@markup.quote".fg = C.pink; # block quotes
"@markup.environment".fg = C.pink; # text environments of markup languages
"@markup.environment.name".fg = C.blue; # text indicating the type of an environment
"@markup.link".fg = C.lavender; # text references, footnotes, citations, etc.
"@markup.link.label".fg = C.lavender; # link, reference descriptions
"@markup.link.url" = {
fg = C.blue;
style = [
"italic"
"underline"
];
}; # urls, links and emails
"@markup.raw" = {
fg = C.green;
}; # used for inline code in markdown and for doc in python (""")
"@markup.list" = {
fg = C.teal;
};
"@markup.list.checked" = {
fg = C.green;
}; # todo notes
"@markup.list.unchecked" = {
fg = C.overlay1;
}; # todo notes
# Diff
"@diff.plus" = {
link = "diffAdded";
}; # added text (for diff files)
"@diff.minus" = {
link = "diffRemoved";
}; # deleted text (for diff files)
"@diff.delta" = {
link = "diffChanged";
}; # deleted text (for diff files)
# Tags
"@tag" = {
fg = C.blue;
}; # Tags like HTML tag names.
"@tag.builtin" = {
fg = C.blue;
}; # JSX tag names.
"@tag.attribute" = {
fg = C.yellow;
style = O.styles.miscs or [ "italic" ];
}; # XML/HTML attributes (foo in foo="bar").
"@tag.delimiter" = {
fg = C.teal;
}; # Tag delimiter like < > /
# Misc
"@error" = {
link = "Error";
};
# Language specific:
"@function.builtin.bash" = {
fg = C.red;
style = O.styles.miscs or [ "italic" ];
};
"@variable.parameter.bash" = {
fg = C.green;
};
"@markup.heading.1.markdown".link = "rainbow1";
"@markup.heading.2.markdown".link = "rainbow2";
"@markup.heading.3.markdown".link = "rainbow3";
"@markup.heading.4.markdown".link = "rainbow4";
"@markup.heading.5.markdown".link = "rainbow5";
"@markup.heading.6.markdown".link = "rainbow6";
"@markup.heading.html" = {
link = "@markup";
};
"@markup.heading.1.html" = {
link = "@markup";
};
"@markup.heading.2.html" = {
link = "@markup";
};
"@markup.heading.3.html" = {
link = "@markup";
};
"@markup.heading.4.html" = {
link = "@markup";
};
"@markup.heading.5.html" = {
link = "@markup";
};
"@markup.heading.6.html" = {
link = "@markup";
};
"@constant.java" = {
fg = C.teal;
};
"@property.css" = {
fg = C.blue;
};
"@property.scss" = {
fg = C.blue;
};
"@property.id.css" = {
fg = C.yellow;
};
"@property.class.css" = {
fg = C.yellow;
};
"@type.css" = {
fg = C.lavender;
};
"@type.tag.css" = {
fg = C.blue;
};
"@string.plain.css" = {
fg = C.text;
};
"@number.css" = {
fg = C.peach;
};
"@keyword.directive.css" = {
link = "Keyword";
}; # CSS at-rules
"@string.special.url.html" = {
fg = C.green;
}; # Links in href, src attributes.
"@markup.link.label.html" = {
fg = C.text;
}; # Text between <a></a> tags.
"@character.special.html" = {
fg = C.red;
}; # Symbols such as &nbsp;.
"@constructor.lua" = {
link = "@punctuation.bracket";
}; # For constructor calls and definitions: = { } in Lua.
"@constructor.python" = {
fg = C.sky;
}; # __init__(), __new__().
"@label.yaml" = {
fg = C.yellow;
}; # Anchor and alias names.
"@string.special.symbol.ruby" = {
fg = C.flamingo;
};
"@function.method.php" = {
link = "Function";
};
"@function.method.call.php" = {
link = "Function";
};
"@keyword.import.c" = {
fg = C.yellow;
};
"@keyword.import.cpp" = {
fg = C.yellow;
};
"@attribute.c_sharp" = {
fg = C.yellow;
};
"@comment.warning.gitcommit" = {
fg = C.yellow;
};
"@string.special.path.gitignore" = {
fg = C.text;
};
gitcommitSummary = {
fg = C.rosewater;
style = O.styles.miscs or [ "italic" ];
};
zshKSHFunction = {
link = "Function";
};
# Legacy highlights
"@parameter" = self."@variable.parameter";
"@field" = self."@variable.member";
"@namespace" = self."@module";
"@float" = self."@number.float";
"@symbol" = self."@string.special.symbol";
"@string.regex" = self."@string.regexp";
"@text" = self."@markup";
"@text.strong" = self."@markup.strong";
"@text.emphasis" = self."@markup.italic";
"@text.underline" = self."@markup.underline";
"@text.strike" = self."@markup.strikethrough";
"@text.uri" = self."@markup.link.url";
"@text.math" = self."@markup.math";
"@text.environment" = self."@markup.environment";
"@text.environment.name" = self."@markup.environment.name";
"@text.title" = self."@markup.heading";
"@text.literal" = self."@markup.raw";
"@text.reference" = self."@markup.link";
"@text.todo.checked" = self."@markup.list.checked";
"@text.todo.unchecked" = self."@markup.list.unchecked";
"@text.todo" = self."@comment.todo";
"@text.warning" = self."@comment.warning";
"@text.note" = self."@comment.note";
"@text.danger" = self."@comment.error";
"@method" = self."@function.method";
"@method.call" = self."@function.method.call";
"@text.diff.add" = self."@diff.plus";
"@text.diff.delete" = self."@diff.minus";
"@type.qualifier" = self."@keyword.modifier";
"@keyword.storage" = self."@keyword.modifier";
"@define" = self."@keyword.directive.define";
"@preproc" = self."@keyword.directive";
"@storageclass" = self."@keyword.storage";
"@conditional" = self."@keyword.conditional";
"@exception" = self."@keyword.exception";
"@include" = self."@keyword.import";
"@repeat" = self."@keyword.repeat";
"@symbol.ruby" = self."@string.special.symbol.ruby";
"@variable.member.yaml" = self."@field.yaml";
"@text.title.1.markdown" = self."@markup.heading.1.markdown";
"@text.title.2.markdown" = self."@markup.heading.2.markdown";
"@text.title.3.markdown" = self."@markup.heading.3.markdown";
"@text.title.4.markdown" = self."@markup.heading.4.markdown";
"@text.title.5.markdown" = self."@markup.heading.5.markdown";
"@text.title.6.markdown" = self."@markup.heading.6.markdown";
"@method.php" = self."@function.method.php";
"@method.call.php" = self."@function.method.call.php";
};
in
self

View File

@@ -0,0 +1,375 @@
syntax error
* {
font-size: 14px;
font-family: "Noto Sans";
transition: 100ms;
box-shadow: unset;
}
.control-center .notification-row {
background-color: unset;
}
.control-center .notification-row .notification-background .notification,
.control-center
.notification-row
.notification-background
.notification
.notification-content,
.floating-notifications
.notification-row
.notification-background
.notification,
.floating-notifications.background
.notification-background
.notification
.notification-content {
margin-bottom: unset;
}
.control-center .notification-row .notification-background .notification {
margin-top: 0.15rem;
}
.control-center .notification-row .notification-background .notification box,
.control-center .notification-row .notification-background .notification widget,
.control-center
.notification-row
.notification-background
.notification
.notification-content,
.floating-notifications
.notification-row
.notification-background
.notification
box,
.floating-notifications
.notification-row
.notification-background
.notification
widget,
.floating-notifications.background
.notification-background
.notification
.notification-content {
border: unset;
border-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
}
.floating-notifications.background
.notification-background
.notification
.notification-content,
.control-center .notification-background .notification .notification-content {
background-color: {{colors.background.default.hex}};
padding: 0.818rem;
padding-right: unset;
margin-right: unset;
}
.control-center
.notification-row
.notification-background
.notification.low
.notification-content
label,
.control-center
.notification-row
.notification-background
.notification.normal
.notification-content
label,
.floating-notifications.background
.notification-background
.notification.low
.notification-content
label,
.floating-notifications.background
.notification-background
.notification.normal
.notification-content
label {
color: {{colors.outline.default.hex}};
}
.control-center
.notification-row
.notification-background
.notification..notification-content
image,
.control-center
.notification-row
.notification-background
.notification.normal
.notification-content
image,
.floating-notifications.background
.notification-background
.notification.low
.notification-content
image,
.floating-notifications.background
.notification-background
.notification.normal
.notification-content
image {
background-color: {{colors.surface_container_high.default.hex}};
color: {{colors.on_surface.default.hex}};
}
.control-center
.notification-row
.notification-background
.notification.critical
.notification-content,
.floating-notifications.background
.notification-background
.notification.critical
.notification-content {
background-color: {{colors.surface_container_high.default.hex}};
color: {{colors.on_surface.default.hex}};
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.summary,
.floating-notifications.background
.notification-background
.notification
.notification-content
.summary {
font-family: "Noto Sans", sans-serif;
font-size: 0.9909rem;
font-weight: 500;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.time,
.floating-notifications.background
.notification-background
.notification
.notification-content
.time {
font-family: "Noto Sans", sans-serif;
font-size: 0.8291rem;
font-weight: 500;
margin-right: 1rem;
padding-right: unset;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.body,
.floating-notifications.background
.notification-background
.notification
.notification-content
.body {
font-family: "Noto Sans", sans-serif;
font-size: 0.8891rem;
font-weight: 400;
margin-top: 0.31rem;
padding-right: unset;
margin-right: unset;
}
.control-center .notification-row .close-button,
.floating-notifications.background .close-button {
background-color: unset;
border-radius: 100%;
border: none;
box-shadow: none;
margin-right: 13px;
margin-top: 6px;
margin-bottom: unset;
padding-bottom: unset;
min-height: 20px;
min-width: 20px;
text-shadow: none;
}
.control-center .notification-row .close-button:hover,
.floating-notifications.background .close-button:hover {
background-color: rgba({{colors.background.default.red}}, {{colors.background.default.green}}, {{colors.background.default.blue}}, 0.15);
}
.control-center {
border-radius: 1.705rem;
-gtk-outline-radius: 1.705rem;
border-top: 1px solid rgba(164, 162, 167, 0.19);
border-left: 1px solid rgba(164, 162, 167, 0.19);
border-right: 1px solid rgba(128, 127, 132, 0.145);
border-bottom: 1px solid rgba(128, 127, 132, 0.145);
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.45);
margin: 7px;
background-color: {{colors.background.default.hex}};
padding: 1.023rem;
}
.control-center trough {
border-radius: 9999px;
-gtk-outline-radius: 9999px;
min-width: 0.545rem;
background-color: transparent;
}
.control-center slider {
border-radius: 9999px;
-gtk-outline-radius: 9999px;
min-width: 0.273rem;
min-height: 2.045rem;
background-color: rgba(199, 197, 208, 0.31);
}
.control-center slider:hover {
background-color: rgba(199, 197, 208, 0.448);
}
.control-center slider:active {
background-color: #77767e;
}
/* title widget */
.widget-title {
padding: 0.341rem;
margin: unset;
}
.widget-title label {
font-family: "Noto Sans", sans-serif;
font-size: 1.364rem;
color: {{colors.on_background.default.hex}};
margin-left: 0.941rem;
}
.widget-title button {
border: unset;
background-color: unset;
border-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
padding: 0.141rem 0.141rem;
margin-right: 0.841rem;
}
.widget-title button label {
font-family: "Noto Sans", sans-serif;
font-size: 1.0409rem;
color: {{colors.on_background.default.hex}};
margin-right: 0.841rem;
}
.widget-title button:hover {
background-color: rgba(128, 128, 128, 0.3);
}
.widget-title button:active {
background-color: rgba(128, 128, 128, 0.7);
}
/* Buttons widget */
.widget-buttons-grid {
border-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
padding: 0.341rem;
background-color: rgba(28, 28, 34, 0.35);
padding: unset;
}
.widget-buttons-grid > flowbox {
padding: unset;
}
.widget-buttons-grid > flowbox > flowboxchild > button:first-child {
margin-left: unset;
}
.widget-buttons-grid > flowbox > flowboxchild > button {
border: none;
background-color: unset;
border-radius: 9999px;
min-width: 5.522rem;
min-height: 2.927rem;
padding: unset;
margin: unset;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-family: "Materials Symbol Rounded";
font-size: 1.3027rem;
color: #e4e1e6;
}
.widget-buttons-grid > flowbox > flowboxchild > button:hover {
background-color: rgba(128, 128, 128, 0.3);
}
.widget-buttons-grid > flowbox > flowboxchild > button:checked {
/* OnePlus McClaren edition Orange accent */
background-color: #ff9f34;
}
.widget-buttons-grid > flowbox > flowboxchild > button:checked label {
color: #14141b;
}
/* Volume widget */
.widget-volume {
background-color: rgba(28, 28, 34, 0.35);
padding: 8px;
margin: 8px;
-gtk-outline-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
}
.widget-volume trough {
/* OnePlus McClaren edition Orange accent */
border: unset;
background-color: rgba(128, 128, 128, 0.4);
}
.widget-volume trough slider {
/* OnePlus McClaren edition Orange accent */
color: unset;
background-color: #ff9f34;
border-radius: 100%;
min-height: 1.25rem;
}
/* Mpris widget */
.widget-mpris {
background-color: rgba(28, 28, 34, 0.35);
padding: 8px;
margin: 8px;
border-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
}
.widget-mpris-player {
padding: 8px;
margin: 8px;
}
.widget-mpris-title {
font-weight: bold;
font-size: 1.25rem;
}
.widget-mpris-subtitle {
font-size: 1.1rem;
}

View File

@@ -0,0 +1,70 @@
window#waybar {
background: none;
border-bottom: none;
}
window#waybar > box.horizontal {
margin: 12px 24px 0;
}
.module {
color: white;
background: none;
margin: 0 8px;
}
#clock {
font-weight: bold;
font-size: 16px;
}
#privacy-item {
padding: 0 16px;
border-radius: 16px;
}
#pulseaudio-slider {
margin: 0 6px;
padding: 0;
}
#pulseaudio-slider slider {
background: none;
min-height: 12px;
min-width: 12px;
border-radius: 100%;
margin: 0;
opacity: 0;
background-image: none;
border: none;
box-shadow: none;
}
#pulseaudio-slider trough {
min-height: 12px;
min-width: 80px;
border-radius: 6px;
background-color: {{colors.on_primary.default.hex}};
}
#pulseaudio-slider highlight {
min-width: 12px;
border-radius: 6px;
background-color: {{colors.primary.default.hex}};
}
#privacy-item.audio-in {
background: {{colors.primary.default.hex}};
color: {{colors.on_primary.default.hex}};
}
#privacy-item.audio-out {
background: {{colors.secondary.default.hex}};
color: {{colors.on_secondary.default.hex}};
}
#privacy-item.screenshare {
background: {{colors.tertiary.default.hex}};
color: {{colors.on_tertiary.default.hex}};
}

View File

@@ -1,4 +1,10 @@
{ config, lib, ... }:
{
config,
lib,
pkgs,
username,
...
}:
with lib;
@@ -11,21 +17,88 @@ in
};
config = mkIf cfg.enable {
users.users.${username}.linger = true;
boot = {
loader.timeout = 0;
# plymouth.enable = true;
plymouth.enable = true;
kernelParams = [
"quiet"
#"fbcon=nodefer"
#"fbcon=map:123"
"rd.udev.log_level=3"
"rd.systemd.show_status=false"
"udev.log_priority=3"
"vt.global_cursor_default=0" # no cursor blinking
];
consoleLogLevel = 0;
initrd.verbose = false;
initrd = {
verbose = false;
systemd = {
enable = true;
services = {
#plymouth-quit.wantedBy = lib.mkForce [ ];
# plymouth-quit-wait.wantedBy = lib.mkForce [ ];
};
};
};
};
systemd.services = {
plymouth-quit-wait = {
after = lib.mkForce [ ];
wantedBy = lib.mkForce [ ];
};
plymouth-quit = {
after = lib.mkForce [
"graphical.target"
"greetd.service"
];
wantedBy = lib.mkForce [ "graphical.target" ];
serviceConfig = {
ExecStart = [
""
"-${pkgs.plymouth}/bin/plymouth quit --retain-splash"
/*
"-${
(lib.getExe (
pkgs.writeShellApplication {
name = "plymouth-quit-delayed";
text = ''
${pkgs.kbd}/bin/chvt 2; ${pkgs.coreutils}/bin/sleep 1; exec ${pkgs.plymouth}/bin/plymouth quit --retain-splash
'';
}
))
}"
*/
];
TTYVTDisallocate = true;
};
/*
serviceConfig = {
Type = "forking";
ExecStart = [
""
(lib.getExe (
pkgs.writeShellApplication {
name = "plymouth-quit-delayed";
text = ''
${pkgs.coreutils}/bin/sleep 5
${pkgs.plymouth}/bin/plymouth quit --retain-splash
'';
}
))
];
};
/*
after = lib.mkForce [ ];
wantedBy = lib.mkForce [ ];
serviceConfig.ExecStart = [
"-${pkgs.coreutils}/bin/sleep 5"
"-${pkgs.plymouth}/bin/plymouth quit"
];
*/
};
};
};
}

View File

@@ -4,13 +4,15 @@
./boot/quiet.nix
./desktops/hyprland.nix
./desktops/gamescope.nix
./desktops/niri.nix
./fonts/fira-code.nix
./fonts/noto-sans.nix
./fonts/nerdfonts.nix
./fonts/nerd-fonts.nix
./fonts/open-dyslexic.nix
./hardware/hid-fanatecff.nix
./hardware/astro-a50.nix
./hardware/audio.nix
./hardware/gbmonctl.nix
./hardware/nvidia-proprietary.nix
@@ -18,6 +20,7 @@
./hardware/amdgpu.nix
./hardware/cc1.nix
./hardware/fv43u.nix
./hardware/pimax.nix
./hardware/q3279vwf.nix
./hardware/virtual-camera.nix
@@ -30,8 +33,17 @@
./services/airprint.nix
./shell/waybar.nix
./shell/dunst.nix
./shell/firefox-pip.nix
./shell/flameshot.nix
./shell/gnome-keyring.nix
./shell/grimblast.nix
./shell/hyprpicker.nix
./shell/kde-connect.nix
./shell/kitty.nix
./shell/swaync.nix
./shell/walker.nix
./shell/waybar.nix
./xdg/forced-compliance.nix
];

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