mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-09 11:12:57 +00:00
Compare commits
101 Commits
a1c4af6fd9
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
6cb301eb81
|
|||
|
63a657fc84
|
|||
|
a8528b7fcd
|
|||
|
0b0b568916
|
|||
|
02103e2585
|
|||
|
de9477ad84
|
|||
|
3bf3bf5fa5
|
|||
|
ef0b2b07ef
|
|||
|
f530957112
|
|||
|
674daa80d1
|
|||
|
8ad676580e
|
|||
|
80d26f037b
|
|||
|
3b3a15322b
|
|||
|
d33d53c6fb
|
|||
|
fc8066a248
|
|||
|
51196aaefa
|
|||
|
ae93255200
|
|||
|
d5eb686f7f
|
|||
|
69eafb5594
|
|||
|
5ad6324de6
|
|||
|
c1145e6319
|
|||
|
4a6c182385
|
|||
|
8198e46252
|
|||
|
6d296224ce
|
|||
|
6145732891
|
|||
|
71384d0740
|
|||
|
d3f752328f
|
|||
|
5c9bf6838c
|
|||
|
75e460293c
|
|||
|
c570ea0f54
|
|||
|
86f5331def
|
|||
|
e220474055
|
|||
|
7f5076755c
|
|||
|
e414e3ac7b
|
|||
|
3fd867084a
|
|||
|
abace8ec55
|
|||
|
af6f381e49
|
|||
|
876650cf2e
|
|||
|
d570d170f0
|
|||
|
37b65c6b7f
|
|||
|
8ba3365456
|
|||
|
56f3c3c5e9
|
|||
|
86025dc787
|
|||
|
8cd05c1d8f
|
|||
|
4103176fa4
|
|||
|
d3de8874bc
|
|||
|
05b437dbf8
|
|||
|
62639b6002
|
|||
|
48e66ab57a
|
|||
|
7bf49268f2
|
|||
|
34a7ef00fd
|
|||
|
df0600601b
|
|||
|
6eb4b228ff
|
|||
|
c020c969d0
|
|||
|
cf25eb2ad6
|
|||
|
8c83619275
|
|||
|
01a45e8bba
|
|||
|
f899bd1cb5
|
|||
|
b01574822a
|
|||
|
11ce7be6ff
|
|||
|
69db03c140
|
|||
|
84004b6391
|
|||
|
998a7b9166
|
|||
|
8a1ff0202f
|
|||
|
dbd50e4a65
|
|||
|
4e6c0f1603
|
|||
|
1e7ffc3603
|
|||
|
e70a66a907
|
|||
|
4c0efbafa0
|
|||
|
2ce5fb4d43
|
|||
|
3ca6f9fa70
|
|||
|
8efcf832a9
|
|||
|
78a04e80b5
|
|||
|
c6082902a4
|
|||
|
a060be6995
|
|||
|
ac1773445f
|
|||
|
023e20aeb8
|
|||
|
1ccda0daaa
|
|||
|
9b38825bfe
|
|||
|
a6cd5def22
|
|||
|
4b78ba79cc
|
|||
|
8eec63e5f3
|
|||
|
eb85d22494
|
|||
|
3d91c3221e
|
|||
|
de983e8f6d
|
|||
|
2f5f6de2cd
|
|||
|
1cb7b57306
|
|||
|
44ed425adb
|
|||
|
041f8917d2
|
|||
|
d18b3d1683
|
|||
|
b801064f84
|
|||
|
552e85b6b6
|
|||
|
b24359b712
|
|||
|
93e5f439f4
|
|||
|
0603bb1123
|
|||
|
d7ceb1e7be
|
|||
|
1b330bddc1
|
|||
|
a43b7764d4
|
|||
|
f0d3715fb2
|
|||
|
4a77b9acbd
|
|||
|
24ba16c842
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
||||
result
|
||||
deploy-luci.sh
|
||||
deploy-luci-now.sh
|
||||
|
||||
@@ -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
|
||||
|
||||
1
admins/theaninova.id_ed25519_sk.pub
Normal file
1
admins/theaninova.id_ed25519_sk.pub
Normal file
@@ -0,0 +1 @@
|
||||
sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPX+YdfBdTBT3wXyWkXt3k+kFYqXxSFMAHE85bOUxkJJAAAABHNzaDo= theaninova@MONSTER
|
||||
479
flake.lock
generated
479
flake.lock
generated
@@ -1,100 +1,22 @@
|
||||
{
|
||||
"nodes": {
|
||||
"anyrun": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713259062,
|
||||
"narHash": "sha256-WTO84hUL8IlNuHDK2yOCeJ38EewFzGt5E0kzBjNWxa8=",
|
||||
"owner": "Kirottu",
|
||||
"repo": "anyrun",
|
||||
"rev": "f9d30e34fa4ccb2797c6becec37e8bcff6585d39",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Kirottu",
|
||||
"repo": "anyrun",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713532798,
|
||||
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"revCount": 57,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"dirt-samples-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"lastModified": 1698439458,
|
||||
"narHash": "sha256-Mp8qBpsOvW9Zguv95Kv7EU6S3ICaF2aO02Wz6xGURtE=",
|
||||
"owner": "tidalcycles",
|
||||
"repo": "dirt-samples",
|
||||
"rev": "9a6dff8f9ec3cd55b287290cf04e01afa6b8f532",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"owner": "tidalcycles",
|
||||
"repo": "dirt-samples",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"anyrun",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696343447,
|
||||
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
@@ -102,11 +24,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712014858,
|
||||
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
|
||||
"lastModified": 1765835352,
|
||||
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
|
||||
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -115,64 +37,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"pre-commit-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -180,32 +44,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714042918,
|
||||
"narHash": "sha256-4AItZA3EQIiSNAxliuYEJumw/LaVfrMv84gYyrs0r3U=",
|
||||
"lastModified": 1766881808,
|
||||
"narHash": "sha256-JR7A2xS3EBPWFeONzhqez5vp7nKEsp7eLj2Ks210Srk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0c5704eceefcb7bb238a958f532a86e3b59d76db",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713992342,
|
||||
"narHash": "sha256-bW7K4WPo6jhYMo4ZUGoJfog6xJV0XZh8adXqZKunRoc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2f072c127c041eec36621b8e38a531fe0fe07961",
|
||||
"rev": "d2e0458d6531885600b346e161c38790dc356fa8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -216,52 +59,107 @@
|
||||
},
|
||||
"matugen": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714427480,
|
||||
"narHash": "sha256-m6iICMLTIfcD6BQMR03Y946f+tmb6pseew+ZVwqY/YI=",
|
||||
"owner": "Theaninova",
|
||||
"lastModified": 1731508795,
|
||||
"narHash": "sha256-+UibbVz5CTisKMms/5VXGe39FYr56qzaEtX4TWQPkjk=",
|
||||
"owner": "InioX",
|
||||
"repo": "matugen",
|
||||
"rev": "1d4cb4ee1b407df5cb9eec89e54a8e9912ea5a5b",
|
||||
"rev": "cb9f81eb0150f6253895ea0adb1daa8534c15fc7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Theaninova",
|
||||
"ref": "add-home-manager-module",
|
||||
"owner": "InioX",
|
||||
"ref": "v2.4.1",
|
||||
"repo": "matugen",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"niri": {
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713946171,
|
||||
"narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7",
|
||||
"lastModified": 1766765523,
|
||||
"narHash": "sha256-DCk3GKdKZNjpvNuDy9ZVfVwCy3tlm96/UZnYkJO7N44=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "a3e638c75d07de759421e6f34bd69c3f9a0a3567",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1756556321,
|
||||
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"ref": "v25.08",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1766751930,
|
||||
"narHash": "sha256-83/YSW6c58i/iwGzAFApuMy6MCgoIaROeCcoIGh+ViU=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "b5640d5293ad8dca06cb447692ea7cbb21680eb1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-flatpak": {
|
||||
"locked": {
|
||||
"lastModified": 1739444422,
|
||||
"narHash": "sha256-iAVVHi7X3kWORftY+LVbRiStRnQEob2TULWyjMS6dWg=",
|
||||
"owner": "gmodena",
|
||||
"repo": "nix-flatpak",
|
||||
"rev": "5e54c3ca05a7c7d968ae1ddeabe01d2a9bc1e177",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gmodena",
|
||||
"ref": "latest",
|
||||
"repo": "nix-flatpak",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1691186842,
|
||||
"narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=",
|
||||
"lastModified": 1766651565,
|
||||
"narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "18036c0be90f4e308ae3ebcab0e14aae0336fe42",
|
||||
"rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -271,40 +169,36 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1714076141,
|
||||
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
|
||||
"lastModified": 1766736597,
|
||||
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856",
|
||||
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714142618,
|
||||
"narHash": "sha256-0ijCe5k7Q569PO/hP/yryh9aB33zJyjs4NKbPQxVW8c=",
|
||||
"lastModified": 1766918207,
|
||||
"narHash": "sha256-G/Msy+w6e6W5Z517draGcMC0Fqpl4cfutZS5ijndpyM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "0fc190144f9acf72ae8705ea304577e90389da20",
|
||||
"rev": "51ae9913767528723397e1b227bd32a080058bb5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -313,57 +207,31 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1714153552,
|
||||
"narHash": "sha256-+3CdMPm0E4fExxj3xZ8nZY/TW/Tc0BczK4DopNdr6gY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "8f0f28c3bf4fb66368ecf10fd742a44c7f816d35",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713954846,
|
||||
"narHash": "sha256-RWFafuSb5nkWGu8dDbW7gVb8FOQOPqmX/9MlxUUDguw=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "6fb82e44254d6a0ece014ec423cb62d92435336f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"anyrun": "anyrun",
|
||||
"home-manager": "home-manager",
|
||||
"matugen": "matugen",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"niri": "niri",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim",
|
||||
"nur": "nur"
|
||||
"tidalcycles": "tidalcycles"
|
||||
}
|
||||
},
|
||||
"superdirt-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1697377840,
|
||||
"narHash": "sha256-9qU9CHYAXbN1IE3xXDqGipuroifVaSVXj3c/cDfwM80=",
|
||||
"owner": "musikinformatik",
|
||||
"repo": "superdirt",
|
||||
"rev": "c7f32998572984705d340e7c1b9ed9ad998a39b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "musikinformatik",
|
||||
"repo": "superdirt",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
@@ -396,18 +264,111 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"tidal-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"lastModified": 1712519522,
|
||||
"narHash": "sha256-LbvxQmVxHElidCgvt+w0g1k+QQbNLebK46vtRCgsLeQ=",
|
||||
"owner": "tidalcycles",
|
||||
"repo": "tidal",
|
||||
"rev": "88f09edf6bef2228d5f530dea872b08a9d803066",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"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": 1766429945,
|
||||
"narHash": "sha256-9Kv4gWagx/u4RfZJzBMAoagW9ava5waxd+XoTkzqF7E=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "0dde7ca1d3a8e8c5082533d76084e2aa02bef70e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
||||
163
flake.nix
163
flake.nix
@@ -1,18 +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";
|
||||
};
|
||||
tidalcycles = {
|
||||
url = "github:mitchmindtree/tidalcycles.nix/?ref=0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
@@ -20,64 +27,131 @@
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
nur,
|
||||
home-manager,
|
||||
nixvim,
|
||||
anyrun,
|
||||
matugen,
|
||||
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";
|
||||
};
|
||||
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 { };
|
||||
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
|
||||
niri.nixosModules.niri
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
{
|
||||
_module.args = {
|
||||
inherit username;
|
||||
_module.args =
|
||||
let
|
||||
patchDesktop =
|
||||
pkg: appName: from: to:
|
||||
pkgs.lib.hiPrio (
|
||||
pkgs.runCommand "$patched-desktop-entry-for-${appName}" { } ''
|
||||
${pkgs.coreutils}/bin/mkdir -p $out/share/applications
|
||||
${pkgs.gnused}/bin/sed 's#${from}#${to}#g' < ${pkg}/share/applications/${appName}.desktop > $out/share/applications/${appName}.desktop
|
||||
''
|
||||
);
|
||||
GPUOffloadApp = pkg: desktopName: patchDesktop pkg desktopName "^Exec=" "Exec=nvidia-offload ";
|
||||
gpu-offload =
|
||||
config: pkg: desktopName:
|
||||
if config.hardware.nvidia.prime.offload.enable then GPUOffloadApp pkg desktopName else pkg;
|
||||
in
|
||||
{
|
||||
inherit username hostname gpu-offload;
|
||||
};
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
randomizedDelaySec = "14m";
|
||||
options = "--deleteOlderThan 10d";
|
||||
};
|
||||
};
|
||||
networking.hostName = hostname;
|
||||
services.flatpak.enable = true;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit username inputs;
|
||||
inherit username hostname inputs;
|
||||
};
|
||||
sharedModules = [
|
||||
./overlays/matugen/hm-module.nix
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
nixvim.homeModules.nixvim
|
||||
./modules/home-manager/modules/nixvim
|
||||
];
|
||||
users.${username} = {
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
randomizedDelaySec = "14m";
|
||||
options = "--deleteOlderThan 10d";
|
||||
};
|
||||
imports = [
|
||||
matugen.homeManagerModules.default
|
||||
./modules/home-manager
|
||||
./hosts/${hostname}/home.nix
|
||||
];
|
||||
@@ -89,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;
|
||||
|
||||
@@ -2,38 +2,21 @@
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixVersions.unstable;
|
||||
settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
gc = {
|
||||
automatic = true;
|
||||
randomizedDelaySec = "14m";
|
||||
options = "--deleteOlderThan 10d";
|
||||
};
|
||||
};
|
||||
|
||||
# I'm not happy about this but if I try to get ESP IDF working
|
||||
# on nix for any longer I'm gonna lose my sanity
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
loader.timeout = 0;
|
||||
|
||||
quiet.enable = true;
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = pkgs.linuxPackages_xanmod_stable;
|
||||
kernelModules = [ "sg" ];
|
||||
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
editor = false;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
};
|
||||
|
||||
xdg.forced-compliance.enable = true;
|
||||
@@ -44,28 +27,61 @@
|
||||
development = {
|
||||
enable = true;
|
||||
angular.enable = true;
|
||||
android.enable = true;
|
||||
svelte.enable = true;
|
||||
docker.enable = true;
|
||||
};
|
||||
windows-vm.enable = true;
|
||||
};
|
||||
|
||||
shell.components = {
|
||||
firefox-pip.enable = true;
|
||||
# grimblast.enable = true;
|
||||
gnome-keyring.enable = true;
|
||||
# hyprpicker.enable = true;
|
||||
kde-connect.enable = true;
|
||||
kitty.enable = true;
|
||||
swaync.enable = true;
|
||||
walker.enable = true;
|
||||
waybar.enable = true;
|
||||
dunst.enable = true;
|
||||
};
|
||||
desktops = {
|
||||
hyprland.enable = true;
|
||||
# gamescope.enable = true;
|
||||
};
|
||||
desktops.niri.enable = true;
|
||||
locale.preset.theaninova.enable = true;
|
||||
|
||||
networking.hosts = {
|
||||
"127.0.0.1:57461" = [ "ai.local" ];
|
||||
};
|
||||
services = {
|
||||
ollama.enable = false;
|
||||
open-webui = {
|
||||
enable = false;
|
||||
port = 57461;
|
||||
environment = {
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
DO_NOT_TRACK = "True";
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
WEBUI_AUTH = "False";
|
||||
};
|
||||
};
|
||||
|
||||
xserver.xkb.variant = "altgr-intl";
|
||||
xserver.xkb.layout = "us";
|
||||
|
||||
airprint.enable = true;
|
||||
|
||||
udev.packages = with pkgs; [
|
||||
usb-sniffer
|
||||
];
|
||||
};
|
||||
|
||||
hardware = {
|
||||
amdgpu.preset.default.enable = true;
|
||||
audio.preset.pipewire.enable = true;
|
||||
cc1.enable = true;
|
||||
fv43u.enable = true;
|
||||
virtual-camera.enable = true;
|
||||
hid-fanatecff.enable = true;
|
||||
astro-a50.enable = true;
|
||||
# virtual-camera.enable = true;
|
||||
# hid-fanatecff.enable = true;
|
||||
|
||||
enableAllFirmware = true;
|
||||
bluetooth = {
|
||||
@@ -74,6 +90,33 @@
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
/*
|
||||
statech = {
|
||||
image = "eclipse-temurin:21-jre";
|
||||
volumes = [ "/home/theaninova/.config/statech:/statech" ];
|
||||
environment = { };
|
||||
ports = [ "25565:25565" ];
|
||||
workdir = "/statech";
|
||||
entrypoint = "/bin/bash";
|
||||
cmd = [ "start.sh" ];
|
||||
extraOptions = [ "--network=host" ];
|
||||
};
|
||||
*/
|
||||
/*
|
||||
craftoria = {
|
||||
image = "eclipse-temurin:21-jre";
|
||||
volumes = [ "/home/theaninova/.config/craftoria:/craftoria" ];
|
||||
environment = { };
|
||||
ports = [ "25565:25565" ];
|
||||
workdir = "/craftoria";
|
||||
entrypoint = "/bin/bash";
|
||||
cmd = [ "startserver.sh" ];
|
||||
extraOptions = [ "--network=host" ];
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fira-code = {
|
||||
enable = true;
|
||||
@@ -83,14 +126,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=" "
|
||||
'';
|
||||
@@ -98,20 +145,28 @@
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wireshark"
|
||||
"scanner"
|
||||
"lp"
|
||||
"storage"
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"video"
|
||||
"plugdev"
|
||||
"adbusers"
|
||||
"cdrom"
|
||||
"kvm"
|
||||
];
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Essential utils
|
||||
nix-output-monitor
|
||||
alacritty
|
||||
usbutils
|
||||
usbimager
|
||||
uhubctl
|
||||
usb-sniffer
|
||||
pciutils
|
||||
htop
|
||||
unar
|
||||
@@ -121,6 +176,8 @@
|
||||
graphicsmagick
|
||||
ffmpeg
|
||||
nfs-utils
|
||||
opensc
|
||||
openssl
|
||||
# Essential command line apps
|
||||
neovim
|
||||
mc
|
||||
@@ -132,36 +189,18 @@
|
||||
];
|
||||
|
||||
networking = {
|
||||
firewall.allowedUDPPorts = [ 50765 ];
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 25565 ];
|
||||
allowedUDPPorts = [
|
||||
25565
|
||||
50765
|
||||
];
|
||||
};
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [ networkmanager-openconnect ];
|
||||
};
|
||||
|
||||
hosts = {
|
||||
"192.168.0.219" = [ "kookaborrow" ];
|
||||
"192.168.0.1" = [ "router" ];
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/mnt/media" = {
|
||||
device = "kookaborrow:/media";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd-automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/theaninova/heart-drive" = {
|
||||
device = "/dev/sdb2";
|
||||
fsType = "ntfs";
|
||||
};
|
||||
|
||||
fileSystems."/run/media/theaninova/windows" = {
|
||||
device = "/dev/sda2";
|
||||
fsType = "ntfs";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/6EC6-F0EF";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/b09fbba2-c97a-41bc-a3cd-8204e30204f8"; } ];
|
||||
|
||||
@@ -1,4 +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
179
hosts/aero/default.nix
Normal 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";
|
||||
}
|
||||
43
hosts/aero/hardware-configuration.nix
Normal file
43
hosts/aero/hardware-configuration.nix
Normal 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
54
hosts/aero/home.nix
Executable 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
191
hosts/shark/default.nix
Normal file
191
hosts/shark/default.nix
Normal file
@@ -0,0 +1,191 @@
|
||||
{
|
||||
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 = {
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [ networkmanager-openconnect ];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
44
hosts/shark/hardware-configuration.nix
Normal file
44
hosts/shark/hardware-configuration.nix
Normal 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
35
hosts/shark/home.nix
Executable 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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
8
modules/home-manager/default.nix
Normal file → Executable 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/neovide.nix
|
||||
# ./default-apps.nix
|
||||
./programs/nixvim.nix
|
||||
./programs/git.nix
|
||||
./packages
|
||||
./programs
|
||||
./services
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,198 +1,104 @@
|
||||
{
|
||||
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]"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
config = lib.mkIf osConfig.desktops.hyprland.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 = {
|
||||
layout = "master";
|
||||
resize_on_border = true;
|
||||
};
|
||||
master = {
|
||||
orientation = "center";
|
||||
new_is_master = true;
|
||||
always_center_master = true;
|
||||
mfact = 0.4;
|
||||
};
|
||||
general.allow_tearing = true;
|
||||
input = {
|
||||
accel_profile = "flat";
|
||||
kb_layout = "cc1-thea";
|
||||
kb_layout = osConfig.services.xserver.xkb.layout;
|
||||
kb_variant = osConfig.services.xserver.xkb.variant;
|
||||
};
|
||||
bind = import ./keybinds.nix;
|
||||
bindm = import ./mousebinds.nix;
|
||||
bindr = [ "SUPER,SUPER_L,exec,pkill anyrun || anyrun" ];
|
||||
workspace = [
|
||||
"special:calc,border:false,gapsout:200,on-created-empty:[noanim;silent] kitty -e qalc"
|
||||
];
|
||||
windowrulev2 =
|
||||
let
|
||||
firefoxPip = "class:^(firefox)$,title:^(Picture-in-Picture)$";
|
||||
firefoxPipInitial = "class:^(firefox)$,title:^(Firefox)$";
|
||||
in
|
||||
[
|
||||
"keepaspectratio,${firefoxPip}"
|
||||
"noborder,${firefoxPip}"
|
||||
"float,${firefoxPip}"
|
||||
"float,${firefoxPipInitial}"
|
||||
"pin,${firefoxPip}"
|
||||
"pin,${firefoxPipInitial}"
|
||||
"fakefullscreen,${firefoxPip}"
|
||||
"fakefullscreen,${firefoxPipInitial}"
|
||||
"move 22 72,${firefoxPip}"
|
||||
"move 22 72,${firefoxPipInitial}"
|
||||
# For some reason it really wants to be maximized
|
||||
"suppressevent maximize,class:^(neovide)$"
|
||||
# pinentry
|
||||
"dimaround,class:^(gcr-prompter)$"
|
||||
"noborder,class:^(gcr-prompter)$"
|
||||
"rounding 10,class:^(gcr-prompter)$"
|
||||
"animation slide,class:^(gcr-prompter)$"
|
||||
# Flameshot fixes
|
||||
"float,class:^(flameshot)$"
|
||||
"animation fade,class:^(flameshot)$"
|
||||
bind = [
|
||||
"SUPER,C,killactive"
|
||||
"SUPER,P,togglefloating,"
|
||||
"SUPER,P,pin,"
|
||||
"SUPER,D,fullscreen,1"
|
||||
"SUPER,V,fullscreen,0"
|
||||
|
||||
"float,class:^(zenity)$"
|
||||
];
|
||||
xwayland.force_zero_scaling = true;
|
||||
"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"
|
||||
];
|
||||
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;
|
||||
vrr = 2;
|
||||
};
|
||||
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.gnome-keyring
|
||||
gnome.nautilus
|
||||
gnome.gnome-calendar
|
||||
gnome.gnome-characters
|
||||
gnome.gnome-contacts
|
||||
gnome.gnome-clocks
|
||||
gnome.gnome-calculator
|
||||
gnome.simple-scan
|
||||
gnome.eog
|
||||
gnome.geary
|
||||
gnome.ghex
|
||||
gnome.gnome-weather
|
||||
gnome.gnome-keyring
|
||||
gnome.gnome-disk-utility
|
||||
nautilus
|
||||
simple-scan
|
||||
eog
|
||||
ghex
|
||||
gnome-disk-utility
|
||||
# fixes
|
||||
xorg.xrandr
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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.);
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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"
|
||||
]
|
||||
@@ -1,13 +0,0 @@
|
||||
{ pkgs }:
|
||||
{
|
||||
enable = true;
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
extraConfig = ''
|
||||
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono
|
||||
|
||||
font_size 13
|
||||
'';
|
||||
settings = {
|
||||
window_padding_width = 10;
|
||||
};
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
[ "SUPER,mouse:272,movewindow" "SUPER,mouse:273,resizewindow" ]
|
||||
2
modules/home-manager/modules/nixvim/README.md
Normal file
2
modules/home-manager/modules/nixvim/README.md
Normal 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)
|
||||
64
modules/home-manager/modules/nixvim/aerial.nix
Normal file
64
modules/home-manager/modules/nixvim/aerial.nix
Normal 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 = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
83
modules/home-manager/modules/nixvim/auto-format.nix
Normal file
83
modules/home-manager/modules/nixvim/auto-format.nix
Normal file
@@ -0,0 +1,83 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.auto-format;
|
||||
in
|
||||
{
|
||||
options.presets.auto-format = {
|
||||
enable = lib.mkEnableOption "auto-format";
|
||||
varName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "disable_autoformat";
|
||||
};
|
||||
commandName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "AutoFormatToggle";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
userCommands.${cfg.commandName}.command.__raw = # lua
|
||||
''
|
||||
function(args)
|
||||
if args.bang then
|
||||
vim.b.${cfg.varName} = not vim.b.${cfg.varName}
|
||||
else
|
||||
vim.g.${cfg.varName} = not vim.g.${cfg.varName}
|
||||
end
|
||||
local lualine, lib = pcall(require, 'lualine')
|
||||
if lualine then
|
||||
lib.refresh()
|
||||
end
|
||||
end
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>af";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action = "<cmd>:${cfg.commandName}<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>aF";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action = "<cmd>:${cfg.commandName}!<CR>";
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>a";
|
||||
group = "Auto Actions";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>af";
|
||||
desc = "Tggle auto-format";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>aF";
|
||||
desc = "Tggle auto-format (buffer)";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
|
||||
conform-nvim.settings.format_after_save = # lua
|
||||
''
|
||||
function(bufnr)
|
||||
if vim.g.${cfg.varName} or vim.b[bufnr].${cfg.varName} then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_fallback = true };
|
||||
end
|
||||
'';
|
||||
|
||||
lualine.settings.sections.lualine_x = lib.mkOrder 600 [
|
||||
"(vim.g.${cfg.varName} or vim.b.${cfg.varName}) and '' or nil"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
110
modules/home-manager/modules/nixvim/auto-save.nix
Normal file
110
modules/home-manager/modules/nixvim/auto-save.nix
Normal file
@@ -0,0 +1,110 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.auto-save;
|
||||
in
|
||||
{
|
||||
options.presets.auto-save = {
|
||||
enable = lib.mkEnableOption "auto save";
|
||||
disableOnStart = lib.mkEnableOption "disable auto save on start";
|
||||
event = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [
|
||||
"BufHidden"
|
||||
"FocusLost"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
extraConfigLua = # lua
|
||||
''
|
||||
function PerformAutoSave(buf)
|
||||
buf = buf or vim.api.nvim_get_current_buf()
|
||||
|
||||
if vim.b.disable_autosave or vim.g.disable_autosave then return end
|
||||
if vim.fn.getbufvar(buf, "&modifiable") ~= 1 then return end
|
||||
if not vim.api.nvim_buf_get_option(buf, 'modified') then return end
|
||||
if vim.api.nvim_buf_get_option(buf, 'buftype') ~= "" then return end
|
||||
|
||||
vim.api.nvim_buf_call(buf, function()
|
||||
vim.cmd('silent! w')
|
||||
print("Auto save at " .. os.date("%H:%M:%S"))
|
||||
end)
|
||||
end
|
||||
'';
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
event = cfg.event;
|
||||
pattern = [ "*" ];
|
||||
callback.__raw = # lua
|
||||
"function(args) PerformAutoSave(args.buf) end";
|
||||
}
|
||||
];
|
||||
|
||||
globals.disable_autosave = cfg.disableOnStart;
|
||||
|
||||
userCommands.ToggleAutoSave = {
|
||||
bang = true;
|
||||
command.__raw = # lua
|
||||
''
|
||||
function(args)
|
||||
if args.bang then
|
||||
vim.b.disable_autosave = not vim.b.disable_autosave
|
||||
else
|
||||
vim.g.disable_autosave = not vim.g.disable_autosave
|
||||
end
|
||||
local lualine, lib = pcall(require, 'lualine')
|
||||
if lualine then
|
||||
lib.refresh()
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>as";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action = "<cmd>:ToggleAutoSave<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>aS";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action = "<cmd>:ToggleAutoSave!<CR>";
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>a";
|
||||
group = "Auto Actions";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>as";
|
||||
desc = "Tggle auto-save";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>aS";
|
||||
desc = "Tggle auto-save (buffer)";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
|
||||
/*
|
||||
neo-tree.eventHandlers.window_before_open = # lua
|
||||
"function() PerformAutoSave() end";
|
||||
*/
|
||||
|
||||
lualine.settings.sections.lualine_x = lib.mkOrder 700 [
|
||||
# lua
|
||||
"(vim.g.disable_autosave or vim.b.disable_autosave) and '' or nil"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
106
modules/home-manager/modules/nixvim/base/completion.nix
Normal file
106
modules/home-manager/modules/nixvim/base/completion.nix
Normal 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 ];
|
||||
};
|
||||
}
|
||||
99
modules/home-manager/modules/nixvim/base/coverage.nix
Normal file
99
modules/home-manager/modules/nixvim/base/coverage.nix
Normal 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 = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
158
modules/home-manager/modules/nixvim/base/diagnostics.nix
Normal file
158
modules/home-manager/modules/nixvim/base/diagnostics.nix
Normal file
@@ -0,0 +1,158 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.base.diagnostics;
|
||||
in
|
||||
{
|
||||
options.presets.base.diagnostics = {
|
||||
enable = lib.mkEnableOption "diagnostics";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
extraConfigLuaPre = # lua
|
||||
''
|
||||
vim.lsp.set_log_level("off")
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "solid" })
|
||||
'';
|
||||
diagnostic.settings = {
|
||||
virtual_text.prefix = "●";
|
||||
signs = false;
|
||||
float = {
|
||||
focusable = false;
|
||||
header = "";
|
||||
border = "solid";
|
||||
scope = "cursor";
|
||||
prefix = "";
|
||||
};
|
||||
underline = true;
|
||||
update_in_insert = true;
|
||||
severity_sort = true;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>sn";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action.__raw = # lua
|
||||
"function() vim.diagnostic.open_float(nil) end";
|
||||
}
|
||||
{
|
||||
key = "<leader>sa";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action.__raw = # lua
|
||||
"require('actions-preview').code_actions";
|
||||
}
|
||||
{
|
||||
key = "<leader>sx";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action.__raw = # lua
|
||||
"vim.lsp.buf.format";
|
||||
}
|
||||
{
|
||||
key = "<leader>sR";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action = "<cmd>:LspRestart<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>sc";
|
||||
mode = "n";
|
||||
action = ":IncRename ";
|
||||
}
|
||||
{
|
||||
key = "<leader>sh";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action.__raw = # lua
|
||||
"function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({0}), {0}) end";
|
||||
}
|
||||
];
|
||||
plugins = {
|
||||
actions-preview.enable = true;
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = false;
|
||||
};
|
||||
lsp-signature.enable = true;
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>sr" = "lsp_references";
|
||||
"<leader>sd" = "lsp_definitions";
|
||||
"<leader>si" = "lsp_implementations";
|
||||
"<leader>sw" = "lsp_workspace_symbols";
|
||||
"<leader>st" = "lsp_type_definitions";
|
||||
};
|
||||
};
|
||||
inc-rename.enable = true;
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>s";
|
||||
group = "LSP";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sr";
|
||||
desc = "References";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sc";
|
||||
desc = "Incremental Rename";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sR";
|
||||
desc = "Restart LSP";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sd";
|
||||
desc = "Definitions";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>si";
|
||||
desc = "Implementations";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sw";
|
||||
desc = "Workspace Symbols";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>st";
|
||||
desc = "Type Definitions";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sh";
|
||||
icon = "";
|
||||
desc = "Inlay Hints";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sa";
|
||||
desc = "Code Actions";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sn";
|
||||
desc = "Diagnostics";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>sx";
|
||||
desc = "LSP Format";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
63
modules/home-manager/modules/nixvim/base/find.nix
Normal file
63
modules/home-manager/modules/nixvim/base/find.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.base.find;
|
||||
in
|
||||
{
|
||||
options.presets.base.find = {
|
||||
enable = lib.mkEnableOption "file finding";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
web-devicons.enable = true;
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>ff" = {
|
||||
action = "git_files";
|
||||
mode = "n";
|
||||
};
|
||||
"<leader>fa" = {
|
||||
action = "find_files";
|
||||
mode = "n";
|
||||
};
|
||||
"<leader>fg" = {
|
||||
action = "live_grep";
|
||||
mode = "n";
|
||||
};
|
||||
"<leader>fc" = {
|
||||
action = "buffers";
|
||||
mode = "n";
|
||||
};
|
||||
};
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>f";
|
||||
group = "Find";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>ff";
|
||||
desc = "File";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>fa";
|
||||
desc = "All Files";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>fg";
|
||||
desc = "Grep";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>fc";
|
||||
desc = "Current";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
35
modules/home-manager/modules/nixvim/base/formatting.nix
Normal file
35
modules/home-manager/modules/nixvim/base/formatting.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.base.formatting;
|
||||
in
|
||||
{
|
||||
options.presets.base.formatting = {
|
||||
enable = lib.mkEnableOption "formatting";
|
||||
prettier = lib.mkEnableOption "prettier formatter";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings.formatters_by_ft = lib.mkIf cfg.prettier {
|
||||
javascript = [ "prettierd" ];
|
||||
markdown = [ "prettierd" ];
|
||||
typescript = [ "prettierd" ];
|
||||
json = [ "prettierd" ];
|
||||
yaml = [ "prettierd" ];
|
||||
html = [ "prettierd" ];
|
||||
angular = [ "prettierd" ];
|
||||
css = [ "prettierd" ];
|
||||
scss = [ "prettierd" ];
|
||||
less = [ "prettierd" ];
|
||||
svelte = [ "prettierd" ];
|
||||
};
|
||||
};
|
||||
extraPackages = lib.mkIf cfg.prettier [ pkgs.prettierd ];
|
||||
};
|
||||
}
|
||||
51
modules/home-manager/modules/nixvim/base/leap.nix
Normal file
51
modules/home-manager/modules/nixvim/base/leap.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
19
modules/home-manager/modules/nixvim/base/minimap.nix
Normal file
19
modules/home-manager/modules/nixvim/base/minimap.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.base.minimap;
|
||||
in
|
||||
{
|
||||
options.presets.base.minimap = {
|
||||
enable = lib.mkEnableOption "minimap";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
globals = {
|
||||
minimap_width = 10;
|
||||
minimap_auto_start = 1;
|
||||
minimap_auto_start_win_enter = 1;
|
||||
minimap_close_buftypes = [ "nofile" ];
|
||||
minimap_block_filetypes = [ "NvimTree" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/home-manager/modules/nixvim/base/spellcheck.nix
Normal file
23
modules/home-manager/modules/nixvim/base/spellcheck.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
75
modules/home-manager/modules/nixvim/base/status-line.nix
Normal file
75
modules/home-manager/modules/nixvim/base/status-line.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.base.status-line;
|
||||
in
|
||||
{
|
||||
options.presets.base.status-line = {
|
||||
enable = lib.mkEnableOption "status line";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
opts.showmode = false;
|
||||
plugins = {
|
||||
notify = {
|
||||
enable = true;
|
||||
settings.stages = "static";
|
||||
};
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps."<leader>n" = # vim
|
||||
"notify";
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>n";
|
||||
desc = "Notifications";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
globalstatus = true;
|
||||
/*
|
||||
section_separators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
*/
|
||||
component_separators = {
|
||||
left = "┊";
|
||||
right = "┊";
|
||||
};
|
||||
};
|
||||
sections = {
|
||||
lualine_a = [
|
||||
{
|
||||
__unkeyed-1 = "mode";
|
||||
/*
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
*/
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
lualine_x = lib.mkAfter [ { __unkeyed-1 = "filetype"; } ];
|
||||
lualine_z = [
|
||||
{
|
||||
__unkeyed-1 = "location";
|
||||
/*
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
*/
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
45
modules/home-manager/modules/nixvim/base/syntax.nix
Normal file
45
modules/home-manager/modules/nixvim/base/syntax.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.base.syntax;
|
||||
in
|
||||
{
|
||||
options.presets.base.syntax = {
|
||||
enable = lib.mkEnableOption "syntax highlighting";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight = {
|
||||
additional_vim_regex_highlighting = true;
|
||||
enable = true;
|
||||
};
|
||||
indent.enable = true;
|
||||
};
|
||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
nixvimInjections = true;
|
||||
};
|
||||
indent-blankline = {
|
||||
enable = lib.mkDefault true;
|
||||
settings = {
|
||||
indent.char = "▏";
|
||||
scope.show_start = false;
|
||||
};
|
||||
};
|
||||
illuminate.enable = lib.mkDefault true;
|
||||
nvim-autopairs.enable = lib.mkDefault true;
|
||||
colorizer.enable = lib.mkDefault true;
|
||||
ts-autotag = {
|
||||
enable = lib.mkDefault true;
|
||||
settings.opts.enable_close_on_slash = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
51
modules/home-manager/modules/nixvim/base/tree.nix
Normal file
51
modules/home-manager/modules/nixvim/base/tree.nix
Normal 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 = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
59
modules/home-manager/modules/nixvim/default.nix
Normal file
59
modules/home-manager/modules/nixvim/default.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
hostname,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.programs.nixvim = lib.mkOption {
|
||||
type = pkgs.lib.types.submoduleWith {
|
||||
specialArgs = {
|
||||
inherit pkgs hostname username;
|
||||
};
|
||||
modules = [
|
||||
./plugins/strudel.nix
|
||||
./plugins/tidal.nix
|
||||
|
||||
./aerial.nix
|
||||
./auto-save.nix
|
||||
./auto-format.nix
|
||||
./harpoon.nix
|
||||
./mergetool.nix
|
||||
./lazygit.nix
|
||||
./trouble.nix
|
||||
./undotree.nix
|
||||
|
||||
./base/completion.nix
|
||||
./base/coverage.nix
|
||||
./base/diagnostics.nix
|
||||
./base/find.nix
|
||||
./base/formatting.nix
|
||||
./base/leap.nix
|
||||
./base/spellcheck.nix
|
||||
./base/status-line.nix
|
||||
./base/syntax.nix
|
||||
./base/tree.nix
|
||||
|
||||
./languages/angular.nix
|
||||
./languages/c.nix
|
||||
./languages/css.nix
|
||||
./languages/cue.nix
|
||||
./languages/dart.nix
|
||||
./languages/js.nix
|
||||
./languages/lua.nix
|
||||
./languages/nix.nix
|
||||
./languages/python.nix
|
||||
./languages/rust.nix
|
||||
./languages/shell.nix
|
||||
./languages/strudel.nix
|
||||
./languages/svelte.nix
|
||||
|
||||
./remaps/half-page-scroll.nix
|
||||
./remaps/no-accidental-macro.nix
|
||||
./remaps/paste-keep-buffer.nix
|
||||
./remaps/wrapped-line-nav.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
58
modules/home-manager/modules/nixvim/harpoon.nix
Normal file
58
modules/home-manager/modules/nixvim/harpoon.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.harpoon;
|
||||
in
|
||||
{
|
||||
options.presets.harpoon = {
|
||||
enable = lib.mkEnableOption "Harpoon";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
keymaps = [
|
||||
{
|
||||
key = "hh";
|
||||
mode = "n";
|
||||
action = ":Telescope harpoon marks<CR>";
|
||||
}
|
||||
];
|
||||
plugins = {
|
||||
telescope.enable = true;
|
||||
harpoon = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
keymaps = {
|
||||
addFile = "hm";
|
||||
navNext = "hn";
|
||||
navPrev = "hp";
|
||||
};
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "h";
|
||||
group = "Harpoon";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "hh";
|
||||
desc = "Marks";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "hm";
|
||||
desc = "Add File";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "hn";
|
||||
desc = "Next";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "hp";
|
||||
desc = "Prev";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
58
modules/home-manager/modules/nixvim/languages/angular.nix
Normal file
58
modules/home-manager/modules/nixvim/languages/angular.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.languages.angular;
|
||||
in
|
||||
{
|
||||
options.presets.languages.angular = {
|
||||
enable = lib.mkEnableOption "Angular";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
lsp.enabledServers = [
|
||||
{
|
||||
name = "angularls";
|
||||
extraOptions = {
|
||||
cmd = [
|
||||
"ngserver"
|
||||
"--stdio"
|
||||
"--tsProbeLocations"
|
||||
""
|
||||
"--ngProbeLocations"
|
||||
""
|
||||
];
|
||||
on_new_config.__raw = # lua
|
||||
''
|
||||
function(new_config, new_root_dir)
|
||||
new_config.cmd = {
|
||||
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
|
||||
"--stdio",
|
||||
"--tsProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
"--ngProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
}
|
||||
end
|
||||
'';
|
||||
filetypes = [
|
||||
"typescript"
|
||||
"html"
|
||||
"typescriptreact"
|
||||
"typescript.tsx"
|
||||
"angular"
|
||||
"html.angular"
|
||||
];
|
||||
on_attach.__raw = # lua
|
||||
''
|
||||
function(client, bufnr)
|
||||
if vim.bo[bufnr].filetype == "html" then
|
||||
vim.bo[bufnr].filetype = "angular"
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
52
modules/home-manager/modules/nixvim/languages/c.nix
Normal file
52
modules/home-manager/modules/nixvim/languages/c.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
29
modules/home-manager/modules/nixvim/languages/css.nix
Normal file
29
modules/home-manager/modules/nixvim/languages/css.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.languages.css;
|
||||
in
|
||||
{
|
||||
options.presets.languages.css = {
|
||||
enable = lib.mkEnableOption "CSS";
|
||||
stylelint = lib.mkEnableOption "stylelint";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
none-ls = lib.mkIf cfg.stylelint {
|
||||
enable = true;
|
||||
sources = {
|
||||
diagnostics.stylelint.enable = true;
|
||||
formatting.stylelint.enable = true;
|
||||
};
|
||||
};
|
||||
lsp.servers.cssls.enable = true;
|
||||
};
|
||||
extraPackages = lib.mkIf cfg.stylelint [ pkgs.nodePackages.stylelint ];
|
||||
};
|
||||
}
|
||||
16
modules/home-manager/modules/nixvim/languages/cue.nix
Normal file
16
modules/home-manager/modules/nixvim/languages/cue.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/home-manager/modules/nixvim/languages/dart.nix
Normal file
16
modules/home-manager/modules/nixvim/languages/dart.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.languages.dart;
|
||||
in
|
||||
{
|
||||
options.presets.languages.dart = {
|
||||
enable = lib.mkEnableOption "Dart";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
conform-nvim.settings.formatters_by_ft.dart = [ "dart_format" ];
|
||||
lsp.servers.dartls.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
75
modules/home-manager/modules/nixvim/languages/js.nix
Normal file
75
modules/home-manager/modules/nixvim/languages/js.nix
Normal 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 ];
|
||||
};
|
||||
}
|
||||
22
modules/home-manager/modules/nixvim/languages/lua.nix
Normal file
22
modules/home-manager/modules/nixvim/languages/lua.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.languages.lua;
|
||||
in
|
||||
{
|
||||
options.presets.languages.lua = {
|
||||
enable = lib.mkEnableOption "Lua";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
conform-nvim.settings.formatters_by_ft.lua = [ "stylua" ];
|
||||
lsp.servers.lua_ls.enable = true;
|
||||
};
|
||||
extraPackages = [ pkgs.stylua ];
|
||||
};
|
||||
}
|
||||
48
modules/home-manager/modules/nixvim/languages/nix.nix
Normal file
48
modules/home-manager/modules/nixvim/languages/nix.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
hostname,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.languages.nix;
|
||||
in
|
||||
{
|
||||
options.presets.languages.nix = {
|
||||
enable = lib.mkEnableOption "Nix";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
conform-nvim.settings.formatters_by_ft.nix = [ "nixfmt" ];
|
||||
lsp.servers = {
|
||||
nixd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
nixpkgs.expr = # nix
|
||||
"import (builtins.getFlake (builtins.toString ./.)).inputs.nixpkgs { }";
|
||||
formatting.command = [ "nixfmt" ];
|
||||
options = {
|
||||
nixos.expr = # nix
|
||||
"(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${hostname}.options";
|
||||
home-manager.expr = # nix
|
||||
"(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${hostname}.options.home-manager.users.type.getSubOptions []";
|
||||
};
|
||||
};
|
||||
};
|
||||
nil_ls = {
|
||||
enable = false;
|
||||
settings = {
|
||||
formatting.command = [ "nixfmt" ];
|
||||
nix = {
|
||||
maxMemoryMB = 8192;
|
||||
flake.autoEvalInputs = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
extraPackages = [ pkgs.nixfmt-rfc-style ];
|
||||
};
|
||||
}
|
||||
22
modules/home-manager/modules/nixvim/languages/python.nix
Normal file
22
modules/home-manager/modules/nixvim/languages/python.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.languages.python;
|
||||
in
|
||||
{
|
||||
options.presets.languages.python = {
|
||||
enable = lib.mkEnableOption "Python";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
conform-nvim.settings.formatters_by_ft.python = [ "black" ];
|
||||
lsp.servers.pyright.enable = true;
|
||||
};
|
||||
extraPackages = [ pkgs.black ];
|
||||
};
|
||||
}
|
||||
42
modules/home-manager/modules/nixvim/languages/rust.nix
Normal file
42
modules/home-manager/modules/nixvim/languages/rust.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/home-manager/modules/nixvim/languages/shell.nix
Normal file
22
modules/home-manager/modules/nixvim/languages/shell.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.languages.shell;
|
||||
in
|
||||
{
|
||||
options.presets.languages.shell = {
|
||||
enable = lib.mkEnableOption "Shell/Bash";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
conform-nvim.settings.formatters_by_ft.sh = [ "shfmt" ];
|
||||
lsp.servers.bashls.enable = true;
|
||||
};
|
||||
extraPackages = [ pkgs.shfmt ];
|
||||
};
|
||||
}
|
||||
28
modules/home-manager/modules/nixvim/languages/strudel.nix
Normal file
28
modules/home-manager/modules/nixvim/languages/strudel.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
27
modules/home-manager/modules/nixvim/languages/svelte.nix
Normal file
27
modules/home-manager/modules/nixvim/languages/svelte.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
79
modules/home-manager/modules/nixvim/lazygit.nix
Normal file
79
modules/home-manager/modules/nixvim/lazygit.nix
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.lazygit;
|
||||
in
|
||||
{
|
||||
options.presets.lazygit = {
|
||||
enable = lib.mkEnableOption "LazyGit";
|
||||
toggleBind = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "<leader>g";
|
||||
};
|
||||
commandName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "ToggleLazyGit";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
extraConfigLua = # lua
|
||||
''
|
||||
LazygitTerminal = require("toggleterm.terminal").Terminal:new({
|
||||
cmd = "${lib.getExe pkgs.lazygit}",
|
||||
dir = "git_dir",
|
||||
direction = "float",
|
||||
|
||||
on_open = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
on_close = function(_)
|
||||
vim.cmd("startinsert!")
|
||||
end,
|
||||
})
|
||||
|
||||
function LazygitToggle()
|
||||
lazygit:toggle()
|
||||
end
|
||||
'';
|
||||
|
||||
userCommands.${cfg.commandName}.command.__raw = # lua
|
||||
''
|
||||
function()
|
||||
LazygitTerminal:toggle()
|
||||
end
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = cfg.toggleBind;
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action = "<cmd>:${cfg.commandName}<CR>";
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
direction = lib.mkDefault "vertical";
|
||||
size = lib.mkDefault 60;
|
||||
};
|
||||
};
|
||||
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = cfg.toggleBind;
|
||||
desc = "Git";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/home-manager/modules/nixvim/mergetool.nix
Normal file
22
modules/home-manager/modules/nixvim/mergetool.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.mergetool;
|
||||
in
|
||||
{
|
||||
options.presets.mergetool = {
|
||||
enable = lib.mkEnableOption "Mergetool";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
globals = {
|
||||
mergetool_layout = "mr";
|
||||
mergetool_prefer_revision = "local";
|
||||
};
|
||||
extraPlugins = [ pkgs.vimPlugins.vim-mergetool ];
|
||||
};
|
||||
}
|
||||
59
modules/home-manager/modules/nixvim/plugins/strudel.nix
Normal file
59
modules/home-manager/modules/nixvim/plugins/strudel.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
||||
13
modules/home-manager/modules/nixvim/plugins/tidal.nix
Normal file
13
modules/home-manager/modules/nixvim/plugins/tidal.nix
Normal 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";
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.remaps.half-page-scroll;
|
||||
in
|
||||
{
|
||||
options.presets.remaps.half-page-scroll = {
|
||||
enable = lib.mkEnableOption "half page scroll";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
keymaps = [
|
||||
{
|
||||
key = "<C-d>";
|
||||
action = "<C-d>zz";
|
||||
}
|
||||
{
|
||||
key = "<C-u>";
|
||||
action = "<C-u>zz";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.remaps.no-accidental-macro;
|
||||
in
|
||||
{
|
||||
options.presets.remaps.no-accidental-macro = {
|
||||
enable = lib.mkEnableOption "no accidental macro";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
keymaps = [
|
||||
{
|
||||
key = "Q";
|
||||
mode = "n";
|
||||
action = "<nop>";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.remaps.paste-keep-buffer;
|
||||
in
|
||||
{
|
||||
options.presets.remaps.paste-keep-buffer = {
|
||||
enable = lib.mkEnableOption "paste in visual keeps the buffer";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
keymaps = [
|
||||
{
|
||||
key = "p";
|
||||
mode = "v";
|
||||
action = ''"_dP'';
|
||||
}
|
||||
{
|
||||
key = "<leader>p";
|
||||
action = ''"_dP'';
|
||||
}
|
||||
];
|
||||
plugins.which-key = {
|
||||
enable = true;
|
||||
settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>p";
|
||||
desc = "Paste Keep Buffer";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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>";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
83
modules/home-manager/modules/nixvim/trouble.nix
Normal file
83
modules/home-manager/modules/nixvim/trouble.nix
Normal file
@@ -0,0 +1,83 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.trouble;
|
||||
in
|
||||
{
|
||||
options.presets.trouble = {
|
||||
enable = lib.mkEnableOption "trouble";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>xx";
|
||||
mode = "n";
|
||||
action.__raw = # lua
|
||||
"function() require('trouble').toggle('diagnostics') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xw";
|
||||
mode = "n";
|
||||
action.__raw = # lua
|
||||
"function() require('trouble').toggle('workspace_diagnostics') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xd";
|
||||
mode = "n";
|
||||
action.__raw = # lua
|
||||
"function() require('trouble').toggle('document_diagnostics') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xq";
|
||||
mode = "n";
|
||||
action.__raw = # lua
|
||||
"function() require('trouble').toggle('quickfix') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xl";
|
||||
mode = "n";
|
||||
action.__raw = # lua
|
||||
"function() require('trouble').toggle('loclist') end";
|
||||
}
|
||||
];
|
||||
plugins = {
|
||||
web-devicons.enable = true;
|
||||
trouble.enable = true;
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>x";
|
||||
group = "Trouble";
|
||||
icon = {
|
||||
icon = "";
|
||||
color = "red";
|
||||
};
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>xx";
|
||||
desc = "Toggle";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>xw";
|
||||
desc = "Workspace Diagnostics";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>xd";
|
||||
desc = "Document Diagnostics";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>xq";
|
||||
desc = "Quickfix";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>xl";
|
||||
desc = "Loclist";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
34
modules/home-manager/modules/nixvim/undotree.nix
Normal file
34
modules/home-manager/modules/nixvim/undotree.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.undotree;
|
||||
in
|
||||
{
|
||||
options.presets.undotree = {
|
||||
enable = lib.mkEnableOption "Undotree";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
opts = {
|
||||
undodir.__raw = # lua
|
||||
"os.getenv('HOME') .. '/.config/nvim/undodir'";
|
||||
undofile = true;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>u";
|
||||
mode = "n";
|
||||
action = "<cmd>:UndotreeToggle<CR>";
|
||||
}
|
||||
];
|
||||
plugins = {
|
||||
undotree.enable = true;
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>u";
|
||||
desc = "Undotree";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,59 +1,72 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.configFile."ranger/rc.conf".source = ./ranger.conf;
|
||||
services.flatpak.packages = [
|
||||
{
|
||||
flatpakref = "https://releases.threema.ch/flatpak/threema-desktop/ch.threema.threema-desktop.flatpakref";
|
||||
sha256 = "0lghiiiphbkqgiprqirxifldvix0j4k04jh1z9f911shrzjgqq4s";
|
||||
}
|
||||
];
|
||||
programs.mpv.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
# nix
|
||||
cachix
|
||||
lorri
|
||||
# lorri
|
||||
vulnix
|
||||
|
||||
matugen # TODO
|
||||
gccdiag
|
||||
|
||||
# browsers
|
||||
firefox
|
||||
chromium
|
||||
brave
|
||||
|
||||
# media
|
||||
jellyfin-media-player
|
||||
youtube-dl
|
||||
# tartube
|
||||
yt-dlp
|
||||
f3d
|
||||
mpv
|
||||
jellyfin-mpv-shim
|
||||
makemkv
|
||||
libfaketime
|
||||
handbrake
|
||||
metadata-cleaner
|
||||
#bitwarden
|
||||
mediainfo
|
||||
mediainfo-gui
|
||||
|
||||
prismlauncher
|
||||
|
||||
# chat apps
|
||||
threema-desktop
|
||||
vesktop
|
||||
discord
|
||||
element-desktop
|
||||
thunderbird
|
||||
signal-desktop
|
||||
# cinny-desktop
|
||||
|
||||
# office
|
||||
libreoffice
|
||||
apostrophe # markdown editor
|
||||
apostrophe
|
||||
|
||||
# creative
|
||||
gimp
|
||||
gimp3
|
||||
inkscape-with-extensions
|
||||
scribus
|
||||
audacity
|
||||
# audacity
|
||||
pinta
|
||||
kdePackages.kdenlive
|
||||
losslesscut-bin
|
||||
shotcut
|
||||
blender-hip
|
||||
|
||||
# development
|
||||
insomnia
|
||||
avalonia-ilspy
|
||||
ghidra
|
||||
ida-free
|
||||
|
||||
# utils
|
||||
libqalculate
|
||||
ranger
|
||||
neofetch
|
||||
filezilla
|
||||
yubikey-manager
|
||||
(pkgs.writeShellApplication {
|
||||
name = "fix-yubikey";
|
||||
text = ''
|
||||
gpg-connect-agent --hex "scd apdu 00 f1 00 00" /bye
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.flatpak.update.auto = {
|
||||
enable = true;
|
||||
onCalendar = "weekly";
|
||||
};
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
rbw = {
|
||||
@@ -10,9 +14,6 @@
|
||||
pinentry = pkgs.pinentry-gnome3;
|
||||
};
|
||||
};
|
||||
git = import ./git.nix;
|
||||
nixvim = import ./nixvim { inherit pkgs; };
|
||||
firefox = import ./firefox.nix { inherit pkgs; };
|
||||
gpg.enable = true;
|
||||
btop = {
|
||||
enable = true;
|
||||
@@ -32,13 +33,15 @@
|
||||
src = zsh-nix-shell;
|
||||
}
|
||||
];
|
||||
initExtraFirst = ''
|
||||
if [[ -r "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
[[ ! -f ${./.p10k.zsh} ]] || source ${./.p10k.zsh}
|
||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||
'';
|
||||
initContent =
|
||||
pkgs.lib.mkBefore # sh
|
||||
''
|
||||
if [[ -r "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
[[ ! -f ${./.p10k.zsh} ]] || source ${./.p10k.zsh}
|
||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||
'';
|
||||
};
|
||||
direnv = {
|
||||
enable = true;
|
||||
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +1,28 @@
|
||||
{ ... }:
|
||||
{
|
||||
enable = true;
|
||||
userName = "Thea Schöbl";
|
||||
userEmail = "dev@theaninova.de";
|
||||
signing = {
|
||||
key = "6C9E EFC5 1AE0 0131 78DE B9C8 68FF FB1E C187 88CA";
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
pull.rebase = true;
|
||||
merge = {
|
||||
tool = "nvim-mergetool";
|
||||
conflictstyle = "diff3";
|
||||
programs.git = {
|
||||
enable = true;
|
||||
signing = {
|
||||
key = "6C9E EFC5 1AE0 0131 78DE B9C8 68FF FB1E C187 88CA";
|
||||
signByDefault = true;
|
||||
};
|
||||
mergetool.nvim-mergetool = {
|
||||
cmd = ''
|
||||
nvim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE"
|
||||
'';
|
||||
trustExitCode = true;
|
||||
settings = {
|
||||
user = {
|
||||
email = "dev@theaninova.de";
|
||||
name = "Thea Schöbl";
|
||||
};
|
||||
pull.rebase = true;
|
||||
init.defaultBranch = "main";
|
||||
merge = {
|
||||
tool = "nvim-mergetool";
|
||||
conflictstyle = "diff3";
|
||||
};
|
||||
mergetool.nvim-mergetool = {
|
||||
cmd = # sh
|
||||
''nvim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE"'';
|
||||
trustExitCode = true;
|
||||
};
|
||||
mergetool.prompt = false;
|
||||
};
|
||||
mergetool.prompt = false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,48 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.neovide ];
|
||||
xdg.configFile."neovide/config.toml".source = ./neovide.toml;
|
||||
xdg.configFile."neovide/config.toml".source = (pkgs.formats.toml { }).generate "neovide" {
|
||||
maximized = false;
|
||||
fork = true;
|
||||
font = {
|
||||
normal = [ "FiraCode Nerd Font" ];
|
||||
size = 12;
|
||||
edging = "subpixelantialias";
|
||||
hinting = "full";
|
||||
features."FiraCode Nerd Font" = [
|
||||
"+zero"
|
||||
"+onum"
|
||||
"+ss04"
|
||||
"+cv19"
|
||||
"+cv23"
|
||||
"+ss09"
|
||||
"+cv26"
|
||||
"+ss06"
|
||||
"+ss10"
|
||||
];
|
||||
};
|
||||
box-drawing = {
|
||||
mode = "native";
|
||||
sizes.default = [
|
||||
1
|
||||
3
|
||||
];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.windowrulev2 = [
|
||||
# For some reason it really wants to be maximized
|
||||
"suppressevent maximize,class:^(neovide)$"
|
||||
];
|
||||
programs.nixvim = {
|
||||
globals = {
|
||||
neovide_text_gamma = 0.0;
|
||||
neovide_text_contrast = 0.0;
|
||||
neovide_position_animation_length = 0.3;
|
||||
neovide_remember_window_size = false;
|
||||
neovide_hide_mouse_when_typing = true;
|
||||
experimental_layer_grouping = true;
|
||||
neovide_cursor_vfx_mode = "pixiedust";
|
||||
neovide_cursor_trail_size = 0.7;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
maximized = false
|
||||
srgb = true
|
||||
|
||||
[font]
|
||||
normal = ["FiraCode Nerd Font"]
|
||||
size = 16
|
||||
edging = "subpixelantialias"
|
||||
|
||||
[font.features]
|
||||
"FiraCode Nerd Font" = [
|
||||
"+zero",
|
||||
"+onum",
|
||||
"+ss04",
|
||||
"+cv19",
|
||||
"+cv23",
|
||||
"+ss09",
|
||||
"+ss06",
|
||||
"+ss07",
|
||||
"+ss10",
|
||||
]
|
||||
127
modules/home-manager/programs/nixvim.nix
Normal file
127
modules/home-manager/programs/nixvim.nix
Normal file
@@ -0,0 +1,127 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
tabstop = 2;
|
||||
softtabstop = 2;
|
||||
shiftwidth = 2;
|
||||
expandtab = true;
|
||||
smartindent = true;
|
||||
signcolumn = "yes";
|
||||
|
||||
scrolloff = 12;
|
||||
|
||||
hlsearch = false;
|
||||
incsearch = true;
|
||||
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
updatetime = 50;
|
||||
|
||||
fillchars.eob = " ";
|
||||
};
|
||||
clipboard = {
|
||||
register = "unnamedplus";
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
globals.mapleader = ";";
|
||||
|
||||
presets = {
|
||||
auto-save.enable = true;
|
||||
auto-format.enable = true;
|
||||
lazygit.enable = true;
|
||||
mergetool.enable = true;
|
||||
undotree.enable = true;
|
||||
aerial.enable = true;
|
||||
base = {
|
||||
completion = {
|
||||
enable = true;
|
||||
copilot = true;
|
||||
};
|
||||
diagnostics.enable = true;
|
||||
coverage.enable = false;
|
||||
find.enable = true;
|
||||
formatting = {
|
||||
enable = true;
|
||||
prettier = true;
|
||||
};
|
||||
leap.enable = true;
|
||||
spellcheck.enable = true;
|
||||
status-line.enable = true;
|
||||
syntax.enable = true;
|
||||
tree.enable = true;
|
||||
};
|
||||
languages = {
|
||||
c.enable = true;
|
||||
css = {
|
||||
enable = true;
|
||||
stylelint = true;
|
||||
};
|
||||
cue.enable = true;
|
||||
dart.enable = true;
|
||||
js = {
|
||||
enable = true;
|
||||
eslint = true;
|
||||
npm = true;
|
||||
};
|
||||
lua.enable = true;
|
||||
nix.enable = true;
|
||||
python.enable = true;
|
||||
rust.enable = true;
|
||||
shell.enable = true;
|
||||
strudel.enable = true;
|
||||
svelte.enable = true;
|
||||
};
|
||||
remaps = {
|
||||
half-page-scroll.enable = true;
|
||||
no-accidental-macro.enable = true;
|
||||
paste-keep-buffer.enable = true;
|
||||
wrapped-line-nav.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
which-key.enable = true;
|
||||
schemastore.enable = true;
|
||||
todo-comments.enable = true;
|
||||
origami.enable = false;
|
||||
nvim-surround.enable = true;
|
||||
fidget.enable = true;
|
||||
vim-tidal.enable = true;
|
||||
treesitter-context = {
|
||||
enable = false; # TODO: looks weird with Neovide
|
||||
settings.line_numbers = false;
|
||||
};
|
||||
|
||||
lsp.servers = {
|
||||
html.enable = true;
|
||||
svelte.enable = true;
|
||||
|
||||
dockerls.enable = true;
|
||||
|
||||
yamlls = {
|
||||
enable = true;
|
||||
settings.customTags = [
|
||||
"!if mapping"
|
||||
"!any sequence"
|
||||
"!not scalar"
|
||||
"!flat sequence"
|
||||
"!repeat mapping"
|
||||
"!param scalar"
|
||||
"!macro mapping"
|
||||
];
|
||||
};
|
||||
jsonls.enable = true;
|
||||
taplo.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,427 +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";
|
||||
|
||||
undodir = {
|
||||
__raw = "os.getenv('HOME') .. '/.config/nvim/undodir'";
|
||||
};
|
||||
undofile = true;
|
||||
|
||||
scrolloff = 12;
|
||||
|
||||
hlsearch = false;
|
||||
incsearch = true;
|
||||
|
||||
updatetime = 50;
|
||||
|
||||
fillchars.eob = " ";
|
||||
};
|
||||
|
||||
keymaps = import ./keymaps.nix;
|
||||
|
||||
globals = {
|
||||
minimap_width = 10;
|
||||
minimap_auto_start = 1;
|
||||
minimap_auto_start_win_enter = 1;
|
||||
minimap_close_buftypes = [ "nofile" ];
|
||||
minimap_block_filetypes = [ "NvimTree" ];
|
||||
|
||||
mapleader = ";";
|
||||
|
||||
mergetool_layout = "mr";
|
||||
mergetool_prefer_revision = "local";
|
||||
|
||||
neovide_cursor_vfx_mode = "pixiedust";
|
||||
};
|
||||
|
||||
clipboard = {
|
||||
register = "unnamedplus";
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
|
||||
extraConfigLua = builtins.readFile ./extra-config.lua;
|
||||
|
||||
plugins = {
|
||||
lualine = {
|
||||
enable = true;
|
||||
globalstatus = true;
|
||||
sectionSeparators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
componentSeparators = {
|
||||
left = "┊";
|
||||
right = "┊";
|
||||
};
|
||||
sections = {
|
||||
lualine_a = [
|
||||
{
|
||||
name = "mode";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
lualine_x = [
|
||||
"(vim.g.disable_autoformat or vim.b.disable_autoformat) and '' or nil"
|
||||
{ name = "filetype"; }
|
||||
];
|
||||
lualine_z = [
|
||||
{
|
||||
name = "location";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
auto-save = {
|
||||
enable = true;
|
||||
triggerEvents = [
|
||||
"FocusLost"
|
||||
"BufLeave"
|
||||
];
|
||||
};
|
||||
indent-blankline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
indent.char = "▏";
|
||||
scope.show_start = false;
|
||||
};
|
||||
};
|
||||
illuminate.enable = true;
|
||||
nvim-autopairs.enable = true;
|
||||
nvim-colorizer.enable = true;
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
filesystem.filteredItems.visible = true;
|
||||
eventHandlers = {
|
||||
file_opened = ''
|
||||
function()
|
||||
require('neo-tree').close_all()
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
undotree.enable = true;
|
||||
notify = {
|
||||
enable = true;
|
||||
backgroundColour = "#000000";
|
||||
};
|
||||
toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
direction = "vertical";
|
||||
size = 60;
|
||||
};
|
||||
};
|
||||
luasnip.enable = true;
|
||||
ts-autotag.enable = true;
|
||||
leap.enable = true;
|
||||
harpoon = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
keymaps = {
|
||||
addFile = "hm";
|
||||
navNext = "hn";
|
||||
navPrev = "hp";
|
||||
};
|
||||
};
|
||||
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>ff" = "git_files";
|
||||
"<leader>fa" = "find_files";
|
||||
"<leader>fg" = "live_grep";
|
||||
"<leader>fb" = "buffers";
|
||||
|
||||
"<leader>sr" = "lsp_references";
|
||||
"<leader>sd" = "lsp_definitions";
|
||||
"<leader>si" = "lsp_implementations";
|
||||
"<leader>ss" = "lsp_document_symbols";
|
||||
"<leader>sw" = "lsp_workspace_symbols";
|
||||
"<leader>st" = "lsp_type_definitions";
|
||||
"<leader>sh" = "diagnostics";
|
||||
};
|
||||
};
|
||||
|
||||
trouble = {
|
||||
enable = true;
|
||||
settings.use_diagnostic_signs = true;
|
||||
};
|
||||
|
||||
treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
nixvimInjections = true;
|
||||
};
|
||||
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
formattersByFt = {
|
||||
lua = [ "stylua" ];
|
||||
javascript = [ "prettier" ];
|
||||
markdown = [ "prettier" ];
|
||||
typescript = [ "prettier" ];
|
||||
json = [ "prettier" ];
|
||||
yaml = [ "prettier" ];
|
||||
html = [ "prettier" ];
|
||||
angular = [ "prettier" ];
|
||||
css = [ "prettier" ];
|
||||
scss = [ "prettier" ];
|
||||
less = [ "prettier" ];
|
||||
svelte = [ "prettier" ];
|
||||
rust = [ "rustfmt" ];
|
||||
bash = [ "shfmt" ];
|
||||
nix = [ "nixfmt" ];
|
||||
};
|
||||
formatOnSave = ''
|
||||
function(bufnr)
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_fallback = true };
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
diagnostics.stylelint.enable = true;
|
||||
formatting.stylelint.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
diagnostic = { };
|
||||
};
|
||||
enabledServers = [
|
||||
{
|
||||
name = "angularls";
|
||||
extraOptions = {
|
||||
cmd = [
|
||||
"ngserver"
|
||||
"--stdio"
|
||||
"--tsProbeLocations"
|
||||
""
|
||||
"--ngProbeLocations"
|
||||
""
|
||||
];
|
||||
on_new_config = {
|
||||
__raw = ''
|
||||
function(new_config, new_root_dir)
|
||||
new_config.cmd = {
|
||||
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
|
||||
"--stdio",
|
||||
"--tsProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
"--ngProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
}
|
||||
end
|
||||
'';
|
||||
};
|
||||
filetypes = [
|
||||
"typescript"
|
||||
"html"
|
||||
"typescriptreact"
|
||||
"typescript.tsx"
|
||||
"angular"
|
||||
"html.angular"
|
||||
];
|
||||
on_attach = {
|
||||
__raw = ''
|
||||
function(client, bufnr)
|
||||
if vim.bo[bufnr].filetype == "html" then
|
||||
vim.bo[bufnr].filetype = "angular"
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
servers = {
|
||||
html.enable = true;
|
||||
cssls.enable = true;
|
||||
svelte.enable = true;
|
||||
tsserver.enable = true;
|
||||
eslint.enable = true;
|
||||
|
||||
dockerls.enable = true;
|
||||
|
||||
yamlls.enable = true;
|
||||
jsonls.enable = true;
|
||||
taplo.enable = true;
|
||||
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
pylsp.enable = true;
|
||||
|
||||
clangd = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"clangd"
|
||||
"--offset-encoding=utf-16"
|
||||
];
|
||||
};
|
||||
|
||||
nil_ls.enable = true;
|
||||
lua-ls.enable = true;
|
||||
bashls.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
lspkind = {
|
||||
enable = true;
|
||||
mode = "symbol_text";
|
||||
cmp = {
|
||||
after = ''
|
||||
function(entry, vim_item, kind)
|
||||
if entry.source.name == "npm" then
|
||||
kind.kind = ""
|
||||
kind.kind_hl_group = "CmpItemKindNpm"
|
||||
end
|
||||
kind.kind = kind.kind .. " "
|
||||
return kind
|
||||
end
|
||||
'';
|
||||
};
|
||||
symbolMap = {
|
||||
Copilot = "";
|
||||
};
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mapping = {
|
||||
"<C-n>" = "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-p>" = "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-Space>" = "cmp.mapping.confirm({select = true})";
|
||||
"<C-Enter>" = "cmp.mapping.complete()";
|
||||
};
|
||||
sources = [
|
||||
{ name = "path"; }
|
||||
{ name = "luasnip"; }
|
||||
{
|
||||
name = "npm";
|
||||
keywordLength = 4;
|
||||
priority = 10;
|
||||
}
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "nvim_lsp_signature_help"; }
|
||||
{ name = "nvim_lsp_document_symbol"; }
|
||||
];
|
||||
formatting.fields = [
|
||||
"abbr"
|
||||
"kind"
|
||||
];
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
window = {
|
||||
completion.border = "rounded";
|
||||
documentation.border = "rounded";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
which-key = {
|
||||
enable = true;
|
||||
registrations = {
|
||||
"<leader>p" = "Paste Keep Buffer";
|
||||
"<leader>n" = "Hover";
|
||||
"<leader>g" = "Git";
|
||||
"<leader>u" = "Undotree";
|
||||
"<leader>s" = {
|
||||
name = "LSP";
|
||||
r = "References";
|
||||
d = "Definitions";
|
||||
i = "Implementations";
|
||||
s = "Document Symbols";
|
||||
w = "Workspace Symbols";
|
||||
t = "Type Definitions";
|
||||
h = "Diagnostics";
|
||||
a = "Code Actions";
|
||||
f = "Auto Formatting";
|
||||
x = "LSP Format";
|
||||
};
|
||||
"<leader>x" = {
|
||||
name = "Trouble";
|
||||
x = "Toggle";
|
||||
w = "Workspace Diagnostics";
|
||||
d = "Document Diagnostics";
|
||||
q = "Quickfix";
|
||||
l = "Loclist";
|
||||
};
|
||||
"<leader>f" = {
|
||||
name = "Find";
|
||||
t = "Tree";
|
||||
f = "File";
|
||||
a = "Untracked Files";
|
||||
g = "Grep";
|
||||
b = "Buffer";
|
||||
};
|
||||
h = {
|
||||
name = "Harpoon";
|
||||
m = "Mark";
|
||||
n = "Next";
|
||||
p = "Prev";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
copilot-lua = {
|
||||
enable = true;
|
||||
suggestion.autoTrigger = true;
|
||||
};
|
||||
|
||||
openscad = {
|
||||
enable = true;
|
||||
fuzzyFinder = "fzf";
|
||||
};
|
||||
|
||||
nix.enable = true;
|
||||
};
|
||||
|
||||
extraPackages = [
|
||||
pkgs.nodePackages.typescript-language-server
|
||||
pkgs.nodePackages.stylelint
|
||||
pkgs.nodePackages.prettier
|
||||
pkgs.jq
|
||||
pkgs.html-tidy
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.stylua
|
||||
pkgs.shfmt
|
||||
pkgs.fzf
|
||||
];
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
vim-mergetool
|
||||
rest-nvim
|
||||
plenary-nvim
|
||||
actions-preview-nvim
|
||||
];
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
require("cmp-npm").setup({})
|
||||
require("rest-nvim").setup({})
|
||||
require("actions-preview").setup({})
|
||||
|
||||
if vim.g.neovide then
|
||||
-- no idea why this is needed
|
||||
vim.opt.linespace = -1
|
||||
end
|
||||
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
end
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = true,
|
||||
severity_sort = false,
|
||||
})
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
||||
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
local lazygit = Terminal:new({
|
||||
cmd = "lazygit",
|
||||
dir = "git_dir",
|
||||
direction = "float",
|
||||
|
||||
on_open = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
on_close = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
end,
|
||||
})
|
||||
|
||||
function _lazygit_toggle()
|
||||
lazygit:toggle()
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_create_user_command("ConformToggle", function(args)
|
||||
if args.bang then
|
||||
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
||||
else
|
||||
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
||||
end
|
||||
end, {
|
||||
desc = "Disable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
@@ -1,112 +0,0 @@
|
||||
[
|
||||
{
|
||||
key = "<leader>u";
|
||||
mode = "n";
|
||||
action = "<cmd>:UndotreeToggle<CR>";
|
||||
}
|
||||
# Find/Navigate
|
||||
{
|
||||
key = "<leader>ft";
|
||||
action = "<cmd>:Neotree toggle<CR>";
|
||||
}
|
||||
{
|
||||
key = "J";
|
||||
mode = "v";
|
||||
action = ":m '>+1<CR>gv=gv";
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
mode = "v";
|
||||
action = ":m '<-2<CR>gv=gv";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<C-d>";
|
||||
mode = "n";
|
||||
action = "<C-d>zz";
|
||||
}
|
||||
{
|
||||
key = "<C-u>";
|
||||
mode = "n";
|
||||
action = "<C-u>zz";
|
||||
}
|
||||
{
|
||||
key = "<leader>p";
|
||||
mode = "x";
|
||||
action = ''"_dP'';
|
||||
}
|
||||
{
|
||||
key = "<leader>p";
|
||||
mode = "n";
|
||||
action = ''"_dP'';
|
||||
}
|
||||
{
|
||||
key = "<leader>p";
|
||||
mode = "v";
|
||||
action = ''"_dP'';
|
||||
}
|
||||
{
|
||||
key = "<leader>n";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action = "vim.lsp.buf.hover";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "hh";
|
||||
mode = "n";
|
||||
action = ":Telescope harpoon marks<CR>";
|
||||
}
|
||||
# LSP Actions
|
||||
{
|
||||
key = "<leader>sa";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
lua = true;
|
||||
action = "require('actions-preview').code_actions";
|
||||
}
|
||||
{
|
||||
key = "<leader>sf";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
action = "<cmd>:ConformToggle<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>sx";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
lua = true;
|
||||
action = "vim.lsp.buf.format";
|
||||
}
|
||||
# Trouble
|
||||
{
|
||||
key = "<leader>xx";
|
||||
mode = "n";
|
||||
lua = true;
|
||||
action = "require('trouble').toggle";
|
||||
}
|
||||
{
|
||||
key = "<leader>xw";
|
||||
mode = "n";
|
||||
lua = true;
|
||||
action = "function() require('trouble').toggle('workspace_diagnostics') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xd";
|
||||
mode = "n";
|
||||
lua = true;
|
||||
action = "function() require('trouble').toggle('document_diagnostics') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xq";
|
||||
mode = "n";
|
||||
lua = true;
|
||||
action = "function() require('trouble').toggle('quickfix') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xl";
|
||||
mode = "n";
|
||||
lua = true;
|
||||
action = "function() require('trouble').toggle('loclist') end";
|
||||
}
|
||||
]
|
||||
@@ -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 ];
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
@define-color accent_color {{colors.primary.default.hex}};
|
||||
@define-color accent_bg_color {{colors.primary_container.default.hex}};
|
||||
@define-color accent_fg_color {{colors.on_primary.default.hex}};
|
||||
|
||||
@define-color destructive_color {{colors.danger.default.hex}};
|
||||
@define-color destructive_bg_color {{colors.danger_container.default.hex}};
|
||||
@define-color destructive_fg_color {{colors.on_danger.default.hex}};
|
||||
|
||||
@define-color success_color {{colors.success.default.hex}};
|
||||
@define-color success_bg_color {{colors.success_container.default.hex}};
|
||||
@define-color success_fg_color {{colors.on_success.default.hex}};
|
||||
|
||||
@define-color warning_color {{colors.warning.default.hex}};
|
||||
@define-color warning_bg_color {{colors.warning_container.default.hex}};
|
||||
@define-color warning_fg_color {{colors.on_warning.default.hex}};
|
||||
|
||||
@define-color error_color {{colors.error.default.hex}};
|
||||
@define-color error_bg_color {{colors.error_container.default.hex}};
|
||||
@define-color error_fg_color {{colors.on_error.default.hex}};
|
||||
|
||||
@define-color window_bg_color alpha({{colors.surface.default.hex}}, {{custom.transparency}});
|
||||
@define-color window_fg_color {{colors.on_surface.default.hex}};
|
||||
|
||||
@define-color view_bg_color @window_bg_color;
|
||||
@define-color view_fg_color @window_fg_color;
|
||||
|
||||
@define-color headerbar_bg_color @window_bg_color;
|
||||
@define-color headerbar_fg_color @window_fg_color;
|
||||
@define-color headerbar_backdrop_color alpha({{colors.surface_variant.default.hex}}, 0.2);
|
||||
|
||||
@define-color sidebar_bg_color alpha({{colors.surface_variant.default.hex}}, 0.2);
|
||||
@define-color sidebar_fg_color {{colors.on_surface_variant.default.hex}};
|
||||
@define-color sidebar_backdrop_color alpha({{colors.surface_variant.default.hex}}, 0.2);
|
||||
|
||||
124
modules/home-manager/theme/gtk.nix
Normal file
124
modules/home-manager/theme/gtk.nix
Normal file
@@ -0,0 +1,124 @@
|
||||
let
|
||||
transparent = color: "alpha(${color}, {{custom.transparency}})";
|
||||
mkBgColor = color: {
|
||||
${color} = {
|
||||
background_lift = "{{colors.${color}_dim.default.hex}}";
|
||||
background = "{{colors.${color}_dim.default.hex}}";
|
||||
foreground = "{{colors.on_${color}.default.hex}}";
|
||||
};
|
||||
};
|
||||
mkColor = color: {
|
||||
${color} = {
|
||||
standalone = "{{colors.${color}_fixed_dim.default.hex}}";
|
||||
background = "{{colors.${color}_fixed.default.hex}}";
|
||||
foreground = "{{colors.on_${color}_fixed.default.hex}}";
|
||||
};
|
||||
};
|
||||
mkSemantic = color: {
|
||||
${color} = {
|
||||
standalone = "{{colors.${color}.default.hex}}";
|
||||
background = "{{colors.${color}.default.hex}}";
|
||||
foreground = "{{colors.on_${color}.default.hex}}";
|
||||
};
|
||||
};
|
||||
colors =
|
||||
(mkColor "primary")
|
||||
// (mkColor "secondary")
|
||||
// (mkColor "tertiary")
|
||||
// (mkSemantic "danger")
|
||||
// (mkSemantic "warning")
|
||||
// (mkSemantic "success")
|
||||
// (mkSemantic "error")
|
||||
// (mkSemantic "info")
|
||||
// (mkBgColor "background")
|
||||
// (mkBgColor "surface")
|
||||
// (mkBgColor "surface_variant")
|
||||
// {
|
||||
outline = "{{colors.outline.default.hex}}";
|
||||
container = {
|
||||
lowest = "{{colors.surface_container_lowest.default.hex}}";
|
||||
low = "{{colors.surface_container_low.default.hex}}";
|
||||
default = "{{colors.surface_container.default.hex}}";
|
||||
high = "{{colors.surface_container_high.default.hex}}";
|
||||
highest = "{{colors.surface_container_highest.default.hex}}";
|
||||
foreground = "{{colors.on_surface.default.hex}}";
|
||||
};
|
||||
shade = {
|
||||
default = "rgba(0, 0, 0, 0.07)";
|
||||
darker = "rgba(0, 0, 0, 0.12)";
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/AvengeMedia/DankMaterialShell/blob/master/matugen/templates/gtk-colors.css
|
||||
gtk = rec {
|
||||
accent_color = colors.primary.standalone;
|
||||
accent_bg_color = colors.primary.background;
|
||||
accent_fg_color = colors.primary.foreground;
|
||||
|
||||
window_bg_color = transparent colors.surface.background;
|
||||
window_fg_color = colors.surface.foreground;
|
||||
|
||||
popover_bg_color = transparent colors.surface.background;
|
||||
popover_fg_color = colors.surface.foreground;
|
||||
|
||||
headerbar_bg_color = transparent colors.surface.background;
|
||||
headerbar_fg_color = colors.surface.foreground;
|
||||
|
||||
view_bg_color = transparent colors.surface.background_lift;
|
||||
view_fg_color = colors.surface.foreground;
|
||||
|
||||
card_bg_color = colors.surface.background_lift;
|
||||
card_fg_color = colors.surface.foreground;
|
||||
|
||||
sidebar_bg_color = window_bg_color;
|
||||
sidebar_fg_color = window_fg_color;
|
||||
|
||||
sidebar_border_color = colors.surface.background;
|
||||
sidebar_backdrop_color = window_bg_color;
|
||||
|
||||
destructive_color = colors.danger.standalone;
|
||||
destructive_bg_color = colors.danger.background;
|
||||
destructive_fg_color = colors.danger.foreground;
|
||||
|
||||
success_color = colors.success.standalone;
|
||||
success_bg_color = colors.success.background;
|
||||
success_fg_color = colors.success.foreground;
|
||||
|
||||
warning_color = colors.warning.standalone;
|
||||
warning_bg_color = colors.warning.background;
|
||||
warning_fg_color = colors.warning.foreground;
|
||||
|
||||
error_color = colors.error.standalone;
|
||||
error_bg_color = colors.error.background;
|
||||
error_fg_color = colors.error.foreground;
|
||||
|
||||
/*
|
||||
headerbar_border_color = colors.outline;
|
||||
headerbar_backdrop_color = transparent colors.background.background;
|
||||
headerbar_shade_color = colors.shade.default;
|
||||
headerbar_darker_shade_color = colors.shade.darker;
|
||||
|
||||
card_shade_color = colors.shade.default;
|
||||
|
||||
dialog_bg_color = transparent colors.background.background;
|
||||
dialog_fg_color = colors.background.foreground;
|
||||
popover_shade_color = colors.shade.default;
|
||||
|
||||
shade_color = colors.shade.default;
|
||||
scrollbar_outline_color = colors.outline;
|
||||
|
||||
thumbnail_bg_color = colors.secondary.background;
|
||||
thumbnail_fg_color = colors.secondary.foreground;
|
||||
|
||||
sidebar_shade_color = colors.shade.default;
|
||||
|
||||
secondary_sidebar_bg_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_fg_color = colors.surface_variant.foreground;
|
||||
secondary_sidebar_backdrop_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_shade_color = colors.shade.default;
|
||||
*/
|
||||
};
|
||||
in
|
||||
builtins.concatStringsSep "\n" (
|
||||
builtins.map (name: "@define-color ${name} ${builtins.getAttr name gtk};") (builtins.attrNames gtk)
|
||||
)
|
||||
@@ -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 = 1
|
||||
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}}
|
||||
@@ -12,6 +14,7 @@ decoration {
|
||||
|
||||
blur {
|
||||
size = {{custom.blur}}
|
||||
passes = 2
|
||||
passes = 3
|
||||
popups = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,207 +178,367 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.adw-gtk3
|
||||
(pkgs.writeShellApplication {
|
||||
name = "theme";
|
||||
runtimeInputs = [
|
||||
pkgs.matugen
|
||||
pkgs.swww
|
||||
pkgs.gnome.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 = "colorscheme md3-evo";
|
||||
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
|
||||
];
|
||||
};
|
||||
|
||||
gtk = {
|
||||
gtk3.extraCss = "@import './theme.css';";
|
||||
gtk4.extraCss = "@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 = {
|
||||
kitty = {
|
||||
input_path = ./kitty.conf;
|
||||
output_path = "${config.xdg.configHome}/kitty/theme.conf";
|
||||
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)";
|
||||
};
|
||||
};
|
||||
nvim = {
|
||||
input_path = ./nvim.vim;
|
||||
output_path = "${config.xdg.configHome}/nvim/colors/md3-evo.vim";
|
||||
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"
|
||||
];
|
||||
};
|
||||
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.css;
|
||||
output_path = "${config.xdg.configHome}/gtk-3.0/theme.css";
|
||||
};
|
||||
gtk4 = {
|
||||
input_path = ./gtk.css;
|
||||
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";
|
||||
};
|
||||
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
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
12
modules/home-manager/theme/niri.kdl
Normal file
12
modules/home-manager/theme/niri.kdl
Normal 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}}
|
||||
}
|
||||
@@ -1,22 +1,22 @@
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
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
|
||||
|
||||
if exists("g:neovide")
|
||||
hi Normal guibg={{colors.surface.default.hex}} guifg={{colors.on_surface.default.hex}}
|
||||
set pumblend=0
|
||||
set winblend=0
|
||||
else
|
||||
hi Normal ctermbg=NONE guibg=NONE guifg={{colors.on_surface.default.hex}}
|
||||
set noshowmode
|
||||
end
|
||||
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}}"
|
||||
@@ -37,173 +37,219 @@ let g:terminal_color_14 = "{{colors.cyan.default.hex}}"
|
||||
let g:terminal_color_15 = "{{colors.on_surface_variant.default.hex}}"
|
||||
set termguicolors
|
||||
|
||||
hi Pmenu ctermbg=none guibg=none guifg={{colors.on_surface.default.hex}}
|
||||
hi PmenuSel guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi CursorColumn guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi CursorLine guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi WildMenu guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi MoreMsg guifg={{colors.primary.default.hex}}
|
||||
hi Question guifg={{colors.secondary.default.hex}}
|
||||
set background={{mode | to_lower}}
|
||||
|
||||
hi Title guifg={{colors.primary.default.hex}}
|
||||
hi FloatTitle guifg={{colors.primary.default.hex}}
|
||||
hi Visual guifg={{colors.on_primary.default.hex}} guibg={{colors.primary.default.hex}}
|
||||
if exists("g:neovide")
|
||||
hi! Normal guibg={{colors.surface.default.hex}} guifg={{colors.on_surface.default.hex}}
|
||||
set pumblend=0
|
||||
set winblend=0
|
||||
else
|
||||
hi! Normal ctermbg=NONE guibg=NONE guifg={{colors.on_surface.default.hex}}
|
||||
end
|
||||
|
||||
hi Folded guibg={{colors.secondary.default.hex}} guifg={{colors.on_secondary.default.hex}}
|
||||
hi FoldColumn guibg={{colors.secondary.default.hex}} guifg={{colors.on_secondary.default.hex}}
|
||||
hi! Pmenu ctermbg=none guibg=none guifg={{colors.on_surface.default.hex}}
|
||||
hi! PmenuSel guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi! PmenuThumb guifg=none guifg={{colors.primary.default.hex}}
|
||||
hi! link NormalFloat Normal
|
||||
hi! FloatBorder guifg={{colors.primary.default.hex}}
|
||||
hi! CursorColumn guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi! CursorLine guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi! WildMenu guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi! MoreMsg guifg={{colors.primary.default.hex}}
|
||||
hi! Question guifg={{colors.secondary.default.hex}}
|
||||
|
||||
hi Conceal guibg={{colors.secondary_container.default.hex}} guifg={{colors.on_secondary_container.default.hex}}
|
||||
hi! Title guifg={{colors.primary.default.hex}}
|
||||
hi! FloatTitle guifg={{colors.primary.default.hex}}
|
||||
hi! Visual guifg={{colors.on_primary.default.hex}} guibg={{colors.primary.default.hex}}
|
||||
|
||||
hi TabLine guibg={{colors.primary_container.default.hex}} guifg={{colors.on_primary_container.default.hex}}
|
||||
hi TabLineFill guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
hi! Folded guibg={{colors.secondary.default.hex}} guifg={{colors.on_secondary.default.hex}}
|
||||
hi! FoldColumn guibg={{colors.secondary.default.hex}} guifg={{colors.on_secondary.default.hex}}
|
||||
|
||||
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! Conceal guibg={{colors.secondary_container.default.hex}} guifg={{colors.on_secondary_container.default.hex}}
|
||||
|
||||
hi CmpItemKindCopilot guifg={{colors.cyan.default.hex}}
|
||||
hi CmpItemKindNpm guifg={{colors.red.default.hex}}
|
||||
hi! TabLine guibg={{colors.primary_container.default.hex}} guifg={{colors.on_primary_container.default.hex}}
|
||||
hi! TabLineFill guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.default.hex}}
|
||||
|
||||
hi Error guibg={{colors.danger_container.default.hex}} guifg={{colors.on_danger_container.default.hex}}
|
||||
hi ErrorMsg guibg={{colors.danger_container.default.hex}} guifg={{colors.on_danger_container.default.hex}}
|
||||
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! SpecialKey guifg={{colors.primary.default.hex}}
|
||||
hi! Directory guifg={{colors.primary.default.hex}}
|
||||
|
||||
hi DiagnosticError guifg={{colors.danger.default.hex}}
|
||||
hi DiagnosticWarn guifg={{colors.warning.default.hex}}
|
||||
hi DiagnosticInfo guifg={{colors.info.default.hex}}
|
||||
hi DiagnosticHint guifg={{colors.outline.default.hex}}
|
||||
hi DiagnosticOk guifg={{colors.success.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 RedrawDebugNormal guibg={{colors.surface_variant.default.hex}} guifg={{colors.on_surface_variant.default.hex}}
|
||||
hi RedrawDebugClear guibg={{colors.warning.default.hex}} guifg={{colors.on_warning.default.hex}}
|
||||
hi RedrawDebugComposed guibg={{colors.success.default.hex}} guifg={{colors.on_success.default.hex}}
|
||||
hi RedrawDebugRecompose guibg={{colors.danger.default.hex}} guifg={{colors.on_danger.default.hex}}
|
||||
hi! CmpItemKindCopilot guifg={{colors.cyan.default.hex}}
|
||||
hi! CmpItemKindNpm guifg={{colors.red.default.hex}}
|
||||
|
||||
hi DiagnosticUnderlineError gui=undercurl guisp={{colors.danger.default.hex}}
|
||||
hi DiagnosticUnderlineWarn gui=undercurl guisp={{colors.warning.default.hex}}
|
||||
hi DiagnosticUnderlineInfo gui=undercurl guisp={{colors.info.default.hex}}
|
||||
hi DiagnosticUnderlineHint gui=undercurl guisp={{colors.outline.default.hex}}
|
||||
hi DiagnosticUnderlineOk gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi DiagnosticDeprecated gui=strikethrough guisp={{colors.danger.default.hex}}
|
||||
hi! Error guibg={{colors.danger_container.default.hex}} guifg={{colors.on_danger_container.default.hex}}
|
||||
hi! ErrorMsg guibg={{colors.danger_container.default.hex}} guifg={{colors.on_danger_container.default.hex}}
|
||||
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 SpellBad gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi SpellCap gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi SpellRare gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi SpellLocal gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi! CoverageCovered guifg={{colors.success.default.hex}}
|
||||
hi! CoverageUncovered guifg={{colors.danger.default.hex}}
|
||||
hi! CoveragePartial guifg={{colors.warning.default.hex}}
|
||||
|
||||
hi DiffAdd guibg={{colors.green_container.default.hex}} guifg={{colors.on_green_container.default.hex}}
|
||||
hi DiffChange guibg={{colors.yellow_container.default.hex}} guifg={{colors.on_yellow_container.default.hex}}
|
||||
hi DiffDelete guibg={{colors.red_container.default.hex}} guifg={{colors.on_red_container.default.hex}}
|
||||
hi DiffText guibg={{colors.blue_container.default.hex}} guifg={{colors.on_blue_container.default.hex}}
|
||||
hi! DiagnosticError guifg={{colors.danger.default.hex}}
|
||||
hi! DiagnosticWarn guifg={{colors.warning.default.hex}}
|
||||
hi! DiagnosticInfo guifg={{colors.info.default.hex}}
|
||||
hi! DiagnosticHint guifg={{colors.outline.default.hex}}
|
||||
hi! DiagnosticOk guifg={{colors.success.default.hex}}
|
||||
|
||||
hi NeoTreeGitAdded guifg={{colors.green.default.hex}}
|
||||
hi NeoTreeGitDeleted guifg={{colors.red.default.hex}}
|
||||
hi NeoTreeGitModified guifg={{colors.yellow.default.hex}}
|
||||
hi NeoTreeGitConflict guifg={{colors.danger.default.hex}}
|
||||
hi NeoTreeGitUntracked guifg={{colors.blue.default.hex}}
|
||||
hi! RedrawDebugNormal guibg={{colors.surface_variant.default.hex}} guifg={{colors.on_surface_variant.default.hex}}
|
||||
hi! RedrawDebugClear guibg={{colors.warning.default.hex}} guifg={{colors.on_warning.default.hex}}
|
||||
hi! RedrawDebugComposed guibg={{colors.success.default.hex}} guifg={{colors.on_success.default.hex}}
|
||||
hi! RedrawDebugRecompose guibg={{colors.danger.default.hex}} guifg={{colors.on_danger.default.hex}}
|
||||
|
||||
hi NonText guifg={{colors.outline_variant.default.hex}}
|
||||
hi LineNr guifg={{colors.outline_variant.default.hex}}
|
||||
hi CursorLineNr guifg={{colors.on_surface.default.hex}}
|
||||
hi SignColumn guibg=none guifg={{colors.on_surface.default.hex}}
|
||||
hi! DiagnosticUnderlineError gui=undercurl guisp={{colors.danger.default.hex}}
|
||||
hi! DiagnosticUnderlineWarn gui=undercurl guisp={{colors.warning.default.hex}}
|
||||
hi! DiagnosticUnderlineInfo gui=undercurl guisp={{colors.info.default.hex}}
|
||||
hi! DiagnosticUnderlineHint gui=undercurl guisp={{colors.outline.default.hex}}
|
||||
hi! DiagnosticUnderlineOk gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi! DiagnosticDeprecated gui=strikethrough guisp={{colors.danger.default.hex}}
|
||||
|
||||
hi IblScope guifg={{colors.on_surface.default.hex}}
|
||||
hi @ibl.scope.char.1 guifg={{colors.on_surface.default.hex}}
|
||||
hi @ibl.scope.underline.1 guisp={{colors.on_surface.default.hex}}
|
||||
hi! SpellBad gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi! SpellCap gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi! SpellRare gui=undercurl guisp={{colors.success.default.hex}}
|
||||
hi! SpellLocal gui=undercurl guisp={{colors.success.default.hex}}
|
||||
|
||||
hi Comment guifg={{colors.outline.default.hex}}
|
||||
hi Todo guibg={{colors.yellow_container.default.hex}} guifg={{colors.on_yellow_container.default.hex}}
|
||||
hi def link @comment.todo Todo
|
||||
hi def link @comment.error Error
|
||||
hi! DiffAdd guibg={{colors.green_container.default.hex}} guifg={{colors.on_green_container.default.hex}}
|
||||
hi! DiffChange guibg={{colors.yellow_container.default.hex}} guifg={{colors.on_yellow_container.default.hex}}
|
||||
hi! DiffDelete guibg={{colors.red_container.default.hex}} guifg={{colors.on_red_container.default.hex}}
|
||||
hi! DiffText guibg={{colors.blue_container.default.hex}} guifg={{colors.on_blue_container.default.hex}}
|
||||
|
||||
hi String guifg={{colors.strings.default.hex}}
|
||||
hi! NeoTreeGitAdded guifg={{colors.green.default.hex}}
|
||||
hi! NeoTreeGitDeleted guifg={{colors.red.default.hex}}
|
||||
hi! NeoTreeGitModified guifg={{colors.yellow.default.hex}}
|
||||
hi! NeoTreeGitConflict guifg={{colors.danger.default.hex}}
|
||||
hi! NeoTreeGitUntracked guifg={{colors.blue.default.hex}}
|
||||
|
||||
hi Identifier guifg={{colors.on_surface.default.hex}}
|
||||
hi Statement gui=bold guifg={{colors.on_surface.default.hex}}
|
||||
hi def link Operator Normal
|
||||
hi @conditional.ternary guifg={{colors.on_surface.default.hex}}
|
||||
hi def link @keyword.conditional.ternary Operator
|
||||
hi def link Delimiter Normal
|
||||
hi def link @lsp.mod.local Normal
|
||||
hi def link @parameter Identifier
|
||||
hi! NonText guifg={{colors.outline_variant.default.hex}}
|
||||
hi! CursorLineNr guifg={{colors.on_surface.default.hex}}
|
||||
hi! SignColumn guibg=none guifg={{colors.on_surface.default.hex}}
|
||||
hi! LineNr guifg={{colors.secondary.default.hex}}
|
||||
|
||||
hi @lsp.mod.defaultLibrary gui=bold
|
||||
hi @lsp.mod.readonly gui=italic
|
||||
hi! IblScope guifg={{colors.on_surface.default.hex}}
|
||||
hi! @ibl.scope.char.1 guifg={{colors.on_surface.default.hex}}
|
||||
hi! @ibl.scope.underline.1 guisp={{colors.on_surface.default.hex}}
|
||||
|
||||
hi Constant guifg={{colors.constants.default.hex}}
|
||||
hi def link @variable Constant
|
||||
hi! Comment guifg={{colors.outline.default.hex}}
|
||||
hi! Todo guibg={{colors.yellow_container.default.hex}} guifg={{colors.on_yellow_container.default.hex}}
|
||||
hi! link @comment.todo Todo
|
||||
hi! link @comment.error Error
|
||||
|
||||
hi @property guifg={{colors.properties.default.hex}}
|
||||
hi def link @field @property
|
||||
hi def link @label.json @property
|
||||
hi def link @label.jsonc @label.json
|
||||
hi def link @property.typescript @property
|
||||
hi def link @lsp.type.property @property
|
||||
hi def link @attribute @property
|
||||
hi def link @tag.attribute @property
|
||||
hi! String guifg={{colors.strings.default.hex}}
|
||||
|
||||
hi def link @lsp.type.variable Constant
|
||||
hi def link @lsp.typemod.variable.local Identifier
|
||||
hi! Identifier guifg={{colors.on_surface.default.hex}}
|
||||
hi! @variable guifg={{colors.on_surface.default.hex}}
|
||||
hi! Operator guifg={{colors.on_surface.default.hex}}
|
||||
hi! Delimiter guifg={{colors.on_surface.default.hex}}
|
||||
hi! Statement gui=bold guifg={{colors.on_surface.default.hex}}
|
||||
|
||||
hi Keyword guifg={{colors.keywords.default.hex}}
|
||||
hi Special guifg={{colors.keywords.default.hex}}
|
||||
hi def link Character Keyword
|
||||
hi def link Boolean Keyword
|
||||
hi def link Repeat Keyword
|
||||
hi def link Label Keyword
|
||||
hi def link Exception Keyword
|
||||
hi def link Include Keyword
|
||||
hi def link Conditional Keyword
|
||||
hi def link @type.builtin Keyword
|
||||
hi! link Operator Normal
|
||||
hi! link @punctuation.special @punctuation
|
||||
hi! @conditional.ternary guifg={{colors.on_surface.default.hex}}
|
||||
hi! link @keyword.conditional.ternary Operator
|
||||
hi! link Delimiter Normal
|
||||
hi! link @lsp.mod.local Normal
|
||||
hi! link @parameter Identifier
|
||||
|
||||
hi Number guifg={{colors.numbers.default.hex}}
|
||||
hi Function guifg={{colors.functions.default.hex}}
|
||||
hi! @lsp.mod.defaultLibrary gui=bold
|
||||
hi! @lsp.mod.readonly gui=italic
|
||||
|
||||
hi Structure guifg={{colors.structures.default.hex}}
|
||||
hi def link PreProc Structure
|
||||
hi def link Tag Structure
|
||||
hi def link @attribute.typescript Structure
|
||||
hi! Constant guifg={{colors.constants.default.hex}}
|
||||
hi! link @variable Constant
|
||||
hi! link @variable.parameter Identifier
|
||||
hi! link @lsp.typemod.variable.local Identifier
|
||||
hi! link @variable.python Identifier
|
||||
hi! link @variable.lua Identifier
|
||||
|
||||
hi Type gui=none guifg={{colors.types.default.hex}}
|
||||
hi def link @lsp.type.interface Type
|
||||
hi! @property guifg={{colors.properties.default.hex}}
|
||||
hi! link @field @property
|
||||
hi! link @variable.member @property
|
||||
hi! link @label.json @property
|
||||
hi! link @label.jsonc @label.json
|
||||
hi! link @property.typescript @property
|
||||
hi! link @lsp.type.property @property
|
||||
hi! link @attribute @property
|
||||
hi! link @tag.attribute @property
|
||||
|
||||
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! Keyword guifg={{colors.keywords.default.hex}}
|
||||
hi! Special guifg={{colors.keywords.default.hex}}
|
||||
hi! link Character Keyword
|
||||
hi! link Boolean Keyword
|
||||
hi! link Repeat Keyword
|
||||
hi! link Label Keyword
|
||||
hi! link Exception Keyword
|
||||
hi! link Include Keyword
|
||||
hi! link Conditional Keyword
|
||||
hi! link @type.builtin Keyword
|
||||
|
||||
:lua require('lualine').setup({options = {theme = {
|
||||
\ insert = {
|
||||
\ a = {fg = "{{colors.on_green.default.hex}}", bg = "{{colors.green.default.hex}}", gui = "bold"},
|
||||
\ b = {fg = "{{colors.on_surface_variant.default.hex}}", bg = "{{colors.surface_variant.default.hex}}"},
|
||||
\ c = {fg = "{{colors.on_surface.default.hex}}", bg = "{{colors.surface.default.hex}}"},
|
||||
hi! link NotifyERRORIcon NotifyERRORBorder
|
||||
hi! link NotifyWARNIcon NotifyWARNBorder
|
||||
hi! link NotifyINFOIcon NotifyINFOBorder
|
||||
hi! link NotifyTRACEIcon NotifyTRACEBorder
|
||||
hi! link NotifyDEBUGIcon NotifyDEBUGBorder
|
||||
hi! link NotifyERRORTitle NotifyERRORBorder
|
||||
hi! link NotifyWARNTitle NotifyWARNBorder
|
||||
hi! link NotifyINFOTitle NotifyINFOBorder
|
||||
hi! link NotifyTRACETitle NotifyTRACEBorder
|
||||
hi! link NotifyDEBUGTitle NotifyDEBUGBorder
|
||||
|
||||
hi! Number guifg={{colors.numbers.default.hex}}
|
||||
hi! Function guifg={{colors.functions.default.hex}}
|
||||
|
||||
hi! Structure guifg={{colors.structures.default.hex}}
|
||||
hi! link PreProc Structure
|
||||
hi! link Tag Structure
|
||||
hi! link @attribute.typescript Structure
|
||||
hi! link @lsp.type.decorator Structure
|
||||
hi! link @lsp.type.attributeBracket Structure
|
||||
hi! link @keyword.directive.cpp PreProc
|
||||
hi! link @keyword.directive.define.cpp PreProc
|
||||
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"},
|
||||
\ "b": {"fg": "{{colors.on_surface_variant.default.hex}}", "bg": "{{colors.surface_variant.default.hex}}"},
|
||||
\ "c": {"fg": "{{colors.on_surface.default.hex}}", "bg": "{{colors.surface.default.hex}}"},
|
||||
\ },
|
||||
\ normal = {
|
||||
\ a = {fg = "{{colors.on_primary.default.hex}}", bg = "{{colors.primary.default.hex}}", gui = "bold"},
|
||||
\ b = {fg = "{{colors.on_surface_variant.default.hex}}", bg = "{{colors.surface_variant.default.hex}}"},
|
||||
\ c = {fg = "{{colors.on_surface.default.hex}}", bg = "{{colors.surface.default.hex}}"},
|
||||
\ "normal": {
|
||||
\ "a": {"fg": "{{colors.on_primary.default.hex}}", "bg": "{{colors.primary.default.hex}}", "gui": "bold"},
|
||||
\ "b": {"fg": "{{colors.on_surface_variant.default.hex}}", "bg": "{{colors.surface_variant.default.hex}}"},
|
||||
\ "c": {"fg": "{{colors.on_surface.default.hex}}", "bg": "{{colors.surface.default.hex}}"},
|
||||
\ },
|
||||
\ command = {
|
||||
\ a = {fg = "{{colors.on_tertiary.default.hex}}", bg = "{{colors.tertiary.default.hex}}", gui = "bold"},
|
||||
\ b = {fg = "{{colors.on_surface_variant.default.hex}}", bg = "{{colors.surface_variant.default.hex}}"},
|
||||
\ c = {fg = "{{colors.on_surface.default.hex}}", bg = "{{colors.surface.default.hex}}"},
|
||||
\ "command": {
|
||||
\ "a": {"fg": "{{colors.on_tertiary.default.hex}}", "bg": "{{colors.tertiary.default.hex}}", "gui": "bold"},
|
||||
\ "b": {"fg": "{{colors.on_surface_variant.default.hex}}", "bg": "{{colors.surface_variant.default.hex}}"},
|
||||
\ "c": {"fg": "{{colors.on_surface.default.hex}}", "bg": "{{colors.surface.default.hex}}"},
|
||||
\ },
|
||||
\ visual = {
|
||||
\ a = {fg = "{{colors.on_magenta.default.hex}}", bg = "{{colors.magenta.default.hex}}", gui = "bold"},
|
||||
\ b = {fg = "{{colors.on_surface_variant.default.hex}}", bg = "{{colors.surface_variant.default.hex}}"},
|
||||
\ c = {fg = "{{colors.on_surface.default.hex}}", bg = "{{colors.surface.default.hex}}"},
|
||||
\ "visual": {
|
||||
\ "a": {"fg": "{{colors.on_magenta.default.hex}}", "bg": "{{colors.magenta.default.hex}}", "gui": "bold"},
|
||||
\ "b": {"fg": "{{colors.on_surface_variant.default.hex}}", "bg": "{{colors.surface_variant.default.hex}}"},
|
||||
\ "c": {"fg": "{{colors.on_surface.default.hex}}", "bg": "{{colors.surface.default.hex}}"},
|
||||
\ },
|
||||
\ replace = {
|
||||
\ a = {fg = "{{colors.on_red.default.hex}}", bg = "{{colors.red.default.hex}}", gui = "bold"},
|
||||
\ b = {fg = "{{colors.on_surface_variant.default.hex}}", bg = "{{colors.surface_variant.default.hex}}"},
|
||||
\ c = {fg = "{{colors.on_surface.default.hex}}", bg = "{{colors.surface.default.hex}}"},
|
||||
\ "replace": {
|
||||
\ "a": {"fg": "{{colors.on_red.default.hex}}", "bg": "{{colors.red.default.hex}}", "gui": "bold"},
|
||||
\ "b": {"fg": "{{colors.on_surface_variant.default.hex}}", "bg": "{{colors.surface_variant.default.hex}}"},
|
||||
\ "c": {"fg": "{{colors.on_surface.default.hex}}", "bg": "{{colors.surface.default.hex}}"},
|
||||
\ },
|
||||
\ inactive = {
|
||||
\ a = {fg = "{{colors.on_surface_variant.default.hex}}", bg = "{{colors.surface_variant.default.hex}}", gui = "bold"},
|
||||
\ b = {fg = "{{colors.on_surface_variant.default.hex}}", bg = "{{colors.surface_variant.default.hex}}"},
|
||||
\ c = {fg = "{{colors.on_surface_variant.default.hex}}", bg = "{{colors.surface_variant.default.hex}}"},
|
||||
\ "inactive": {
|
||||
\ "a": {"fg": "{{colors.on_surface_variant.default.hex}}", "bg": "{{colors.surface_variant.default.hex}}", "gui": "bold"},
|
||||
\ "b": {"fg": "{{colors.on_surface_variant.default.hex}}", "bg": "{{colors.surface_variant.default.hex}}"},
|
||||
\ "c": {"fg": "{{colors.on_surface_variant.default.hex}}", "bg": "{{colors.surface_variant.default.hex}}"},
|
||||
\ },
|
||||
\} } })
|
||||
|
||||
lua require('nvim-web-devicons').refresh()
|
||||
\}
|
||||
|
||||
375
modules/home-manager/theme/swaync.css
Normal file
375
modules/home-manager/theme/swaync.css
Normal 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;
|
||||
}
|
||||
70
modules/home-manager/theme/waybar.css
Normal file
70
modules/home-manager/theme/waybar.css
Normal 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}};
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
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"
|
||||
];
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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,8 @@
|
||||
./hardware/amdgpu.nix
|
||||
./hardware/cc1.nix
|
||||
./hardware/fv43u.nix
|
||||
./hardware/pimax.nix
|
||||
./hardware/q3279vwf.nix
|
||||
./hardware/virtual-camera.nix
|
||||
|
||||
./locales/theaninova.nix
|
||||
@@ -25,11 +29,21 @@
|
||||
./usecases/gaming.nix
|
||||
./usecases/3d-printing.nix
|
||||
./usecases/development.nix
|
||||
./usecases/windows-vm.nix
|
||||
|
||||
./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
|
||||
];
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.desktops.gamescope;
|
||||
in
|
||||
{
|
||||
options.desktops.gamescope.enable = mkEnableOption "Enable the SteamOS Compositor as a desktop environment";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession = {
|
||||
enable = true;
|
||||
args = [
|
||||
"--hide-cursor-delay"
|
||||
"3000"
|
||||
"--fadee-out-duration"
|
||||
"200"
|
||||
"--xwayland-count"
|
||||
"2"
|
||||
"-W"
|
||||
(placeholder "SCREEN_WIDTH")
|
||||
"-H"
|
||||
(placeholder "SCREEN_HEIGHT")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
services = {
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${pkgs.hyprland}/bin/Hyprland &> /dev/null";
|
||||
user = username;
|
||||
};
|
||||
default_session = "${pkgs.greetd.tuigreet}/bin/tuigreet";
|
||||
};
|
||||
};
|
||||
|
||||
dbus.enable = true;
|
||||
|
||||
pcscd.enable = true;
|
||||
|
||||
# nautilus on non-gnome
|
||||
gvfs.enable = true;
|
||||
# fix pinentry on non-gnome
|
||||
dbus.packages = with pkgs; [ gcr ];
|
||||
gnome.gnome-online-accounts.enable = true;
|
||||
gnome.evolution-data-server.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
hyprland.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
};
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
*/
|
||||
};
|
||||
}
|
||||
@@ -15,12 +15,63 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
systemPackages = with pkgs; [ glib ];
|
||||
environment.systemPackages = with pkgs; [ glib ];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
home-manager.users.${username} = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
settings = {
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
};
|
||||
input.numlock_by_default = true;
|
||||
};
|
||||
plugins = with pkgs.hyprlandPlugins; [
|
||||
];
|
||||
};
|
||||
home = {
|
||||
packages = with pkgs; [ grim ];
|
||||
sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GDK_BACKEND = "wayland,x11,*";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
# https://github.com/swaywm/sway/issues/6272
|
||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
};
|
||||
};
|
||||
xdg.configFile."uwsm/env".source = pkgs.writeText "env" (
|
||||
lib.strings.concatLines (
|
||||
lib.attrsets.mapAttrsToList (
|
||||
k: v: "export ${builtins.toString k}=${builtins.toString v}"
|
||||
) config.home-manager.users.${username}.home.sessionVariables
|
||||
)
|
||||
);
|
||||
systemd.user.services = {
|
||||
"flatpak-managed-install".Unit = {
|
||||
After = [ "network-online.target" ];
|
||||
Wants = [ "network-online.target" ];
|
||||
};
|
||||
};
|
||||
services.polkit-gnome.enable = true;
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
"flatpak-managed-install" = {
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
@@ -29,36 +80,39 @@ in
|
||||
"hyprland"
|
||||
"gtk"
|
||||
];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
|
||||
};
|
||||
};
|
||||
|
||||
security.pam.services.gdm.enableGnomeKeyring = true;
|
||||
security.pam.services.hyprland.enableGnomeKeyring = true;
|
||||
|
||||
services = {
|
||||
kmscon = {
|
||||
enable = true;
|
||||
hwRender = true;
|
||||
};
|
||||
greetd = {
|
||||
enable = true;
|
||||
greeterManagesPlymouth = false;
|
||||
settings = {
|
||||
initial_session = {
|
||||
command = "${pkgs.hyprland}/bin/Hyprland &> /dev/null";
|
||||
command = "uwsm start ${pkgs.hyprland}/share/wayland-sessions/hyprland.desktop";
|
||||
user = username;
|
||||
};
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks";
|
||||
command = "${lib.getExe pkgs.tuigreet} --asterisks --remember --user-menu --cmd 'uwsm start hyprland-uwsm.desktop'";
|
||||
user = username;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dbus.enable = true;
|
||||
|
||||
dbus = {
|
||||
enable = true;
|
||||
implementation = "broker";
|
||||
};
|
||||
pcscd.enable = true;
|
||||
|
||||
# nautilus on non-gnome
|
||||
gvfs.enable = true;
|
||||
# fix pinentry on non-gnome
|
||||
dbus.packages = with pkgs; [ gcr ];
|
||||
gnome.gnome-online-accounts.enable = true;
|
||||
gnome.evolution-data-server.enable = true;
|
||||
};
|
||||
programs.dconf.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
164
modules/nixos/desktops/niri.nix
Normal file
164
modules/nixos/desktops/niri.nix
Normal file
@@ -0,0 +1,164 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.desktops.niri;
|
||||
in
|
||||
{
|
||||
options.desktops.niri = {
|
||||
enable = lib.mkEnableOption "Enable a DE based on Niri";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri.enable = true;
|
||||
|
||||
home-manager.users.${username} = {
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GDK_BACKEND = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
xwayland-satellite
|
||||
# fonts
|
||||
noto-fonts
|
||||
# gnome packages
|
||||
qalculate-gtk
|
||||
evince
|
||||
baobab
|
||||
gnome.gvfs
|
||||
nautilus
|
||||
simple-scan
|
||||
eog
|
||||
ghex
|
||||
gnome-disk-utility
|
||||
# fixes
|
||||
xorg.xrandr
|
||||
];
|
||||
|
||||
pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
niri.settings = {
|
||||
binds = {
|
||||
"Mod+Left".action.focus-column-left = [ ];
|
||||
"Mod+Right".action.focus-column-right = [ ];
|
||||
"Mod+Up".action.focus-window-or-workspace-up = [ ];
|
||||
"Mod+Down".action.focus-window-or-workspace-down = [ ];
|
||||
|
||||
"Mod+WheelScrollUp".action.focus-column-left = [ ];
|
||||
"Mod+WheelScrollDown".action.focus-column-right = [ ];
|
||||
|
||||
"Mod+Shift+Left".action.move-column-left = [ ];
|
||||
"Mod+Shift+Right".action.move-column-right = [ ];
|
||||
"Mod+Shift+Up".action.move-window-up-or-to-workspace-up = [ ];
|
||||
"Mod+Shift+Down".action.move-window-down-or-to-workspace-down = [ ];
|
||||
|
||||
"Mod+C".action.close-window = [ ];
|
||||
/*
|
||||
"Mod+M".action.spawn = [
|
||||
(pkgs.writeShellScript "qalculate" ''
|
||||
if niri msg --json windows | jq -e 'any(.[]; .app_id == "qalculate-gtk")'; then
|
||||
pkill qalculate-gtk
|
||||
else
|
||||
qalculate-gtk &
|
||||
fi
|
||||
'')
|
||||
];
|
||||
*/
|
||||
|
||||
"Mod+T".action.spawn = [ "kitty" ];
|
||||
|
||||
"Mod+V".action.maximize-column = [ ];
|
||||
"Mod+D".action.fullscreen-window = [ ];
|
||||
"Mod+P".action.toggle-window-floating = [ ];
|
||||
|
||||
"Mod+Shift+V".action.screenshot = [ ];
|
||||
# "Mod+Shift+C".action.pick-color = [ ];
|
||||
};
|
||||
overview.zoom = 0.8;
|
||||
window-rules = [
|
||||
{
|
||||
clip-to-geometry = true;
|
||||
tiled-state = true;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "neovide"; } ];
|
||||
default-column-width.fixed = 1300;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "firefox"; } ];
|
||||
default-column-width.fixed = 1500;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "qalculate-gtk"; } ];
|
||||
open-floating = true;
|
||||
default-column-width.fixed = 1000;
|
||||
default-window-height.fixed = 800;
|
||||
default-floating-position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
relative-to = "bottom";
|
||||
};
|
||||
}
|
||||
];
|
||||
layout = {
|
||||
always-center-single-column = true;
|
||||
center-focused-column = "always";
|
||||
focus-ring.enable = false;
|
||||
border.enable = false;
|
||||
};
|
||||
input = {
|
||||
mouse.accel-profile = "flat";
|
||||
warp-mouse-to-focus.enable = true;
|
||||
focus-follows-mouse = {
|
||||
enable = false;
|
||||
max-scroll-amount = "5%";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
kmscon = {
|
||||
enable = true;
|
||||
hwRender = true;
|
||||
};
|
||||
greetd = {
|
||||
enable = true;
|
||||
greeterManagesPlymouth = false;
|
||||
settings = {
|
||||
initial_session = {
|
||||
command = "${pkgs.niri}/bin/niri-session";
|
||||
user = username;
|
||||
};
|
||||
default_session = {
|
||||
command = "${lib.getExe pkgs.tuigreet} --asterisks --remember --user-menu --cmd '${pkgs.niri}/bin/niri-session'";
|
||||
user = username;
|
||||
};
|
||||
};
|
||||
};
|
||||
dbus = {
|
||||
enable = true;
|
||||
implementation = "broker";
|
||||
};
|
||||
pcscd.enable = true;
|
||||
gvfs.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user