Compare commits

..

141 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
e26ac7cbe2 Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles into gitea 2024-11-11 14:02:59 +01:00
Lennart J. Kurzweg (Nx2)
66221229ca gitea, crashes 2024-11-11 14:02:21 +01:00
Lennart J. Kurzweg (Nx2)
9b36c29009 i accedentally deleted my tuda eduroam 2024-11-11 10:33:33 +01:00
Lennart J. Kurzweg (Nx2)
55587f35f6 merge fixups 2024-11-09 23:57:48 +01:00
Lennart J. Kurzweg (Nx2)
966f9d67fc Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles 2024-11-09 23:56:05 +01:00
Lennart J. Kurzweg (Nx2)
2e1c0f495b better nxsent 2024-11-09 23:56:00 +01:00
Lennart J. Kurzweg (Nx2)
ab4c26c178 Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles 2024-11-09 20:24:22 +01:00
Lennart J. Kurzweg (Nx2)
91a5a6def8 manual sops merge before merge 2024-11-09 20:06:45 +01:00
Lennart J. Kurzweg (Nx2)
104d1334df huge cleanup 2024-11-09 19:48:52 +01:00
Lennart J. Kurzweg (Nx2)
c19c270775 newer curl 2024-11-08 13:48:37 +01:00
Lennart J. Kurzweg (Nx2)
c5c41087b5 dm new style 2024-11-08 13:48:27 +01:00
Lennart J. Kurzweg (Nx2)
924f48b15a nx2site001 2024-11-08 13:48:02 +01:00
Lennart J. Kurzweg (Nx2)
6abff56bbd tuda-moodle-rice 2024-11-08 13:42:49 +01:00
Lennart J. Kurzweg (Nx2)
5f9c6dd0a3 yazi more rice 2024-11-07 16:34:01 +01:00
Lennart J. Kurzweg (Nx2)
c426029a25 adb 2024-11-07 16:33:56 +01:00
Lennart J. Kurzweg (Nx2)
1790336aa5 Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles 2024-11-06 13:53:22 +01:00
Lennart J. Kurzweg (Nx2)
06a630319d prettier code 2024-11-06 13:53:19 +01:00
Lennart J. Kurzweg (Nx2)
1814068cfe better zathura rice 2024-11-06 13:52:53 +01:00
Lennart J. Kurzweg (Nx2)
096f31d81a all nixd paths 2024-11-06 13:52:43 +01:00
Lennart J. Kurzweg (Nx2)
148bd4c481 accent is the always visible border 2024-11-06 13:42:44 +01:00
Lennart J. Kurzweg (Nx2)
f9d4921726 userChrome mynixos.com 2024-11-06 13:42:04 +01:00
Lennart J. Kurzweg (Nx2)
169d6eda11 ~/shared ownwership fix 2024-10-30 00:55:44 +01:00
Lennart J. Kurzweg (Nx2)
97f33c7b8d diffrent rice 2024-10-30 00:55:16 +01:00
Lennart J. Kurzweg (Nx2)
340c514a99 more fuse (still sucks) 2024-10-28 16:10:02 +01:00
Lennart J. Kurzweg (Nx2)
b3d3c983c2 nixd spelling 2024-10-28 13:43:22 +01:00
Lennart J. Kurzweg (Nx2)
3a30fc2131 Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles 2024-10-25 02:12:55 +02:00
Lennart J. Kurzweg (Nx2)
abd5b60ffa nixd 2024-10-25 02:12:52 +02:00
Lennart J. Kurzweg (Nx2)
e3e52fb656 themed Zathura 2024-10-24 13:02:22 +02:00
Lennart J. Kurzweg (Nx2)
115a6d3c83 fcitx not working wip 2024-10-23 12:58:02 +02:00
Lennart J. Kurzweg (Nx2)
14df46a631 flake bump 2024-10-23 00:16:39 +02:00
Lennart J. Kurzweg (Nx2)
0c92fcd686 lzg theeme 2024-10-23 00:16:28 +02:00
Lennart J. Kurzweg (Nx2)
085d593ce1 new ssh 2024-10-22 23:00:30 +02:00
Lennart J. Kurzweg (Nx2)
fb082f76ed new sync version vesktop 2024-10-22 23:00:18 +02:00
Lennart J. Kurzweg (Nx2)
89ed2c0748 gs 2024-10-22 22:59:43 +02:00
Lennart J. Kurzweg (Nx2)
a32d8ad3ce better curk 2024-10-22 22:59:31 +02:00
Lennart J. Kurzweg (Nx2)
d93ae4a78b tuda eduroam 2024-10-17 17:18:07 +02:00
Lennart J. Kurzweg (Nx2)
8f3b04c191 spotify grey screen fix 2024-10-17 17:17:51 +02:00
Lennart J. Kurzweg (Nx2)
8b96d1205b flake bump 2024-10-17 14:39:25 +02:00
Lennart J. Kurzweg (Nx2)
dbeb5524a0 note for ff transparency 2024-10-17 14:39:12 +02:00
Lennart J. Kurzweg (Nx2)
2b873c8b81 no networking.wireless with nm 2024-10-12 19:50:25 +02:00
Lennart J. Kurzweg (Nx2)
2fcdf32944 no open ports from docker module 2024-10-09 23:38:03 +02:00
Lennart J. Kurzweg (Nx2)
24bb3136cf reflex and better latex in hx 2024-10-09 23:36:33 +02:00
Lennart J. Kurzweg (Nx2)
f32d77f7ff rice change 2024-10-09 23:35:49 +02:00
Lennart J. Kurzweg (Nx2)
c6f7d73f89 tuda eduroam (untested) 2024-10-09 23:35:20 +02:00
Lennart J. Kurzweg (Nx2)
1e3112b590 tuda email 2024-10-09 23:35:03 +02:00
Lennart J. Kurzweg (Nx2)
7639bed3fe tts 2024-10-09 23:32:39 +02:00
Lennart J. Kurzweg (Nx2)
d46530edd8 flake bump 2024-09-27 22:45:14 +02:00
Lennart J. Kurzweg (Nx2)
5ed4edc375 more rice 2024-09-27 21:42:51 +02:00
Lennart J. Kurzweg (Nx2)
f422551ac3 yazi only with hotkey 2024-09-27 21:42:29 +02:00
Lennart J. Kurzweg (Nx2)
5a40c8e1f9 flake bump 2024-09-26 02:55:30 +02:00
Lennart J. Kurzweg (Nx2)
b6d1b38ad9 html rice preview 2024-09-26 02:55:16 +02:00
Lennart J. Kurzweg (Nx2)
f5016976ab yazi themed (unfinished) 2024-09-26 02:54:24 +02:00
Lennart J. Kurzweg (Nx2)
059abbf549 yazi on terminal start 2024-09-26 02:54:01 +02:00
Lennart J. Kurzweg (Nx2)
dfaf24c9e1 yellow is yellow 2024-09-26 02:53:28 +02:00
Lennart J. Kurzweg (Nx2)
a1d34a70c8 no gtk2 backup in repository 2024-09-26 02:53:18 +02:00
Lennart J. Kurzweg (Nx2)
ea61c7e30d flake bump 2024-09-18 20:17:28 +02:00
Lennart J. Kurzweg (Nx2)
4ab26fbc08 new chatterino token 2024-09-18 20:15:10 +02:00
Lennart J. Kurzweg (Nx2)
6ab9da1b0c better ff css 2024-09-18 20:14:55 +02:00
Lennart J. Kurzweg (Nx2)
7ed29be1e6 thunderbird css 2024-09-18 20:14:42 +02:00
Lennart J. Kurzweg (Nx2)
e076123fa7 nh home switch for colors 2024-09-10 14:43:51 +02:00
Lennart J. Kurzweg (Nx2)
9d9d36dda8 Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-09-09 16:29:11 +02:00
Lennart J. Kurzweg (Nx2)
c6d0205f8b flake bump 2024-09-09 16:29:07 +02:00
Lennart J. Kurzweg (Nx2)
96828bacd0 color++ 2024-09-09 16:28:17 +02:00
Lennart J. Kurzweg (Nx2)
c16d439731 firefox userChrome unfinished 2024-09-09 16:27:24 +02:00
Lennart J. Kurzweg (Nx2)
c8e0c2c832 +asmon 2024-09-09 16:26:02 +02:00
Lennart J. Kurzweg (Nx2)
19e7f2dd3a Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-09-09 16:18:48 +02:00
Lennart J. Kurzweg (Nx2)
cfb112429d temp fixed for xps 2024-09-09 16:15:36 +02:00
Lennart J. Kurzweg (Nx2)
c0ff63e427 MIT 2024-09-04 18:15:43 +02:00
Lennart J. Kurzweg (Nx2)
b7bf1f1bd7 embed img 2024-09-04 17:58:08 +02:00
Lennart J. Kurzweg (Nx2)
9ad191f37c Add README 2024-09-04 17:57:18 +02:00
Lennart J. Kurzweg (Nx2)
c61e6c9980 whoops, i need git-crypt 2024-09-04 17:20:09 +02:00
Lennart J. Kurzweg (Nx2)
d626a5bd7d Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-09-04 17:17:16 +02:00
Lennart J. Kurzweg (Nx2)
5eda39414a flake.lock update 2024-09-04 17:12:59 +02:00
Lennart J. Kurzweg (Nx2)
cbe9371e66 better hotkeys 2024-09-04 17:12:41 +02:00
Lennart J. Kurzweg (Nx2)
a10b22b9e3 better fish aliases 2024-09-04 17:12:20 +02:00
Lennart J. Kurzweg (Nx2)
fd3ca3a1d3 fctix autostart + exec-once cleanup 2024-09-04 17:11:25 +02:00
Lennart J. Kurzweg (Nx2)
f2589a350d shared owned by nx2 2024-09-04 17:10:46 +02:00
Lennart J. Kurzweg (Nx2)
f24b4ae320 zen-browser through flake 2024-09-04 17:10:15 +02:00
Lennart J. Kurzweg (Nx2)
689ef45935 ooo 2024-09-04 17:08:09 +02:00
Lennart J. Kurzweg (Nx2)
2492c5bd80 vesktop signin fix 2024-09-04 17:00:36 +02:00
Lennart J. Kurzweg (Nx2)
c9c6423bb3 fcitx5 + katana 2024-09-04 17:00:12 +02:00
Lennart J. Kurzweg (Nx2)
d7cc5f77d7 colors from wallpapers 2024-09-04 16:59:05 +02:00
Lennart J. Kurzweg (Nx2)
3cfcbc1e2a Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-08-28 14:36:15 +02:00
Lennart J. Kurzweg (Nx2)
69e2bed0ce qmk+qmk 2024-08-28 14:34:34 +02:00
Lennart J. Kurzweg (Nx2)
13264dfa24 vektop stable 2024-08-28 14:33:10 +02:00
Lennart J. Kurzweg (Nx2)
c1f24f2dc2 c 2024-08-28 14:32:51 +02:00
Lennart J. Kurzweg (Nx2)
20f8ea51c6 screen 2024-08-26 23:24:57 +02:00
Lennart J. Kurzweg (Nx2)
52d81b9175 ip range fix 2024-08-26 23:24:45 +02:00
Lennart J. Kurzweg (Nx2)
befa7fe91e Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-08-26 21:38:01 +02:00
Lennart J. Kurzweg (Nx2)
4eead91953 syncthing+nx2site(trying) 2024-08-26 21:37:36 +02:00
Lennart J. Kurzweg (Nx2)
ce84d681e0 ++++++ 2024-08-26 21:25:51 +02:00
Lennart J. Kurzweg (Nx2)
5d1d2c49e5 Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-07-28 17:19:29 +02:00
Lennart J. Kurzweg (Nx2)
73b0e338fc nx2site save (unused) 2024-07-28 17:19:25 +02:00
Lennart J. Kurzweg (Nx2)
4b42af4523 merge north master 2024-07-23 17:45:11 +02:00
Lennart J. Kurzweg (Nx2)
1e0af7a61b flake restructure 2024-07-23 17:35:57 +02:00
Lennart J. Kurzweg (Nx2)
ad784f41f9 new ollama 2024-07-23 14:08:49 +02:00
Lennart J. Kurzweg (Nx2)
ad885f7675 nvidia 555 2024-07-23 14:08:38 +02:00
Lennart J. Kurzweg (Nx2)
97ef1500ab switch to zen for north 2024-07-23 14:08:25 +02:00
Lennart J. Kurzweg (Nx2)
d29a12094a chtterino new token 2024-07-23 14:08:05 +02:00
Lennart J. Kurzweg (Nx2)
dffd47fa94 changes saved (doesnt built) 2024-07-20 21:23:47 +02:00
Lennart J. Kurzweg (Nx2)
70b3d92fb1 update_namecheap in python 2024-07-14 02:14:19 +02:00
Lennart J. Kurzweg (Nx2)
93bcb23085 kodi on ice 2024-07-14 02:13:32 +02:00
Lennart J. Kurzweg (Nx2)
bb60da2409 nvidia user conf only on nvidia systems 2024-07-14 02:12:37 +02:00
Lennart J. Kurzweg (Nx2)
6b33a71dd3 Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-07-11 15:18:13 +02:00
Lennart J. Kurzweg (Nx2)
63e68509e3 . 2024-07-11 15:17:39 +02:00
Lennart J. Kurzweg (Nx2)
152a42db08 qmk 2024-07-11 15:17:30 +02:00
Lennart J. Kurzweg (Nx2)
71fba2ade8 Vcam 2024-07-11 15:17:20 +02:00
Lennart J. Kurzweg (Nx2)
4ad5da9956 nvidia better 2024-07-11 15:17:06 +02:00
Lennart J. Kurzweg (Nx2)
2fc38d5ee7 weechat 2024-07-11 15:16:19 +02:00
Lennart J. Kurzweg (Nx2)
03d3741aed deprecation fixups 2024-07-07 23:00:19 +02:00
Lennart J. Kurzweg (Nx2)
813a3fd019 boot with windows entry 2024-07-07 22:47:49 +02:00
Lennart J. Kurzweg (Nx2)
c9f988e4e4 swww update 2024-07-07 22:47:28 +02:00
Lennart J. Kurzweg (Nx2)
ec0325a8b0 python debugging (not in helix) 2024-07-07 22:47:20 +02:00
Lennart J. Kurzweg (Nx2)
3205ca267b created assets dir with unused gtk2 2024-07-07 22:46:46 +02:00
Lennart J. Kurzweg (Nx2)
84a92a304a xournal + matrix 2024-07-03 15:44:09 +02:00
Lennart J. Kurzweg (Nx2)
a7ffa9425a flake bump 2024-07-02 22:54:29 +02:00
Lennart J. Kurzweg (Nx2)
b3f33edf19 Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-07-02 19:04:51 +02:00
Lennart J. Kurzweg (Nx2)
295277ad00 gc 2024-07-02 19:04:48 +02:00
Lennart J. Kurzweg (Nx2)
7356853a1d dm fix 2024-07-02 19:03:23 +02:00
Lennart J. Kurzweg (Nx2)
a20d64e278 gestures 2024-07-02 19:00:41 +02:00
Lennart J. Kurzweg (Nx2)
ae997e92aa hsmw smtp fix 2024-07-01 14:38:04 +02:00
Lennart J. Kurzweg (Nx2)
8394da19df helix spellcheck with ltex 2024-07-01 01:01:53 +02:00
Lennart J. Kurzweg (Nx2)
bf3ac16c62 better scripts fix 2024-06-29 23:18:46 +02:00
Lennart J. Kurzweg (Nx2)
981d72cdb7 Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-06-29 21:59:40 +02:00
Lennart J. Kurzweg (Nx2)
f6afb7d9e6 lock 2024-06-29 21:59:38 +02:00
Lennart J. Kurzweg (Nx2)
cc9dd87111 hyprspace 2024-06-29 21:59:17 +02:00
Lennart J. Kurzweg (Nx2)
c4e7371e22 sleeker waybar 2024-06-29 21:59:01 +02:00
Lennart J. Kurzweg (Nx2)
58e6dc97f4 vale 2024-06-29 21:58:46 +02:00
Lennart J. Kurzweg (Nx2)
9cb5a17bc1 notifiaction TR again 2024-06-29 21:58:18 +02:00
Lennart J. Kurzweg (Nx2)
e07e98120a latex lsp 2024-06-29 21:57:55 +02:00
Lennart J. Kurzweg (Nx2)
6b9190b8e1 hyprcursor package 2024-06-29 21:57:11 +02:00
Lennart J. Kurzweg (Nx2)
368f3a25fd spellcheck (not working) 2024-06-29 21:55:26 +02:00
Lennart J. Kurzweg (Nx2)
708efdefb8 c 2024-06-29 21:54:02 +02:00
Lennart J. Kurzweg (Nx2)
a791568530 bibata cursor 2024-06-29 21:53:49 +02:00
Lennart J. Kurzweg (Nx2)
4a003baae2 Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-06-27 12:48:08 +02:00
Lennart J. Kurzweg (Nx2)
a5b4fe2c3f more terminal browsers 2024-06-27 12:48:04 +02:00
Lennart J. Kurzweg (Nx2)
8280a0d245 gleam fix 2024-06-27 12:47:53 +02:00
Lennart J. Kurzweg (Nx2)
086f52da79 gpg cache (working?) 2024-06-27 12:44:47 +02:00
Lennart J. Kurzweg (Nx2)
a0911caacf better scripts 2024-06-27 12:34:49 +02:00
Lennart J. Kurzweg (Nx2)
7f01722448 Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles 2024-06-25 15:12:08 +02:00
Lennart J. Kurzweg (Nx2)
6914a99658 timer fix? 2024-06-25 15:11:07 +02:00
91 changed files with 4343 additions and 3323 deletions

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Lennart J. Kurzweg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

46
README.md Normal file
View File

@@ -0,0 +1,46 @@
# ❄️ NixOS Dotfiles
![Screenshot of my desktop](splash.png)
## Information
- Using stable + unstable via flakes
- Multi-host config (Desktop, Laptop, Server)
- Using home-manager for home-configuration
- Using sops-nix with GPG + git-crypt for secrets
## Features:
- The WM Hyperland extended to more or less full a DE with
- automounting
- notifications
- a bar
- gesture control
- runner
- ...
- Virtualization support
- docker
- virt-manager
- Multilingual typing with Fcitx5
- Fully functioning Nvidia/Nvidia Prime support
- Fully customized editor `helix`
- Locally running LLM-server with tools written around it
- Fully themed ("riced") via a custom, intentionally semi-automatic, adaptive system responding to wallpaper color
- as can be seen in `flake-modules/rice.nix`
- Next-Gen shell experience with
- fish
- starship
- zoxide
- yazi
- direnv
- lazygit + lazydocker
## Thanks to
- [LibrePhoenix](https://www.youtube.com/@librephoenix) for getting me started
- [VimJoyer](https://www.youtube.com/@vimjoyer) for making quick NixOS tutorials on many topics
- Everyone that talks about NixOS in NixOS-forums and rooms instead of politics
- [Everyone that put up their code on Github](https://github.com/search?type=code&auto_enroll=true&q=language%3Anix) for me to reference
## Licensing
- The code found in this Repository is Licensed under the MIT-license
- I've decided against the GPLv3, since I am not going to sue anyone over this, but
- I encourage everyone to open source their work for anyone to at least reference

View File

@@ -1,7 +1,9 @@
{ pkgs, pkgs-unstable, inputs, ... }:
{ pkgs, inputs, lib, host, ... }:
{
imports = [
imports = ([
inputs.sops-nix.nixosModules.sops
./system-modules/adb.nix
./system-modules/auto-mount.nix
./system-modules/hardware-configuration.nix
./system-modules/fuse.nix
./system-modules/nvidia.nix
@@ -9,23 +11,39 @@
./system-modules/sound.nix
./system-modules/fonts.nix
./system-modules/boot.nix
./system-modules/gc.nix
./system-modules/boot.nix
./system-modules/dm.nix
./system-modules/networking.nix
./system-modules/virtualisation.nix
./system-modules/sshd.nix
./system-modules/gpg.nix
./system-modules/sops.nix
./system-modules/syncthing.nix
# ./system-modules/hsmw.nix # old
./system-modules/docker.nix
./system-modules/fcitx5.nix
./system-modules/fonts.nix
./system-modules/fuse.nix
./system-modules/gc.nix
./system-modules/gpg.nix
./system-modules/hardware-configuration.nix
./system-modules/health_reminder.nix
./system-modules/ollama.nix
./system-modules/nx2site.nix
./system-modules/hsmw.nix
./system-modules/kanata.nix
./system-modules/kodi.nix
];
./system-modules/networking.nix
./system-modules/nixd.nix
./system-modules/nvidia.nix
./system-modules/ollama.nix
./system-modules/qmk.nix
./system-modules/sops.nix
./system-modules/sound.nix
./system-modules/sshd.nix
./system-modules/syncthing.nix
./system-modules/users.nix
./system-modules/virtualisation.nix
./system-modules/ydotool.nix
]) ++ (if (host == "NxACE") then [
./system-modules/nx2site.nix
./system-modules/postgres.nix
./system-modules/nx2site/proxy.nix
# ./system-modules/nx2site/gitea.nix
# ./system-modules/nx2site/vaultwarden.nix
] else []);
# Set your time zone.
time.timeZone = "Europe/Berlin";
@@ -50,39 +68,39 @@
security.rtkit.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
services.libinput.enable = true;
hardware.uinput.enable = true;
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; #
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
package = pkgs.bluez5-experimental;
settings.Policy.AutoEnable = "true";
settings.General.Enable = "Source,Sink,Media,Socket";
};
services.blueman.enable = true;
nixpkgs.config.allowUnfree = true;
# nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) allowed.unfree-packages;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; ([
git
lazygit # home-manager module is bugged
git-crypt
lazygit # home-manager module is bugged
wget
curl
curlHTTP3
zip
unzip
p7zip
unar
nano
micro
htop
direnv
openssl
blueman
dmidecode
file
] ++ (with pkgs-unstable; [
sendme
# ]) ++ (with pkgs-unstable; [
# # sendme
]);
environment.variables = {
@@ -99,8 +117,9 @@
system.stateVersion = "24.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
programs.bash.shellInit = ''
source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh

43
flake-modules/allowed.nix Normal file
View File

@@ -0,0 +1,43 @@
{
unfree = [
"discord"
"spotify"
"obsidian"
"zoom-us"
"zoom"
# since the predicate ist to be set in the flake and not in a module
# it is impossible to make the list dynamic and respect nvidia.enable
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
"cudatoolkit"
"cuda-merged"
"cuda_cuobjdump"
"cuda_gdb"
"cuda_nvcc"
"cuda_nvdisasm"
"cuda_nvprune"
"cuda_cccl"
"cuda_cudart"
"cuda_cupti"
"cuda_cuxxfilt"
"cuda_nvml_dev"
"cuda_nvrtc"
"cuda_nvtx"
"cuda_profiler_api"
"cuda_sanitizer_api"
"libcublas"
"libcufft"
"libcurand"
"libcusolver"
"libnvjitlink"
"libcusparse"
"libnpp"
];
inecure = [
# "electron-25.9.0"
];
}

13
flake-modules/colors.json Normal file
View File

@@ -0,0 +1,13 @@
{
"base": {
"foreground": "#eedce2",
"background": "#221016"
},
"to_alter": {
"accent": "#ac5271",
"secondary": "#f20c5b",
"tertiary": "#d5a287",
"special": "#51ac8d",
"weird": "#0cf2a3"
}
}

4
flake-modules/nvidia.nix Normal file
View File

@@ -0,0 +1,4 @@
{
enable = false;
prime = false;
}

63
flake-modules/rice.nix Normal file
View File

@@ -0,0 +1,63 @@
pkgs: rec {
lib = import ../nxlib/ricelib.nix pkgs.lib;
transparency = 0.8;
rounding = 3;
gap-size = 5;
border-width = 2;
color =
let
dark = (-0.5);
bright = (0.5);
alter-set = let f = lib.alter-luminace-hex; in color-name: color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
alter = let f = lib.alter-luminace-hex; in color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
# ccolor = builtins.mapAttrs alter-set (builtins.fromJSON (builtins.readFile ./colors.json));
ccolor = builtins.mapAttrs alter-set {
black = "#111111"; # "#111111" "#001100";
white = "#dddddd"; # "#dddddd" "#66dd66";
blue = "#4444dd"; # "#3333dd" "#003300";
cyan = "#44dddd"; # "#11dddd" "#00dd55";
green = "#44dd44"; # "#11dd11" "#11dd11";
magenta = "#dd44dd"; # "#dd11dd" "#005500";
red = "#dd4444"; # "#dd1111" "#00aa00";
yellow = "#dddd44"; # "#dddd11" "#ffff00";
};
facolor = builtins.mapAttrs alter-set (builtins.fromJSON (builtins.readFile ./colors.json)).to_alter;
fbcolor = (builtins.fromJSON (builtins.readFile ./colors.json)).base;
fcolor = facolor // fbcolor;
xcolor = with ccolor; with fcolor; rec {
background = "#000000";
# foreground = "#dddddd";
# accent = blue;
# secondary = cyan;
# tertiary = magenta;
# special = yellow;
# weird = green;
positive = alter "#00dd00";
negative = alter "#dd0000";
border = accent.base;
border2 = secondary.base;
};
in ccolor // fcolor // xcolor;
font = {
code = {
name = "JetBrainsMono-NF";
name2 = "JetBrainsMono Nerd Font";
package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
# name = "CascadiaCove-NF";
# package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; });
};
base = {
# name = "NewComputerModern08";
# package = pkgs.newcomputermodern;
name = "Atkinson Hyperlegible";
package = pkgs.atkinson-hyperlegible;
};
};
cursor = {
name = "Bibata-Original-Classic";
package = pkgs.bibata-cursors;
size = 24;
};
}

520
flake.lock generated
View File

@@ -1,5 +1,59 @@
{
"nodes": {
"Hyprspace": {
"inputs": {
"hyprland": [
"hyprland"
],
"systems": "systems"
},
"locked": {
"lastModified": 1728710667,
"narHash": "sha256-9HR9EePhzweUAUPUccByNYxKQzfFAnxfu2BXTLqOLZQ=",
"owner": "KZDKM",
"repo": "Hyprspace",
"rev": "e8406a7708bceb3b5bedf56b67490dbe3d27e6f8",
"type": "github"
},
"original": {
"owner": "KZDKM",
"repo": "Hyprspace",
"type": "github"
}
},
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1728902391,
"narHash": "sha256-44bnoY0nAvbBQ/lVjmn511yL39Sv7SknV0BDxn34P3Q=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "9874e08eec85b5542ca22494e127b0cdce46b786",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"crane": {
"inputs": {
"flake-compat": [
@@ -33,30 +87,23 @@
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"flake-compat": {
"flake": false,
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1718337800,
"narHash": "sha256-Azz2lg6WsfT4SDMTA3DtJ6hS7kox3e0buSrV4J+zMAQ=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "aaf15fa3ed60109af8aad4cbb19c1fe28b4476ad",
"type": "gitlab"
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat": {
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@@ -73,6 +120,24 @@
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"lanzaboote",
@@ -94,23 +159,8 @@
}
},
"flake-utils": {
"locked": {
"lastModified": 1629284811,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1681202837,
@@ -126,7 +176,47 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"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"
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"lanzaboote",
@@ -155,11 +245,11 @@
]
},
"locked": {
"lastModified": 1717527182,
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=",
"lastModified": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "845a5c4c073f74105022533907703441e0464bc3",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github"
},
"original": {
@@ -185,11 +275,11 @@
]
},
"locked": {
"lastModified": 1717181720,
"narHash": "sha256-yv+QZWsusu/NWjydkxixHC2g+tIJ9v+xkE2EiVpJj6g=",
"lastModified": 1728669738,
"narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "9e27a2c2ceb1e0b85bd55b0afefad196056fe87c",
"rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
"type": "github"
},
"original": {
@@ -200,20 +290,23 @@
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"systems": "systems",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_2",
"xdph": "xdph"
},
"locked": {
"lastModified": 1718365532,
"narHash": "sha256-2wd1ytcpvnBlhTxP1O/G4PJSY3fKuTxQLDxp+kFP4Sg=",
"lastModified": 1729629261,
"narHash": "sha256-IJtor2qFpsZkCm4UMnCHOSosW9GXKZVOm7DILtJJgoM=",
"ref": "refs/heads/main",
"rev": "a9d53a2252f7ec084e2487d18777e2df01c8c351",
"revCount": 4825,
"rev": "29997ef4ba8ef0a80390e80199998d1390177454",
"revCount": 5366,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@@ -241,11 +334,11 @@
]
},
"locked": {
"lastModified": 1718111105,
"narHash": "sha256-sLGohaz+8pCce4+wehXSlwOu7c7+We4Zc1ToXGCJYfs=",
"lastModified": 1729596320,
"narHash": "sha256-sBPr6O2Ad916f+L7biAjmJVx4TLDITC4joKgeOT47V8=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "151102b7d7c4f61ff42f275e72008d28318dac96",
"rev": "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219",
"type": "github"
},
"original": {
@@ -258,21 +351,19 @@
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
"locked": {
"lastModified": 1691753796,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
"lastModified": 1728345020,
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
"rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github"
},
"original": {
@@ -297,11 +388,11 @@
]
},
"locked": {
"lastModified": 1717881852,
"narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=",
"lastModified": 1728168612,
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "ec6938c66253429192274d612912649a0cfe4d28",
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github"
},
"original": {
@@ -310,6 +401,26 @@
"type": "github"
}
},
"hyprswitch": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1725107917,
"narHash": "sha256-6on3nwb3gB4t+P/2IExgGhVLVgAkF6ZiE5x+qcQHEXU=",
"owner": "h3rmt",
"repo": "hyprswitch",
"rev": "f478c394ad6db5ba268f80052f1eb2366366b21e",
"type": "github"
},
"original": {
"owner": "h3rmt",
"ref": "release",
"repo": "hyprswitch",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
@@ -322,11 +433,11 @@
]
},
"locked": {
"lastModified": 1717881334,
"narHash": "sha256-a0inRgJhPL6v9v7RPM/rx1kbXdfe3xJA1c9z0ZkYnh4=",
"lastModified": 1728941256,
"narHash": "sha256-WRypmcZ2Bw94lLmcmxYokVOHPJSZ7T06V49QZ4tkZeQ=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "0693f9398ab693d89c9a0aa3b3d062dd61b7a60e",
"rev": "fd4be8b9ca932f7384e454bcd923c5451ef2aa85",
"type": "github"
},
"original": {
@@ -347,11 +458,11 @@
]
},
"locked": {
"lastModified": 1717784906,
"narHash": "sha256-YxmfxHfWed1fosaa7fC1u7XoKp1anEZU+7Lh/ojRKoM=",
"lastModified": 1726874836,
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "0f30f9eca6e404130988554accbb64d1c9ec877d",
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github"
},
"original": {
@@ -363,10 +474,10 @@
"lanzaboote": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3",
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay"
},
@@ -387,11 +498,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1717974879,
"narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=",
"lastModified": 1728888510,
"narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3",
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
"type": "github"
},
"original": {
@@ -401,7 +512,51 @@
"type": "github"
}
},
"nixpkgs-latest": {
"locked": {
"lastModified": 1729631290,
"narHash": "sha256-zVL79jvDihxcnq9FKkAoILYWxGmxCw1DGdBnpv/B+3s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1f9d2cf67508efd9b5e81cdf7af556bbbfe02377",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1727825735,
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1720386169,
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
@@ -417,29 +572,29 @@
"type": "github"
}
},
"nixpkgs-stable_2": {
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1717880976,
"narHash": "sha256-BRvSCsKtDUr83NEtbGfHLUOdDK0Cgbezj2PtcHnz+sQ=",
"lastModified": 1729357638,
"narHash": "sha256-66RHecx+zohbZwJVEPF7uuwHeqf8rykZTMCTqIrOew4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4913a7c3d8b8d00cb9476a6bd730ff57777f740c",
"rev": "bb8c2cf7ea0dd2e18a52746b2c3a5b0c73b93c22",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.11",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1718160348,
"narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=",
"lastModified": 1729413321,
"narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "57d6973abba7ea108bac64ae7629e7431e0199b6",
"rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26",
"type": "github"
},
"original": {
@@ -449,6 +604,21 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1711588226,
"narHash": "sha256-nd7goEu+nH/WZ/uCxvbWzSYqzZZn25kWTeKfANOhCjU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7232f19f7fb710e3554cafaa9d8e93cff8273b59",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1682741954,
"narHash": "sha256-RPZxzRu8XU0YD2WeYUFYzJy5yAvWUsxkuK+zWw+6WVk=",
@@ -464,13 +634,13 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1718208800,
"narHash": "sha256-US1tAChvPxT52RV8GksWZS415tTS7PV42KTc2PNDBmc=",
"lastModified": 1729449015,
"narHash": "sha256-Gf04dXB0n4q0A9G5nTGH3zuMGr6jtJppqdeljxua1fo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cc54fb41d13736e92229c21627ea4f22199fee6b",
"rev": "89172919243df199fe237ba0f776c3e3e3d72367",
"type": "github"
},
"original": {
@@ -479,6 +649,62 @@
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1729265718,
"narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1728778939,
"narHash": "sha256-WybK5E3hpGxtCYtBwpRj1E9JoiVxe+8kX83snTNaFHE=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "ff68f91754be6f3427e4986d7949e6273659be1d",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
@@ -489,12 +715,12 @@
"lanzaboote",
"flake-utils"
],
"gitignore": "gitignore",
"gitignore": "gitignore_2",
"nixpkgs": [
"lanzaboote",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1681413034,
@@ -512,14 +738,18 @@
},
"root": {
"inputs": {
"firefox-addons": "firefox-addons",
"Hyprspace": "Hyprspace",
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
"hyprswitch": "hyprswitch",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"nixpkgs-latest": "nixpkgs-latest",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"
"sops-nix": "sops-nix",
"yazi": "yazi",
"zen-browser": "zen-browser"
}
},
"rust-overlay": {
@@ -547,19 +777,40 @@
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"yazi",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729391507,
"narHash": "sha256-as0I9xieJUHf7kiK2a9znDsVZQTFWhM1pLivII43Gi0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "784981a9feeba406de38c1c9a3decf966d853cca",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
"lastModified": 1718137936,
"narHash": "sha256-psA+1Q5fPaK6yI3vzlLINNtb6EeXj111zQWnZYyJS9c=",
"lastModified": 1729587807,
"narHash": "sha256-YOc4033a/j1TbdLfkaSOSX2SrvlmuM+enIFoveNTCz4=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "c279dec105dd53df13a5e57525da97905cc0f0d6",
"rev": "26642e8f193f547e72d38cd4c0c4e45b49236d27",
"type": "github"
},
"original": {
@@ -584,6 +835,36 @@
}
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -600,11 +881,22 @@
},
"xdph": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
@@ -615,11 +907,11 @@
]
},
"locked": {
"lastModified": 1717918856,
"narHash": "sha256-I38bmPLqamvOfVSArd1hhZtkVRAYBK38fOHZCU1P9Qg=",
"lastModified": 1728166987,
"narHash": "sha256-w6dVTguAn9zJ+7aPOhBQgDz8bn6YZ7b56cY8Kg5HJRI=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "72907822c19afc0983c69d59d299204381623725",
"rev": "fb9c8d665af0588bb087f97d0f673ddf0d501787",
"type": "github"
},
"original": {
@@ -627,6 +919,44 @@
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"yazi": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1729473414,
"narHash": "sha256-ffiEVFCUMnShcSa4hvCbT1EQeu7c2lVOk6OdaxjiUmU=",
"owner": "sxyazi",
"repo": "yazi",
"rev": "0e118b5b3a5baacf7fe62971e2bfe2b0ad972bab",
"type": "github"
},
"original": {
"owner": "sxyazi",
"repo": "yazi",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1727721329,
"narHash": "sha256-QYlWZwUSwrM7BuO+dXclZIwoPvBIuJr6GpFKv9XKFPI=",
"owner": "MarceColl",
"repo": "zen-browser-flake",
"rev": "e6ab73f405e9a2896cce5956c549a9cc359e5fcc",
"type": "github"
},
"original": {
"owner": "MarceColl",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",

233
flake.nix
View File

@@ -2,211 +2,70 @@
description = "Multisystem NixOS Flake of Lennart J. Kurzweg";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
nixpkgs = { url = "nixpkgs/nixos-24.05"; };
nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; };
home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; };
hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; };
hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; };
hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
# firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; };
yazi.url = "github:sxyazi/yazi";
zen-browser.url = "github:MarceColl/zen-browser-flake";
};
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# url = "github:hyprwm/Hyprland";
# inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
# Hyprspace = {
# url = "github:KZDKM/Hyprspace";
# inputs.hyprland.follows = "hyprland";
# };
# nixvim = {
# url = "github:nix-community/nixvim/nixos-23.11";
# inputs.nixpkgs.follows = "nixpkgs";
# };
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.3.0";
# inputs.nixpkgs.follows = "nixpkgs-unstable";
};
#arion = {
# url = "github:hercules-ci/arion";
# inputs.nixpkgs.follows = "nixpkgs";
#};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
# yazi.url = "github:sxyazi/yazi";
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
let
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
user = "nx2";
domain = "nx2.site";
nvidia = {
enable = true;
prime = true;
# unfree = if enable then [
unfree = [
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
"cudatoolkit"
"cudatoolkit-11.8.0"
"cudatoolkit-12.2.2"
];
# ] else [];
};
allowed = {
unfree-packages = [
"spotify"
"cudatoolkit-12.2.2"
"discord"
"obsidian"
"zoom-us"
"zoom"
] ++ nvidia.unfree;
config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
inecure-packages = [
"electron-25.9.0"
];
};
pkgs = import nixpkgs { inherit system config; };
pkgs-unstable = import nixpkgs-unstable { inherit system config; };
pkgs-latest = import nixpkgs-latest { inherit system config; };
nvidia-set = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix;
rice = rec {
lib = import ./nxlib/ricelib.nix { lib = nixpkgs.lib; };
transparency = 0.8;
rounding = 10;
gap-size = 10;
border-width = 3;
color =
let
dark = (-0.3);
bright = (0.5);
alter-set = let f = rice.lib.alter-luminace-hex; in color-name: color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
alter = let f = rice.lib.alter-luminace-hex; in color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
ccolor = builtins.mapAttrs alter-set {
black = "#000022"; # "#111111" "#001100";
white = "#ddddff"; # "#dddddd" "#66dd66";
blue = "#4422ff"; # "#3333dd" "#003300";
cyan = "#11dddd"; # "#11dddd" "#00dd55";
green = "#11dd99"; # "#11dd11" "#11dd11";
magenta = "#6622dd"; # "#dd11dd" "#005500";
red = "#dd1166"; # "#dd1111" "#00aa00";
yellow = "#dd6611"; # "#dddd11" "#ffff00";
};
xcolor = with ccolor; rec {
background = black.dark;
foreground = white.base;
border = cyan.base;
border2 = blue.base;
accent = blue;
secondary = cyan;
tertiary = magenta;
special = yellow;
weird = green;
positive = alter "#00dd00";
negative = alter "#dd0000";
};
# ccolor = builtins.mapAttrs alter-set {
# black = "#112200";
# white = "#ddffdd";
# blue = "#779944";
# cyan = "#11ffcc";
# green = "#00ff00";
# magenta = "#449999";
# red = "#dd2200";
# yellow = "#ffff11";
# };
# xcolor = with ccolor; rec {
# background = black.dark; # black.dark;
# foreground = white.base; # white.base;
# border = accent.base; # cyan.base;
# border2 = yellow.base; # blue.base;
# accent = green; # blue;
# secondary = red; # cyan;
# tertiary = yellow; # magenta;
# special = blue; # yellow;
# weird = magenta; # green;
# positive = alter "#00dd00"; # alter "#00dd00";
# negative = alter "#dd0000"; # alter "#dd0000";
# };
in ccolor // xcolor;
font = {
code = {
name = "JetBrainsMono-NF";
name2 = "JetBrainsMono Nerd Font";
package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
# name = "CascadiaCove-NF";
# package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; });
};
base = {
# name = "NewComputerModern08";
# package = pkgs.newcomputermodern;
name = "Atkinson Hyperlegible";
package = pkgs.atkinson-hyperlegible;
};
};
};
in
{
nixosConfigurations = {
NxXPS = let host = "NxXPS"; in nixpkgs.lib.nixosSystem {
rice = import ./flake-modules/rice.nix pkgs;
in {
nixosConfigurations = let
make-nixos-system = host: nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs user host pkgs-unstable allowed secrets rice nvidia; };
specialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
NxNORTH = let host = "NxNORTH"; in nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs user host pkgs-unstable allowed secrets rice nvidia; };
};
NxACE = let host = "NxACE"; nvidia.enable = false; in nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs user host pkgs-unstable allowed secrets rice nvidia; };
in { inherit inputs user host domain pkgs-unstable pkgs-latest secrets rice nvidia; };
};
in {
NxXPS = make-nixos-system "NxXPS";
NxNORTH = make-nixos-system "NxNORTH";
NxACE = make-nixos-system "NxACE";
};
homeConfigurations = {
"${user}@NxXPS" = let host = "NxXPS"; in home-manager.lib.homeManagerConfiguration {
homeConfigurations = let
make-home-configuration = host: user: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
extraSpecialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
"${user}@NxNORTH" = let host = "NxNORTH"; in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
};
"${user}@NxACE" = let host = "NxACE"; nvidia.enable = false; in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
};
"tv@NxACE" =
let
host = "NxACE";
user = "tv";
nvidia.enable = pkgs.kib.mkForce false;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
in { inherit inputs system user host domain pkgs-unstable pkgs-latest rice secrets nvidia; };
};
in {
"${user}@NxXPS" = make-home-configuration "NxXPS" user;
"${user}@NxNORTH" = make-home-configuration "NxNORTH" user;
"${user}@NxACE" = make-home-configuration "NxACE" user;
};
};
}

Binary file not shown.

View File

@@ -0,0 +1,7 @@
{ ... }:
{
services.udiskie = {
enable = true;
notify = true;
};
}

View File

@@ -1,9 +1,5 @@
{ pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{ ... }:
{
home.packages = with pkgs; [
bash
];
programs.bash = {
enable = true;
shellAliases = {
@@ -19,11 +15,5 @@ lib.mkIf (user != "tv")
"checkjobs"
];
enableCompletion = false;
# initExtra = ''
# if [[ $- == *i* ]] # if interactive
# then
# eval "$(${pkgs.starship}/bin/starship init bash)"
# fi
# '';
};
}

View File

@@ -1,10 +1,15 @@
{ config, pkgs, lib, rice, user, secrets, ... }:
{ pkgs, lib, rice, user, secrets, ... }:
let
channels = [
"Caedrel"
"NoWay4u_Sir"
"zackrawrr"
"agurin"
"asmongold"
"Broeki"
"Broxah"
"Caedrel"
# "Caedrel"
"chrissyofficial"
"EintrachtSpandau"
"GamesDoneQuick"
@@ -27,7 +32,7 @@ let
"maxim"
"NASA"
"NNOPrime"
"NoWay4u_Sir"
# "NoWay4u_Sir"
"OfficialMikeShinoda"
"ow_esports"
"PrimeGaming"
@@ -40,6 +45,7 @@ let
"Trick2g"
"TSM_ImperialHal"
"Xisuma"
# "zackrawrr"
];
tabber = channel-name: {
highlightsEnabled = true;
@@ -55,14 +61,11 @@ let
type = "split";
};
};
in
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
chatterino2
];
home.file.".local/share/chatterino/Settings/settings.json".text = with secrets.chatterino; ''
in {
home = {
packages = with pkgs; [ chatterino2 ];
file = {
".local/share/chatterino/Settings/settings.json".text = with secrets.chatterino; ''
{
"accounts": {
"current": "${username}",
@@ -732,671 +735,7 @@ lib.mkIf (user != "tv")
}
}
'';
# home.file.".local/share/chatterino/Settings/settings.json".text = builtins.toJSON {
# hotkeys = {
# addedDefaults = [
# "change channel"
# "close popup window"
# "create clip"
# "delete"
# "emote picker"
# "focus down"
# "focus left"
# "focus right"
# "focus up"
# "go to end of input"
# "go to end of input with selection"
# "go to start of input"
# "go to start of input with selection"
# "new popup window"
# "new popup window from tab"
# "new split"
# "new tab"
# "next message"
# "open debug popup"
# "open quick switcher"
# "open settings"
# "popup accept"
# "popup focus search box"
# "popup reject"
# "popup scroll down"
# "popup scroll up"
# "popup select last tab"
# "popup select next tab"
# "popup select previous tab"
# "popup select tab #1"
# "popup select tab #2"
# "popup select tab #3"
# "popup select tab #4"
# "popup select tab #5"
# "popup select tab #6"
# "popup select tab #7"
# "popup select tab #8"
# "previous message"
# "reconnect"
# "reload emotes"
# "remove tab"
# "reopen split"
# "scroll page down"
# "scroll page up"
# "scroll to bottom"
# "scroll to top"
# "select last tab"
# "select next tab"
# "select previous tab"
# "select tab #1"
# "select tab #2"
# "select tab #3"
# "select tab #4"
# "select tab #5"
# "select tab #6"
# "select tab #7"
# "select tab #8"
# "send message"
# "send message and keep text"
# "show global search"
# "show search"
# "toggle live tabs only"
# "toggle local r9k"
# "toggle tab visibility"
# "zoom in"
# "zoom out"
# "zoom reset"
# ];
# "close popup window" = {
# action = "delete";
# keySequence = "Esc";
# category = "popupWindow";
# arguments = [ ];
# };
# "popup accept" = {
# action = "accept";
# keySequence = "Return";
# category = "popupWindow";
# arguments = [ ];
# };
# "popup focus search box" = {
# action = "search";
# keySequence = "Ctrl+F";
# category = "popupWindow";
# arguments = [ ];
# };
# "popup reject" = {
# action = "reject";
# keySequence = "Esc";
# category = "popupWindow";
# arguments = [ ];
# };
# "popup scroll down" = {
# action = "scrollPage";
# keySequence = "PgDown";
# category = "popupWindow";
# arguments = [
# "down"
# ];
# };
# "popup scroll up" = {
# action = "scrollPage";
# keySequence = "PgUp";
# category = "popupWindow";
# arguments = [
# "up"
# ];
# };
# "popup select last tab" = {
# action = "openTab";
# keySequence = "Ctrl+9";
# category = "popupWindow";
# arguments = [
# "last"
# ];
# };
# "popup select next tab" = {
# action = "openTab";
# keySequence = "Ctrl+Tab";
# category = "popupWindow";
# arguments = [
# "next"
# ];
# };
# "popup select previous tab" = {
# action = "openTab";
# keySequence = "Ctrl+Shift+Tab";
# category = "popupWindow";
# arguments = [
# "previous"
# ];
# };
# "popup select tab #1" = {
# action = "openTab";
# keySequence = "Ctrl+1";
# category = "popupWindow";
# arguments = [
# "0"
# ];
# };
# "popup select tab #2" = {
# action = "openTab";
# keySequence = "Ctrl+2";
# category = "popupWindow";
# arguments = [
# "1"
# ];
# };
# "popup select tab #3" = {
# action = "openTab";
# keySequence = "Ctrl+3";
# category = "popupWindow";
# arguments = [
# "2"
# ];
# };
# "popup select tab #4" = {
# action = "openTab";
# keySequence = "Ctrl+4";
# category = "popupWindow";
# arguments = [
# "3"
# ];
# };
# "popup select tab #5" = {
# action = "openTab";
# keySequence = "Ctrl+5";
# category = "popupWindow";
# arguments = [
# "4"
# ];
# };
# "popup select tab #6" = {
# action = "openTab";
# keySequence = "Ctrl+6";
# category = "popupWindow";
# arguments = [
# "5"
# ];
# };
# "popup select tab #7" = {
# action = "openTab";
# keySequence = "Ctrl+7";
# category = "popupWindow";
# arguments = [
# "6"
# ];
# };
# "popup select tab #8" = {
# action = "openTab";
# keySequence = "Ctrl+8";
# category = "popupWindow";
# arguments = [
# "7"
# ];
# };
# "change channel" = {
# action = "changeChannel";
# keySequence = "Ctrl+R";
# category = "split";
# arguments = [ ];
# };
# "create clip" = {
# action = "createClip";
# keySequence = "Alt+X";
# category = "split";
# arguments = [ ];
# };
# delete = {
# action = "delete";
# keySequence = "Ctrl+W";
# category = "split";
# arguments = [ ];
# };
# "focus down" = {
# action = "focus";
# keySequence = "Alt+Down";
# category = "split";
# arguments = [
# "down"
# ];
# };
# "focus left" = {
# action = "focus";
# keySequence = "Alt+Left";
# category = "split";
# arguments = [
# "left"
# ];
# };
# "focus right" = {
# action = "focus";
# keySequence = "Alt+Right";
# category = "split";
# arguments = [
# "right"
# ];
# };
# "focus up" = {
# action = "focus";
# keySequence = "Alt+Up";
# category = "split";
# arguments = [
# "up"
# ];
# };
# "open debug popup" = {
# action = "debug";
# keySequence = "F10";
# category = "split";
# arguments = [ ];
# };
# reconnect = {
# action = "reconnect";
# keySequence = "Ctrl+F5";
# category = "split";
# arguments = [ ];
# };
# "reload emotes" = {
# action = "reloadEmotes";
# keySequence = "F5";
# category = "split";
# arguments = [ ];
# };
# "scroll page down" = {
# action = "scrollPage";
# keySequence = "PgDown";
# category = "split";
# arguments = [
# "down"
# ];
# };
# "scroll page up" = {
# action = "scrollPage";
# keySequence = "PgUp";
# category = "split";
# arguments = [
# "up"
# ];
# };
# "scroll to bottom" = {
# action = "scrollToBottom";
# keySequence = "Ctrl+End";
# category = "split";
# arguments = [ ];
# };
# "scroll to top" = {
# action = "scrollToTop";
# keySequence = "Ctrl+Home";
# category = "split";
# arguments = [ ];
# };
# "show global search" = {
# action = "showGlobalSearch";
# keySequence = "Ctrl+Shift+F";
# category = "split";
# arguments = [ ];
# };
# "show search" = {
# action = "showSearch";
# keySequence = "Ctrl+F";
# category = "split";
# arguments = [ ];
# };
# "emote picker" = {
# action = "openEmotesPopup";
# keySequence = "Ctrl+E";
# category = "splitInput";
# arguments = [ ];
# };
# "go to end of input" = {
# action = "cursorToEnd";
# keySequence = "End";
# category = "splitInput";
# arguments = [
# "withoutSelection"
# ];
# };
# "go to end of input with selection" = {
# action = "cursorToEnd";
# keySequence = "Shift+End";
# category = "splitInput";
# arguments = [
# "withSelection"
# ];
# };
# "go to start of input" = {
# action = "cursorToStart";
# keySequence = "Home";
# category = "splitInput";
# arguments = [
# "withoutSelection"
# ];
# };
# "go to start of input with selection" = {
# action = "cursorToStart";
# keySequence = "Shift+Home";
# category = "splitInput";
# arguments = [
# "withSelection"
# ];
# };
# "next message" = {
# action = "nextMessage";
# keySequence = "Down";
# category = "splitInput";
# arguments = [ ];
# };
# "previous message" = {
# action = "previousMessage";
# keySequence = "Up";
# category = "splitInput";
# arguments = [ ];
# };
# "send message" = {
# action = "sendMessage";
# keySequence = "Return";
# category = "splitInput";
# arguments = [ ];
# };
# "send message and keep text" = {
# action = "sendMessage";
# keySequence = "Ctrl+Return";
# category = "splitInput";
# arguments = [
# "keepInput"
# ];
# };
# "new popup window" = {
# action = "popup";
# keySequence = "Ctrl+N";
# category = "window";
# arguments = [
# "split"
# ];
# };
# "new popup window from tab" = {
# action = "popup";
# keySequence = "Ctrl+Shift+N";
# category = "window";
# arguments = [
# "window"
# ];
# };
# "new split" = {
# action = "newSplit";
# keySequence = "Ctrl+T";
# category = "window";
# arguments = [ ];
# };
# "new tab" = {
# action = "newTab";
# keySequence = "Ctrl+Shift+T";
# category = "window";
# arguments = [ ];
# };
# "open quick switcher" = {
# action = "openQuickSwitcher";
# keySequence = "Ctrl+K";
# category = "window";
# arguments = [ ];
# };
# "open settings" = {
# action = "openSettings";
# keySequence = "Ctrl+P";
# category = "window";
# arguments = [ ];
# };
# "remove tab" = {
# action = "removeTab";
# keySequence = "Ctrl+Shift+W";
# category = "window";
# arguments = [ ];
# };
# "reopen split" = {
# action = "reopenSplit";
# keySequence = "Ctrl+G";
# category = "window";
# arguments = [ ];
# };
# "select last tab" = {
# action = "openTab";
# keySequence = "Ctrl+9";
# category = "window";
# arguments = [
# "last"
# ];
# };
# "select next tab" = {
# action = "openTab";
# keySequence = "Ctrl+Tab";
# category = "window";
# arguments = [
# "next"
# ];
# };
# "select previous tab" = {
# action = "openTab";
# keySequence = "Ctrl+Shift+Tab";
# category = "window";
# arguments = [
# "previous"
# ];
# };
# "select tab #1" = {
# action = "openTab";
# keySequence = "Ctrl+1";
# category = "window";
# arguments = [
# "0"
# ];
# };
# "select tab #2" = {
# action = "openTab";
# keySequence = "Ctrl+2";
# category = "window";
# arguments = [
# "1"
# ];
# };
# "select tab #3" = {
# action = "openTab";
# keySequence = "Ctrl+3";
# category = "window";
# arguments = [
# "2"
# ];
# };
# "select tab #4" = {
# action = "openTab";
# keySequence = "Ctrl+4";
# category = "window";
# arguments = [
# "3"
# ];
# };
# "select tab #5" = {
# action = "openTab";
# keySequence = "Ctrl+5";
# category = "window";
# arguments = [
# "4"
# ];
# };
# "select tab #6" = {
# action = "openTab";
# keySequence = "Ctrl+6";
# category = "window";
# arguments = [
# "5"
# ];
# };
# "select tab #7" = {
# action = "openTab";
# keySequence = "Ctrl+7";
# category = "window";
# arguments = [
# "6"
# ];
# };
# "select tab #8" = {
# action = "openTab";
# keySequence = "Ctrl+8";
# category = "window";
# arguments = [
# "7"
# ];
# };
# "toggle live tabs only" = {
# action = "setTabVisibility";
# keySequence = "Ctrl+Shift+L";
# category = "window";
# arguments = [
# "toggleLiveOnly"
# ];
# };
# "toggle local r9k" = {
# action = "toggleLocalR9K";
# keySequence = "Ctrl+H";
# category = "window";
# arguments = [ ];
# };
# "toggle tab visibility" = {
# action = "setTabVisibility";
# keySequence = "Ctrl+U";
# category = "window";
# arguments = [
# "toggle"
# ];
# };
# "zoom in" = {
# action = "zoom";
# keySequence = "Ctrl++";
# category = "window";
# arguments = [
# "in"
# ];
# };
# "zoom out" = {
# action = "zoom";
# keySequence = "Ctrl+-";
# category = "window";
# arguments = [
# "out"
# ];
# };
# "zoom reset" = {
# action = "zoom";
# keySequence = "Ctrl+0";
# category = "window";
# arguments = [
# "reset"
# ];
# };
# };
# misc = {
# currentVersion = "2.5.1";
# lockNotebookLayout = false;
# };
# ui = {
# lastSelectChannelTab = 0;
# lastSelectIrcConn = -1;
# };
# appearance = {
# theme = {
# name = "Black";
# };
# tabVisibility = 1;
# smoothScrollingNewMessages = true;o
# currentFontFamily = rice.font.base.name;
# messages = {
# alternateMessageBackground = true;
# showTimestamps = false;
# timestampFormat = "h =mm";
# separateMessages = true;
# lastMessagePattern = 10;
# lastMessageColor = "#ff7f0002";
# usernameDisplayMode = 1;
# };
# currentFontSize = 12;
# splitheader = {
# showUptime = true;
# showViewerCount = true;
# showGame = true;
# showTitle = true;
# };
# boldScale = 63.0;
# };
# accounts = secrets.chatterino.accounts;
# behaviour = {
# pauseOnHoverDuration = 5.0;
# usernameRightClickBehavior = 0;
# usernameRightClickBehaviorWithModifier = 1;
# showJoins = false;
# };
# highlighting = {
# selfMessageHighlight = {
# enabled = true;
# color = "#73008cff";
# };
# badges = [
# {
# name = "broadcaster";
# displayName = "Broadcaster";
# showInMentions = false;
# alert = false;
# sound = false;
# soundUrl = "";
# color = "#7f7f3f49";
# }
# {
# name = "admin";
# displayName = "Admin";
# showInMentions = false;
# alert = false;
# sound = false;
# soundUrl = "";
# color = "#7f7f3f49";
# }
# {
# name = "staff";
# displayName = "Staff";
# showInMentions = false;
# alert = false;
# sound = false;
# soundUrl = "";
# color = "#7f7f3f49";
# }
# {
# name = "moderator";
# displayName = "Moderator";
# showInMentions = false;
# alert = false;
# sound = false;
# soundUrl = "";
# }
# {
# name = "vip";
# displayName = "VIP";
# showInMentions = false;
# alert = false;
# sound = false;
# soundUrl = "";
# color = "#7f7f3578";
# }
# ];
# };
# emotes = {
# removeSpacesBetweenEmotes = false;
# showUnlistedSevenTVEmotes = true;
# };
# similarity = {
# similarityEnabled = false;
# hideSimilar = false;
# hideSimilarMaxDelay = 30;
# hideSimilarMaxMessagesToCheck = 5;
# };
# };
home.file.".local/share/chatterino/Settings/window-layout.json".text = builtins.toJSON {
".local/share/chatterino/Settings/window-layout.json".text = builtins.toJSON {
windows = [
{
emotePopup = {
@@ -1413,4 +752,6 @@ lib.mkIf (user != "tv")
}
];
};
};
};
}

View File

@@ -1,29 +1,106 @@
{ config, pkgs, rice, ... }:
{ rice, ... }:
{
home.file.".config/color-pallet.txt".text = with rice.color; ''
black: dark: ${black.dark}
base: ${black.base}
bright: ${black.bright}
white: dark: ${white.dark}
base: ${white.base}
bright: ${white.bright}
blue: dark: ${blue.dark}
base: ${blue.base}
bright: ${blue.bright}
magenta: dark: ${magenta.dark}
base: ${magenta.base}
bright: ${magenta.bright}
red: dark: ${red.dark}
base: ${red.base}
bright: ${red.bright}
cyan: dark: ${cyan.dark}
base: ${cyan.base}
bright: ${cyan.bright}
green: dark: ${green.dark}
base: ${green.base}
bright: ${green.bright}
yellow: dark: ${yellow.dark}
base: ${yellow.base}
bright: ${yellow.bright}
home.file.".config/color-pallete.html".text = with rice.color; let
cb = color-set: color-name: size: /* html */ ''
<div class="color-container" style="border-color: ${color-set.base}">
<div class="color-box" style="background: ${color-set.dark}; height: ${builtins.toString size}px;">
<p style="color: ${color-set.bright}"> ${color-name}.dark </p>
</div>
<div class="color-box" style="background: ${color-set.base}; height: ${builtins.toString size}px;">
<p class="dynamic-text"> ${color-name}.base </p>
</div>
<div class="color-box" style="background: ${color-set.bright}; height: ${builtins.toString size}px;">
<p style="color: ${color-set.dark}"> ${color-name}.bright </p>
</div>
</div>
'';
in /* html */ ''
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="darkreader-lock">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Color Pallete</title>
<style>
* {
margin: 0px;
padding: 0px;
}
html {
background: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency});
padding: auto;
}
body {
font-family: ${rice.font.base.name};
color: ${foreground};
width: fit-content;
margin: 10px auto 10px auto;
background: ${background};
border: ${builtins.toString rice.border-width}px solid ${border};
border-radius: ${builtins.toString rice.rounding}px;
padding: ${builtins.toString rice.gap-size}px;
}
h1 {
margin: ${builtins.toString rice.gap-size}px;
}
.color-container {
font-family: ${rice.font.code.name2};
display: flex;
gap: ${builtins.toString rice.gap-size}px;
margin: ${builtins.toString rice.gap-size}px;
}
.color-box {
width: 200px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: ${builtins.toString rice.rounding}px;
}
</style>
</head>
<body>
<h1> Color Pallete </h1>
${cb accent "accent" 100}
${cb secondary "secondary" 100}
${cb tertiary "tertiary" 100}
${cb weird "weird" 75}
${cb special "special" 75}
${cb positive "positive" 30}
${cb negative "negative" 30}
${cb black "black" 25}
${cb white "white" 25}
${cb blue "blue" 25}
${cb cyan "cyan" 25}
${cb green "green" 25}
${cb magenta "magenta" 25}
${cb red "red" 25}
${cb yellow "yellow" 25}
</body>
<script>
function getLuminance(color) {
const rgb = color.match(/\w\w/g).map((c) => parseInt(c, 16));
const [r, g, b] = rgb.map((val) => {
const channel = val / 255;
return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
});
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
}
function setDynamicTextColor() {
const texts = document.getElementsByClassName("dynamic-text");
function ff(text) {
const backgroundColor = text.parentElement.style.backgroundColor;
const rgbValues = backgroundColor.match(/\d+/g).map(Number);
const hexColor = `#''${rgbValues.map(c => c.toString(16).padStart(2, '0')).join("")}`;
const luminance = getLuminance(hexColor);
text.style.color = luminance < 0.2 ? '${foreground}' : '${background}';
};
for (let id in texts) { ff(texts[id]); }
}
setDynamicTextColor();
</script>
</html>
'';
}

13
home-modules/direnv.nix Executable file
View File

@@ -0,0 +1,13 @@
{ lib, user, ... }:
{
programs = {
direnv = {
enable = true;
# enableBashIntegration = true;
nix-direnv.enable = true;
config = {
hide_env_diff = true;
};
};
};
}

View File

@@ -1,12 +1,14 @@
{ config, pkgs, pkgs-unstable, lib, host, user, allowed, ... }:
{ pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE")
{
home.packages = [
pkgs-unstable.vesktop
home = {
packages = with pkgs; [
vesktop
];
home.file.".config/vesktop/settings/settings.json".text = ''
{
file.".config/vesktop/settings/settings.json".text = let
settingsSyncVersion = "1729179678715";
in /* json */ ''{
"notifyAboutUpdates": true,
"autoUpdate": false,
"autoUpdateNotification": true,
@@ -23,455 +25,160 @@ lib.mkIf (host != "NxACE")
"disableMinSize": false,
"winNativeTitleBar": false,
"plugins": {
"BadgeAPI": {
"enabled": true
},
"CommandsAPI": {
"enabled": true
},
"ContextMenuAPI": {
"enabled": true
},
"MemberListDecoratorsAPI": {
"enabled": false
},
"MessageAccessoriesAPI": {
"enabled": false
},
"MessageDecorationsAPI": {
"enabled": false
},
"MessageEventsAPI": {
"enabled": false
},
"MessagePopoverAPI": {
"enabled": false
},
"NoticesAPI": {
"enabled": true
},
"ServerListAPI": {
"enabled": false
},
"NoTrack": {
"enabled": true
},
"BadgeAPI": { "enabled": true },
"CommandsAPI": { "enabled": true },
"ContextMenuAPI": { "enabled": true },
"MemberListDecoratorsAPI": { "enabled": false },
"MessageAccessoriesAPI": { "enabled": false },
"MessageDecorationsAPI": { "enabled": false },
"MessageEventsAPI": { "enabled": false },
"MessagePopoverAPI": { "enabled": false },
"NoticesAPI": { "enabled": true },
"ServerListAPI": { "enabled": false },
"NoTrack": { "enabled": true },
"Settings": {
"enabled": true,
"settingsLocation": "aboveActivity"
},
"SupportHelper": {
"enabled": true
},
"ChatInputButtonAPI": {
"enabled": false
},
"AlwaysAnimate": {
"enabled": true
},
"AlwaysTrust": {
"enabled": true
},
"AnonymiseFileNames": {
"enabled": false
},
"WebRichPresence (arRPC)": {
"enabled": false
},
"BANger": {
"enabled": false
},
"BetterFolders": {
"enabled": false
},
"BetterGifAltText": {
"enabled": false
},
"BetterGifPicker": {
"enabled": false
},
"BetterNotesBox": {
"enabled": false
},
"BetterRoleDot": {
"enabled": false
},
"BetterUploadButton": {
"enabled": false
},
"BiggerStreamPreview": {
"enabled": false
},
"BlurNSFW": {
"enabled": false
},
"CallTimer": {
"enabled": false
},
"ClearURLs": {
"enabled": false
},
"ClientTheme": {
"enabled": false
},
"ColorSighted": {
"enabled": false
},
"ConsoleShortcuts": {
"enabled": false
},
"CopyUserURLs": {
"enabled": false
},
"CrashHandler": {
"enabled": true
},
"CustomRPC": {
"enabled": false
},
"Dearrow": {
"enabled": false
},
"Decor": {
"enabled": false
},
"DisableCallIdle": {
"enabled": false
},
"EmoteCloner": {
"enabled": false
},
"Experiments": {
"enabled": false
},
"F8Break": {
"enabled": false
},
"FakeNitro": {
"enabled": false
},
"FakeProfileThemes": {
"enabled": true
},
"FavoriteEmojiFirst": {
"enabled": false
},
"FavoriteGifSearch": {
"enabled": false
},
"FixCodeblockGap": {
"enabled": false
},
"FixSpotifyEmbeds": {
"enabled": false
},
"FixYoutubeEmbeds": {
"enabled": false
},
"ForceOwnerCrown": {
"enabled": false
},
"FriendInvites": {
"enabled": false
},
"GameActivityToggle": {
"enabled": false
},
"GifPaste": {
"enabled": false
},
"GreetStickerPicker": {
"enabled": false
},
"HideAttachments": {
"enabled": false
},
"iLoveSpam": {
"enabled": false
},
"IgnoreActivities": {
"enabled": false
},
"ImageZoom": {
"enabled": false
},
"InvisibleChat": {
"enabled": false
},
"KeepCurrentChannel": {
"enabled": false
},
"LastFMRichPresence": {
"enabled": false
},
"LoadingQuotes": {
"enabled": false
},
"MemberCount": {
"enabled": false
},
"MessageClickActions": {
"enabled": false
},
"MessageLinkEmbeds": {
"enabled": false
},
"MessageLogger": {
"enabled": false
},
"MessageTags": {
"enabled": false
},
"MoreCommands": {
"enabled": false
},
"MoreKaomoji": {
"enabled": false
},
"MoreUserTags": {
"enabled": false
},
"Moyai": {
"enabled": false
},
"MutualGroupDMs": {
"enabled": false
},
"NewGuildSettings": {
"enabled": false
},
"NoBlockedMessages": {
"enabled": false
},
"NoDevtoolsWarning": {
"enabled": false
},
"NoF1": {
"enabled": false
},
"NoMosaic": {
"enabled": false
},
"NoPendingCount": {
"enabled": false
},
"NoProfileThemes": {
"enabled": false
},
"NoReplyMention": {
"enabled": false
},
"NoScreensharePreview": {
"enabled": false
},
"NoTypingAnimation": {
"enabled": false
},
"NoUnblockToJump": {
"enabled": false
},
"NormalizeMessageLinks": {
"enabled": false
},
"NotificationVolume": {
"enabled": false
},
"NSFWGateBypass": {
"enabled": false
},
"OnePingPerDM": {
"enabled": false
},
"oneko": {
"enabled": false
},
"OpenInApp": {
"enabled": false
},
"Party mode 🎉": {
"enabled": false
},
"PermissionFreeWill": {
"enabled": false
},
"PermissionsViewer": {
"enabled": false
},
"petpet": {
"enabled": false
},
"PictureInPicture": {
"enabled": false
},
"PinDMs": {
"enabled": false
},
"PlainFolderIcon": {
"enabled": false
},
"PlatformIndicators": {
"enabled": false
},
"PreviewMessage": {
"enabled": false
},
"PronounDB": {
"enabled": false
},
"QuickMention": {
"enabled": false
},
"QuickReply": {
"enabled": false
},
"ReactErrorDecoder": {
"enabled": false
},
"ReadAllNotificationsButton": {
"enabled": false
},
"RelationshipNotifier": {
"enabled": false
},
"RevealAllSpoilers": {
"enabled": false
},
"ReverseImageSearch": {
"enabled": false
},
"ReviewDB": {
"enabled": false
},
"RoleColorEverywhere": {
"enabled": true
},
"SearchReply": {
"enabled": false
},
"SecretRingToneEnabler": {
"enabled": false
},
"SendTimestamps": {
"enabled": false
},
"ServerListIndicators": {
"enabled": false
},
"ServerProfile": {
"enabled": false
},
"ShikiCodeblocks": {
"enabled": false
},
"ShowAllMessageButtons": {
"enabled": false
},
"ShowConnections": {
"enabled": false
},
"ShowHiddenChannels": {
"enabled": false
},
"ShowMeYourName": {
"enabled": false
},
"ShowTimeouts": {
"enabled": false
},
"SilentMessageToggle": {
"enabled": false
},
"SilentTyping": {
"enabled": false
},
"SortFriendRequests": {
"enabled": false
},
"SpotifyControls": {
"enabled": false
},
"SpotifyCrack": {
"enabled": false
},
"SpotifyShareCommands": {
"enabled": false
},
"StartupTimings": {
"enabled": false
},
"SuperReactionTweaks": {
"enabled": false
},
"TextReplace": {
"enabled": false
},
"ThemeAttributes": {
"enabled": false
},
"TimeBarAllActivities": {
"enabled": false
},
"Translate": {
"enabled": false
},
"TypingIndicator": {
"enabled": false
},
"TypingTweaks": {
"enabled": false
},
"Unindent": {
"enabled": false
},
"UnsuppressEmbeds": {
"enabled": false
},
"UrbanDictionary": {
"enabled": false
},
"UserVoiceShow": {
"enabled": false
},
"USRBG": {
"enabled": false
},
"ValidUser": {
"enabled": false
},
"VoiceChatDoubleClick": {
"enabled": false
},
"VcNarrator": {
"enabled": false
},
"VencordToolbox": {
"enabled": false
},
"ViewIcons": {
"enabled": false
},
"ViewRaw": {
"enabled": false
},
"VoiceMessages": {
"enabled": false
},
"SupportHelper": { "enabled": true },
"ChatInputButtonAPI": { "enabled": false },
"AlwaysAnimate": { "enabled": true },
"AlwaysTrust": { "enabled": true },
"AnonymiseFileNames": { "enabled": false },
"WebRichPresence (arRPC)": { "enabled": false },
"BANger": { "enabled": false },
"BetterFolders": { "enabled": false },
"BetterGifAltText": { "enabled": false },
"BetterGifPicker": { "enabled": false },
"BetterNotesBox": { "enabled": false },
"BetterRoleDot": { "enabled": false },
"BetterUploadButton": { "enabled": false },
"BiggerStreamPreview": { "enabled": false },
"BlurNSFW": { "enabled": false },
"CallTimer": { "enabled": false },
"ClearURLs": { "enabled": false },
"ClientTheme": { "enabled": false },
"ColorSighted": { "enabled": false },
"ConsoleShortcuts": { "enabled": false },
"CopyUserURLs": { "enabled": false },
"CrashHandler": { "enabled": true },
"CustomRPC": { "enabled": false },
"Dearrow": { "enabled": false },
"Decor": { "enabled": false },
"DisableCallIdle": { "enabled": false },
"EmoteCloner": { "enabled": false },
"Experiments": { "enabled": false },
"F8Break": { "enabled": false },
"FakeNitro": { "enabled": false },
"FakeProfileThemes": { "enabled": true },
"FavoriteEmojiFirst": { "enabled": false },
"FavoriteGifSearch": { "enabled": false },
"FixCodeblockGap": { "enabled": false },
"FixSpotifyEmbeds": { "enabled": false },
"FixYoutubeEmbeds": { "enabled": false },
"ForceOwnerCrown": { "enabled": false },
"FriendInvites": { "enabled": false },
"GameActivityToggle": { "enabled": false },
"GifPaste": { "enabled": false },
"GreetStickerPicker": { "enabled": false },
"HideAttachments": { "enabled": false },
"iLoveSpam": { "enabled": false },
"IgnoreActivities": { "enabled": false },
"ImageZoom": { "enabled": false },
"InvisibleChat": { "enabled": false },
"KeepCurrentChannel": { "enabled": false },
"LastFMRichPresence": { "enabled": false },
"LoadingQuotes": { "enabled": false },
"MemberCount": { "enabled": false },
"MessageClickActions": { "enabled": false },
"MessageLinkEmbeds": { "enabled": false },
"MessageLogger": { "enabled": false },
"MessageTags": { "enabled": false },
"MoreCommands": { "enabled": false },
"MoreKaomoji": { "enabled": false },
"MoreUserTags": { "enabled": false },
"Moyai": { "enabled": false },
"MutualGroupDMs": { "enabled": false },
"NewGuildSettings": { "enabled": false },
"NoBlockedMessages": { "enabled": false },
"NoDevtoolsWarning": { "enabled": false },
"NoF1": { "enabled": false },
"NoMosaic": { "enabled": false },
"NoPendingCount": { "enabled": false },
"NoProfileThemes": { "enabled": false },
"NoReplyMention": { "enabled": false },
"NoScreensharePreview": { "enabled": false },
"NoTypingAnimation": { "enabled": false },
"NoUnblockToJump": { "enabled": false },
"NormalizeMessageLinks": { "enabled": false },
"NotificationVolume": { "enabled": false },
"NSFWGateBypass": { "enabled": false },
"OnePingPerDM": { "enabled": false },
"oneko": { "enabled": false },
"OpenInApp": { "enabled": false },
"Party mode 🎉": { "enabled": false },
"PermissionFreeWill": { "enabled": false },
"PermissionsViewer": { "enabled": false },
"petpet": { "enabled": false },
"PictureInPicture": { "enabled": false },
"PinDMs": { "enabled": false },
"PlainFolderIcon": { "enabled": false },
"PlatformIndicators": { "enabled": false },
"PreviewMessage": { "enabled": false },
"PronounDB": { "enabled": false },
"QuickMention": { "enabled": false },
"QuickReply": { "enabled": false },
"ReactErrorDecoder": { "enabled": false },
"ReadAllNotificationsButton": { "enabled": false },
"RelationshipNotifier": { "enabled": false },
"RevealAllSpoilers": { "enabled": false },
"ReverseImageSearch": { "enabled": false },
"ReviewDB": { "enabled": false },
"RoleColorEverywhere": { "enabled": true },
"SearchReply": { "enabled": false },
"SecretRingToneEnabler": { "enabled": false },
"SendTimestamps": { "enabled": false },
"ServerListIndicators": { "enabled": false },
"ServerProfile": { "enabled": false },
"ShikiCodeblocks": { "enabled": false },
"ShowAllMessageButtons": { "enabled": false },
"ShowConnections": { "enabled": false },
"ShowHiddenChannels": { "enabled": false },
"ShowMeYourName": { "enabled": false },
"ShowTimeouts": { "enabled": false },
"SilentMessageToggle": { "enabled": false },
"SilentTyping": { "enabled": false },
"SortFriendRequests": { "enabled": false },
"SpotifyControls": { "enabled": false },
"SpotifyCrack": { "enabled": false },
"SpotifyShareCommands": { "enabled": false },
"StartupTimings": { "enabled": false },
"SuperReactionTweaks": { "enabled": false },
"TextReplace": { "enabled": false },
"ThemeAttributes": { "enabled": false },
"TimeBarAllActivities": { "enabled": false },
"Translate": { "enabled": false },
"TypingIndicator": { "enabled": false },
"TypingTweaks": { "enabled": false },
"Unindent": { "enabled": false },
"UnsuppressEmbeds": { "enabled": false },
"UrbanDictionary": { "enabled": false },
"UserVoiceShow": { "enabled": false },
"USRBG": { "enabled": false },
"ValidUser": { "enabled": false },
"VoiceChatDoubleClick": { "enabled": false },
"VcNarrator": { "enabled": false },
"VencordToolbox": { "enabled": false },
"ViewIcons": { "enabled": false },
"ViewRaw": { "enabled": false },
"VoiceMessages": { "enabled": false },
"WebContextMenus": {
"enabled": true,
"addBack": true
},
"WebKeybinds": {
"enabled": true
},
"WhoReacted": {
"enabled": false
},
"Wikisearch": {
"enabled": false
},
"XSOverlay": {
"enabled": false
}
"addBack": true },
"WebKeybinds": { "enabled": true },
"WhoReacted": { "enabled": false },
"Wikisearch": { "enabled": false },
"XSOverlay": { "enabled": false }
},
"notifications": {
"timeout": 5000,
@@ -483,10 +190,11 @@ lib.mkIf (host != "NxACE")
"authenticated": false,
"url": "https://api.vencord.dev/",
"settingsSync": false,
"settingsSyncVersion": 1710459223618
"settingsSyncVersion": ${settingsSyncVersion}
}
}
'';
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, host, rice, secrets, ... }:
{ pkgs, lib, host, user, rice, secrets, ... }:
lib.mkIf (host != "NxACE")
{
home.packages = with pkgs; [
@@ -6,8 +6,7 @@ lib.mkIf (host != "NxACE")
];
programs.thunderbird =
let
programs.thunderbird = let
inherit (lib.generators) toJSON;
extensions = toJSON {} {
"default-theme@mozilla.org" = "5787f490-29b8-436e-a111-640da8590790";
@@ -22,7 +21,7 @@ lib.mkIf (host != "NxACE")
in {
enable = true;
profiles = {
default = {
"${user}" = {
isDefault = true;
settings = with rice.color; {
"calendar.alarms.showmissed" = false;
@@ -47,7 +46,18 @@ lib.mkIf (host != "NxACE")
"mailnews.headers.showReferences" = true;
"mailnews.headers.showSender" = true;
"mailnews.headers.showUserAgent" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
userChrome = with rice.color; /* css */ ''
* {
color: ${rice.lib.hex-to-rgb-comma-string foreground} !important;
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
border: none !important;
}
treechildren::-moz-tree-row(odd), treechildren::-moz-tree-row(even) {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
}
'';
};
};
};
@@ -76,7 +86,7 @@ lib.mkIf (host != "NxACE")
};
thunderbird = {
enable = true;
profiles = [ "default" ];
profiles = [ "nx2" ];
# The id given as argument is an automatically generated account identifier.
settings = OAuth2Settings;
};
@@ -96,28 +106,29 @@ lib.mkIf (host != "NxACE")
};
thunderbird = {
enable = true;
profiles = [ "default" ];
profiles = [ "nx2" ];
# The id given as argument is an automatically generated account identifier.
settings = OAuth2Settings;
};
};
hsmw = {
address = secrets.email.hsmw.mail;
userName = secrets.email.hsmw.mail;
hsmw = with secrets.email.hsmw; {
address = "${un}@hs-mittweida.de";
userName = "${un}@hs-mittweida.de";
realName = "Lennart J. Kurzweg";
imap = {
port = 993;
host = "xc.hs-mittweida.de";
};
smtp = {
port = 465;
port = 587;
host = "xc.hs-mittweida.de";
tls.useStartTls = true;
};
signature = {
text = ''
MatNr: ${secrets.email.hsmw.mnr}
SemGr: ${secrets.email.hsmw.semgr}
MatNr: ${mnr}
SemGr: ${semgr}
About Me: https://nx2.site/about-me
Contact: https://nx2.site/contact
GPG: https://nx2.site/gpg
@@ -126,7 +137,42 @@ lib.mkIf (host != "NxACE")
};
thunderbird = {
enable = true;
profiles = [ "default" ];
profiles = [ "nx2" ];
settings = id: {
"mail.server.server_${id}.fcc_folder" = "imap://${un}%40hs-mittweida.de@xc.hs-mittweida.de/Sent";
};
};
};
tuda = with secrets.email.tuda; {
address = "${un}@stud.tu-darmstadt.de";
userName = tuid;
realName = "Lennart J. Kurzweg";
imap = {
port = 993;
host = "imap.stud.tu-darmstadt.de";
};
smtp = {
port = 465;
host = "smtp.tu-darmstadt.de";
tls.enable = true;
};
signature = {
text = ''
Field: MSc. AI/ML
MNr: ${mnr}
TU-ID: ${tuid}
About Me: https://nx2.site/about-me
Contact: https://nx2.site/contact
GPG: https://nx2.site/gpg
'';
showSignature = "append";
};
thunderbird = {
enable = true;
profiles = [ "nx2" ];
settings = id: {
"mail.server.server_${id}.fcc_folder" = "imap://${un}%40hs-mittweida.de@xc.hs-mittweida.de/Sent";
};
};
};
};

View File

@@ -1,171 +1,208 @@
{pkgs, pkgs-unstable, secrets, user, inputs, ...}: {
programs.firefox = {
enable = true;
package = pkgs-unstable.firefox;
# package = pkgs.firefox;
profiles.${user} = {
# extensions = with inputs.firefox-addons; [
# ublock-origin
# darkreader
# bitwarden
# flagfox
# sponsorblock
# languagetool
# istilldontcareaboutcookies
# return-youtube-dislikes
# ];
extensions = [ inputs.firefox-addons.darkreader ];
bookmarks = [
{
name = "Github Code Search";
keyword = "cs";
url = "https://github.com/search?type=code&auto_enroll=true";
}
];
settings = {
"accessibility.typeaheadfind.flashBar" = 0;
"app.normandy.first_run" = false;
"app.normandy.migrationsApplied" = 12;
"app.normandy.user_id" = "25f4d747-3c5e-40e8-b520-caed34976e7a";
"browser.aboutConfig.showWarning" = false;
"browser.bookmarks.addedImportButton" = true;
"browser.bookmarks.editDialog.confirmationHintShowCount" = 1;
"browser.bookmarks.restore_default_bookmarks" = false;
"browser.bookmarks.showMobileBookmarks" = true;
"browser.contentblocking.category" = "standard";
"browser.contextual-services.contextId" = "{7fc76500-3ce1-4c39-8fa5-8e9964c04ecc}";
"browser.download.lastDir" = "/home/nx2/Documents";
"browser.download.panel.shown" = true;
"browser.download.viewableInternally.typeWasRegistered.avif" = true;
"browser.download.viewableInternally.typeWasRegistered.webp" = true;
"browser.eme.ui.firstContentShown" = true;
"browser.engagement.ctrlTab.has-used" = true;
"browser.engagement.downloads-button.has-used" = true;
"browser.engagement.fxa-toolbar-menu-button.has-used" = true;
"browser.laterrun.bookkeeping.sessionCount" = 1;
"browser.migration.version" = 144;
"browser.newtabpage.activity-stream.impressionId" = "{a6561b3f-3884-4b37-b9c1-c67e80f5792a}";
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.topSitesRows" = 2;
"browser.newtabpage.pinned" = "[{\"url\":\"https://www.youtube.com/\",\"label\":\"youtube\",\"baseDomain\":\"youtube.com\"},{\"url\":\"https://www.twitch.tv/\",\"baseDomain\":\"twitch.tv\"},{\"url\":\"https://nx2.site/\",\"label\":\"nx2\",\"baseDomain\":\"nx2.site\"},{\"url\":\"https://feddit.de\",\"label\":\"Lemmy\",\"baseDomain\":\"feddit.de\"},{\"url\":\"https://ieji.de\",\"label\":\"Mastadon\",\"baseDomain\":\"ieji.de\"},{\"url\":\"https://www.hs-mittweida.de/\",\"label\":\"HSMW\",\"baseDomain\":\"hs-mittweida.de\"},{\"url\":\"http://wiki.hyprland.org/\",\"label\":\"hyprland\",\"baseDomain\":\"wiki.hyprland.org\"},{\"url\":\"https://wiki.archlinux.org\",\"label\":\"ArchWiki\",\"baseDomain\":\"wiki.archlinux.org\"},{\"url\":\"https://chat.openai.com/\",\"label\":\"ChatGPT\",\"baseDomain\":\"chat.openai.com\"},{\"url\":\"https://www.nerdfonts.com/cheat-sheet\",\"label\":\"Nerdfonts\",\"baseDomain\":\"nerdfonts.com\"},{\"url\":\"http://127.0.0.1:8384/\",\"label\":\"Syncthing\",\"baseDomain\":\"127.0.0.1\"},{\"url\":\"https://lutris.net/\",\"label\":\"Lutris\",\"baseDomain\":\"lutris.net\"},{\"url\":\"https://www.namecheap.com/\",\"label\":\"Namecheap\",\"baseDomain\":\"namecheap.com\"},{\"url\":\"https://hub.docker.com/\",\"label\":\"Docker Hub\",\"baseDomain\":\"hub.docker.com\"},{\"url\":\"https://www.netflix.com/\",\"label\":\"Netflix\",\"baseDomain\":\"netflix.com\"},{\"url\":\"https://www.amazon.de/Amazon-Video/b/?&node=3010075031&ref=dvm_MLP_ROWEU_DE_1\",\"label\":\"Prime Video\"},{\"url\":\"https://translate.google.com/\",\"label\":\"Google Translate\",\"baseDomain\":\"translate.google.com\"}]";
"browser.newtabpage.storageVersion" = 1;
"browser.pageActions.persistedActions" = "{\"ids\":[\"bookmark\",\"_802a552e-13d1-4683-a40a-1e5325fba4bb_\"],\"idsInUrlbar\":[\"_802a552e-13d1-4683-a40a-1e5325fba4bb_\",\"bookmark\"],\"idsInUrlbarPreProton\":[],\"version\":1}";
"browser.pagethumbnails.storage_version" = 3;
"browser.pdfjs.feature-tour" = "{\"screen\":\"\",\"complete\":true}";
"browser.policies.applied" = true;
"browser.proton.toolbar.version" = 3;
"browser.rights.3.shown" = true;
"browser.search.region" = "DE";
"browser.startup.couldRestoreSession.count" = 2;
"browser.startup.homepage_override.mstone" = "126.0";
"browser.theme.toolbar-theme" = 0;
"browser.translations.neverTranslateLanguages" = "de";
"browser.translations.panelShown" = true;
"browser.uiCustomization.state" = "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[\"sponsorblocker_ajay_app-browser-action\",\"_d8b32864-153d-47fb-93ea-c273c4d1ef17_-browser-action\",\"_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action\",\"linkhints_lydell_github_io-browser-action\",\"languagetool-webextension_languagetool_org-browser-action\",\"jid1-kkzogwgsw3ao4q_jetpack-browser-action\",\"_de22fd49-c9ab-4359-b722-b3febdc3a0b0_-browser-action\",\"amptra_keepa_com-browser-action\",\"pywalfox_frewacom_org-browser-action\"],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"customizableui-special-spring1\",\"urlbar-container\",\"customizableui-special-spring2\",\"save-to-pocket-button\",\"downloads-button\",\"fxa-toolbar-menu-button\",\"unified-extensions-button\",\"ublock0_raymondhill_net-browser-action\",\"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action\",\"addon_darkreader_org-browser-action\",\"_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"import-button\",\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\",\"_d8b32864-153d-47fb-93ea-c273c4d1ef17_-browser-action\",\"ublock0_raymondhill_net-browser-action\",\"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action\",\"addon_darkreader_org-browser-action\",\"_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action\",\"linkhints_lydell_github_io-browser-action\",\"sponsorblocker_ajay_app-browser-action\",\"languagetool-webextension_languagetool_org-browser-action\",\"jid1-kkzogwgsw3ao4q_jetpack-browser-action\",\"_de22fd49-c9ab-4359-b722-b3febdc3a0b0_-browser-action\",\"amptra_keepa_com-browser-action\",\"_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action\",\"pywalfox_frewacom_org-browser-action\"],\"dirtyAreaCache\":[\"nav-bar\",\"PersonalToolbar\",\"toolbar-menubar\",\"TabsToolbar\",\"unified-extensions-area\"],\"currentVersion\":20,\"newElementCount\":2}";
"browser.urlbar.placeholderName" = "Google";
"browser.urlbar.placeholderName.private" = "Google";
"browser.urlbar.quicksuggest.migrationVersion" = 2;
"browser.urlbar.quicksuggest.scenario" = "history";
"browser.urlbar.tipShownCount.searchTip_onboard" = 4;
"browser.urlbar.tipShownCount.searchTip_redirect" = 1;
"datareporting.policy.dataSubmissionPolicyAcceptedVersion" = 2;
"devtools.debugger.prefs-schema-version" = 11;
"devtools.everOpened" = true;
"devtools.inspector.activeSidebar" = "animationinspector";
"devtools.inspector.selectedSidebar" = "animationinspector";
"devtools.netmonitor.columnsData" = "[{\"name\":\"status\",\"minWidth\":30,\"width\":5.56},{\"name\":\"method\",\"minWidth\":30,\"width\":5.56},{\"name\":\"domain\",\"minWidth\":30,\"width\":11.11},{\"name\":\"file\",\"minWidth\":30,\"width\":27.78},{\"name\":\"url\",\"minWidth\":30,\"width\":25},{\"name\":\"initiator\",\"minWidth\":30,\"width\":11.11},{\"name\":\"type\",\"minWidth\":30,\"width\":5.56},{\"name\":\"transferred\",\"minWidth\":30,\"width\":11.11},{\"name\":\"contentSize\",\"minWidth\":30,\"width\":5.56},{\"name\":\"waterfall\",\"minWidth\":150,\"width\":16.67}]";
"devtools.netmonitor.msg.visibleColumns" = "[\"data\",\"time\"]";
"devtools.toolbox.host" = "window";
"devtools.toolbox.sidebar.width" = 1406;
"devtools.toolsidebar-height.inspector" = 350;
"devtools.toolsidebar-width.inspector" = 816;
"devtools.toolsidebar-width.inspector.splitsidebar" = 513;
"distribution.iniFile.exists.appversion" = "126.0";
"distribution.iniFile.exists.value" = true;
"distribution.nixos.bookmarksProcessed" = true;
"doh-rollout.doneFirstRun" = true;
"doh-rollout.home-region" = "DE";
"dom.forms.autocomplete.formautofill" = true;
"dom.push.userAgentID" = "d5b33ca6eafc45e5b8ce2161eb075680";
"extensions.activeThemeID" = "{9b84b6b4-07c4-4b4b-ba21-394d86f6e9ee}";
"extensions.blocklist.pingCountVersion" = -1;
"extensions.databaseSchema" = 36;
"extensions.getAddons.databaseSchema" = 6;
"extensions.lastAppBuildId" = "20240509170740";
"extensions.lastAppVersion" = "126.0";
"extensions.lastPlatformVersion" = "126.0";
"extensions.pendingOperations" = false;
"extensions.pictureinpicture.enable_picture_in_picture_overrides" = true;
"extensions.quarantinedDomains.list" = "autoatendimento.bb.com.br,ibpf.sicredi.com.br,ibpj.sicredi.com.br,internetbanking.caixa.gov.br,www.ib12.bradesco.com.br,www2.bancobrasil.com.br";
"extensions.systemAddonSet" = "{\"schema\":1,\"addons\":{}}";
"extensions.ui.dictionary.hidden" = true;
"extensions.ui.extension.hidden" = false;
"extensions.ui.lastCategory" = "addons://list/extension";
"extensions.ui.locale.hidden" = true;
"extensions.ui.sitepermission.hidden" = true;
"extensions.webcompat.enable_shims" = true;
"extensions.webcompat.perform_injections" = true;
"extensions.webcompat.perform_ua_overrides" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.addon@darkreader.org" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.amptra@keepa.com" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.jid1-D7momAzRw417Ag@jetpack" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.jid1-KKzOGWgsW3Ao4Q@jetpack" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.languagetool-webextension@languagetool.org" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.linkhints@lydell.github.io" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.screenshots@mozilla.org" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.sponsorBlocker@ajay.app" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.uBlock0@raymondhill.net" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.{446900e4-71c2-419f-a6a7-df9c091e268b}" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.{802a552e-13d1-4683-a40a-1e5325fba4bb}" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.{d8b32864-153d-47fb-93ea-c273c4d1ef17}" = true;
"extensions.webextensions.ExtensionStorageIDB.migrated.{de22fd49-c9ab-4359-b722-b3febdc3a0b0}" = true;
"extensions.webextensions.uuids" = "{\"formautofill@mozilla.org\":\"62543e0a-fb48-4cb5-bb50-7bc1d34123eb\",\"pictureinpicture@mozilla.org\":\"72b053a7-04e4-443d-9eb0-788fee741317\",\"screenshots@mozilla.org\":\"b0da1868-7ce5-4126-836c-cb27f7c90fd1\",\"webcompat-reporter@mozilla.org\":\"53128b30-09e3-498f-b327-8297bca2a694\",\"webcompat@mozilla.org\":\"e3fce76c-5b97-4ed2-a127-5f54ea2b55a6\",\"default-theme@mozilla.org\":\"edf40636-48ae-479c-bb15-d2c1c594f4f3\",\"addons-search-detection@mozilla.com\":\"65723b37-68b8-4463-964e-000a9efc4bee\",\"google@search.mozilla.org\":\"e8fd2d91-fda9-450d-9410-c475b13cd126\",\"wikipedia@search.mozilla.org\":\"2cb739cf-5028-4ba1-8df8-a6b4035d3e3f\",\"bing@search.mozilla.org\":\"2836d1bb-c71f-451a-a7c9-5ed0304a71fb\",\"ddg@search.mozilla.org\":\"8280c1b4-90bb-4ca8-b1e3-9c64c1cb4740\",\"{d8b32864-153d-47fb-93ea-c273c4d1ef17}\":\"6cd42543-07ad-499d-ac1f-f755b26bc2c5\",\"uBlock0@raymondhill.net\":\"d57779a5-82b8-40d3-8a7b-05b25c9e86ac\",\"{802a552e-13d1-4683-a40a-1e5325fba4bb}\":\"ac3677b0-913d-4025-a37c-5cad38597584\",\"{446900e4-71c2-419f-a6a7-df9c091e268b}\":\"6978384a-6166-415d-ab6e-a6adfbe6731d\",\"addon@darkreader.org\":\"b691cdc2-fb80-4767-9baf-bc63d916deb6\",\"{762f9885-5a13-4abd-9c77-433dcd38b8fd}\":\"6830a911-9fbf-4c6a-b07b-0293a16f919d\",\"linkhints@lydell.github.io\":\"040ed779-4e1a-4be8-bb2f-1202d6406573\",\"jid1-q4sG8pYhq8KGHs@jetpack\":\"1c3283fc-303b-4984-aa6a-3d599b7dc543\",\"sponsorBlocker@ajay.app\":\"22d4703c-dabe-4d7c-95c7-3d1527e19ef6\",\"jid1-D7momAzRw417Ag@jetpack\":\"fd28819b-1fe8-401b-8d1b-ba42808f4983\",\"{ceb74424-e8e6-4023-b972-a12e50e17fcb}\":\"ef19aad8-0b64-49d3-84f0-af90c440df49\",\"languagetool-webextension@languagetool.org\":\"b3622472-5123-41be-8b48-f2040b0d2424\",\"jid1-KKzOGWgsW3Ao4Q@jetpack\":\"283cf64b-0d7a-4fd6-8579-876ba162e3eb\",\"{de22fd49-c9ab-4359-b722-b3febdc3a0b0}\":\"4c6ae857-dccb-4a09-a2eb-8351afef4cb9\",\"amptra@keepa.com\":\"85562121-cb4f-4138-a608-d61bd0c2852a\",\"{bc5ae657-5db8-4f8a-b558-e7343e127fee}\":\"d5468646-933b-4941-9ab2-007faf58f8c1\",\"{9b84b6b4-07c4-4b4b-ba21-394d86f6e9ee}\":\"6e250173-0b11-41a3-b3f9-f1527394f0c6\"}";
"gecko.handlerService.defaultHandlersVersion" = 1;
"identity.fxaccounts.account.device.name" = "nx2s Firefox on NxXPS";
"identity.fxaccounts.account.telemetry.sanitized_uid" = "13f64fe3ab835d96147cefb0f5c11287";
"identity.fxaccounts.lastSignedInUserHash" = "u2qaIKiezOjW/0+5BuKsVe+1+U7k3SSH4qAuEPoL7Tc=";
"identity.fxaccounts.toolbar.accessed" = true;
"media.eme.enabled" = true;
"media.gmp-gmpopenh264.abi" = "x86_64-gcc3";
"media.gmp-gmpopenh264.hashValue" = "53a58bfb4c8124ad4f7655b99bfdea290033a085e0796b19245b33b91c0948fdac9f0c3e817130b352493a65d9a7a0fc8a7c1eedc618cdaa2b4580734a11cd9c";
"media.gmp-gmpopenh264.version" = "2.3.2";
"media.gmp-manager.buildID" = "20240509170740";
"media.gmp-widevinecdm.abi" = "x86_64-gcc3";
"media.gmp-widevinecdm.hashValue" = "661ad969099a89a278384f56a17ae912c3542d585ea4981f3b9a3c6e1a07f8da6ffad9db29cee194bf7834adc3ca258c775cd2b0980e3e6cb7ee8b39600dad58";
"media.gmp-widevinecdm.version" = "4.10.2710.0";
"media.gmp.storage.version.observed" = 1;
"media.videocontrols.picture-in-picture.video-toggle.has-used" = true;
"network.dns.disablePrefetch" = true;
"network.http.speculative-parallel-limit" = 0;
"network.predictor.enabled" = false;
"network.prefetch-next" = false;
"network.proxy.type" = 4;
"nimbus.syncdefaultsstore.upgradeDialog" = "{\"slug\":\"upgrade-spotlight-rollout\",\"branch\":{\"slug\":\"treatment\",\"ratio\":1,\"feature\":{\"value\":null,\"enabled\":true,\"featureId\":\"upgradeDialog\"},\"features\":null},\"active\":true,\"experimentType\":\"rollout\",\"source\":\"rs-loader\",\"userFacingName\":\"Upgrade Spotlight Rollout\",\"userFacingDescription\":\"Experimenting on onboarding content when you upgrade Firefox.\",\"lastSeen\":\"2024-04-09T08:41:11.293Z\",\"featureIds\":[\"upgradeDialog\"],\"prefs\":[],\"isRollout\":true}";
"nimbus.syncdefaultsstore.upgradeDialog.enabled" = false;
"pdfjs.enabledCache.state" = true;
"pdfjs.migrationVersion" = 2;
"pref.privacy.disable_button.view_passwords" = false;
"privacy.purge_trackers.date_in_cookie_database" = "0";
"privacy.sanitize.pending" = "[{\"id\":\"newtab-container\",\"itemsToClear\":[],\"options\":{}}]";
"security.sandbox.content.tempDirSuffix" = "83e3690e-e3e1-4bf5-b085-737b3a2792c9";
"services.settings.clock_skew_seconds" = 0;
"services.sync.username" = secrets.email.gmail-online.mail;
"signon.autofillForms" = false;
"signon.rememberSignons" = false;
"storage.vacuum.last.index" = 2;
"toolkit.telemetry.cachedClientID" = "d2c7964b-01ee-49bf-94a9-329bd47d7606";
"toolkit.telemetry.pioneer-new-studies-available" = true;
"toolkit.telemetry.previousBuildID" = "20240509170740";
"toolkit.telemetry.reportingpolicy.firstRun" = false;
};
};
};
# { pkgs-unstable, secrets, user, system, inputs, ...}:
{ rice, user, ... }:
# browser.tabs.allow_transparent_browser
{
home.file = with rice.color; let
blur = builtins.toString 20;
in {
".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ ''
:root{
/* Popup panels */
--arrowpanel-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--arrowpanel-border-color : ${border} !important;
--arrowpanel-color : ${secondary.base} !important;
--arrowpanel-dimmed : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important;
--arrowpanel-dimmed-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.6) !important;
--arrowpanel-dimmed-even-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.8) !important;
# xdg.mimeApps.defaultApplications = {
# "text/html" = ["firefox.desktop"];
# "text/xml" = ["firefox.desktop"];
# "x-scheme-handler/http" = ["firefox.desktop"];
# "x-scheme-handler/https" = ["firefox.desktop"];
# };
/* Autocomplete */
--autocomplete-popup-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--autocomplete-popup-color : ${foreground} !important;
--autocomplete-popup-highlight-background: ${accent.base} !important;
--autocomplete-popup-highlight-color : ${foreground} !important;
/* Toolbar background */
--toolbar-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important;
--toolbar-non-lwt-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--toolbar-non-lwt-bgimage : none !important;
--toolbar-color : ${foreground} !important;
/* Tabs */
--tab-selected-bgcolor : ${accent.base} !important;
--tabs-border-color : ${border} !important;
--tab-line-color : ${accent.base} !important;
--tab-loader-size : 16px !important;
/* Sidebar */
--lwt-sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--lwt-sidebar-text-color : ${foreground} !important;
--sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--sidebar-text-color : ${foreground} !important;
--sidebar-border-color : ${border} !important;
/* URL bar */
--urlbar-popup-url-color : ${foreground} !important;
--urlbar-popup-action-color : ${secondary.base} !important;
--toolbar-field-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--toolbar-field-focus-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--toolbar-field-color : ${accent.base} !important;
--toolbar-field-focus-color : ${foreground} !important;
--toolbar-field-focus-border-color : ${accent.base} !important;
/* Buttons */
--toolbarbutton-icon-fill : ${foreground} !important;
--toolbarbutton-hover-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.2) !important;
--toolbarbutton-active-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.4) !important;
/* Notification and panel */
--panel-disabled-color : rgba(${rice.lib.hex-to-rgb-comma-string foreground},0.3) !important;
--panel-separator-color : ${border} !important;
/* New tab page */
--newtab-background-color : ${background} !important;
--newtab-background-color-secondary : ${background} !important;
--newtab-text-primary-color : ${foreground} !important;
--newtab-text-secondary-color : ${secondary.base} !important;
--newtab-search-icon-color : ${accent.base} !important;
--tabpanel-background-color : transparent !important;
background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
}
.tabbrowser-tab[selected="true"] {
color: ${background} !important;
}
#appcontent {
background: transparent !important;
}
#navigator-toolbox {
--tabs-border-color: transparent !important;
}
#toolbar-menubar, #TabsToolbar, #PersonalToolbar, #navigator-toolbox, #sidebar-box {
background-color: transparent !important;
-moz-appearance: none !important;
background-image: none !important;
}
window, #nav-bar{
background-color: transparent !important;
-moz-appearance: none !important;
background-image: none !important;
}
'';
".mozilla/firefox/${user}/chrome/userContent.css".text = /* css */ ''
/* Removes the white loading page */
/* url(about:newtab), url(about:home) */
@-moz-document url(about:blank) {
html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay {
background: ${background} !important;
}
}
/* Sets up minimal incognito scrollbar */
@-moz-document url(about:privatebrowsing) {
:root{
scrollbar-width: thin !important;
scrollbar-color: rgb(161, 161, 161) transparent !important;
}
}
/* new-tab */
@-moz-document url-prefix(about:home), url-prefix(about:newtab) {
body, html {
background: transparent !important;
}
}
@-moz-document domain(youtube.com) {
#background, #chips-wrapper, ytd-mini-guide-entry-renderer {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
border: ${builtins.toString rice.border-width} solid ${border};
}
body, html, ytd-app, ytd-mini-guide-renderer, div#content-container, #guide-content.ytd-app, #guide-wrapper, div#contentContainer {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
}
@-moz-document domain(reddit.com) {
header {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
}
body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree{
background-color: transparent !important;
}
}
@-moz-document domain(reddit.com) {
header {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(20px);
}
body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{
background-color: transparent !important;
}
}
@-moz-document domain(google.com) {
.sfbg {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
}
body, html, div#search > * {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
.g, .appbar {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
div#rso {
* {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
}
div#cnt > div {
}
}
@-moz-document domain(github.com) {
body, html, header, #repository-container-header, .bgColor-muted, section {
background-color: transparent !important;
}
}
@-moz-document domain(mynixos.com) {
body, html {
background-color: transparent !important;
}
header, footer {
background-color: rgba(0,0,0,0.5) !important;
border-radius: ${builtins.toString rice.rounding}px;
}
}
@-moz-document domain(moodle.informatik.tu-darmstadt.de) {
body, html , .main-inner, .main-inner * {
background-color: transparent !important;
}
.bg-primary {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.5) !important!
}
}
@-moz-document domain(nx2.site) {
html {
background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important;
background-repeat: repeat !important;
background-size: 2vmin 2vmin !important;
}
}
'';
};
}

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, rice, user, ... }:
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
fish
@@ -51,10 +50,12 @@ lib.mkIf (user != "tv")
nf = "neofetch";
nxf = "nxfetch";
nn = "nano";
m = "micro";
hxx = "hx .";
p = "python";
ipy = "ipython";
c = "codium";
cc = "codium .";
code = "codium";
g = "git";
lzg = "lazygit";
# gst = "git status";
@@ -79,9 +80,8 @@ lib.mkIf (user != "tv")
lzd = "lazydocker";
d = "docker";
dcmp = "docker compose";
nxsent = ''sent -c \${rice.color.foreground} -b \${rice.color.background}'';
# nxsent = ''sent -c \${rice.color.foreground} -b \${rice.color.background}'';
code = "codium";
# ya = "yazi"; # function
# nxfiglet = "figlet";
};
@@ -89,9 +89,17 @@ lib.mkIf (user != "tv")
set -g fish_greeting
if not set -q IN_NIX_SHELL
nxfetch
# yazi
if set -q SESSION_FROM_DE
set -e SESSION_FROM_DE
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
end
rm -f -- "$tmp"
end
end
# ${pkgs.starship}/bin/starship init fish | source
# ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
'';
functions = {
# gpg = '';

View File

@@ -1,32 +1,16 @@
{ config, pkgs, lib, host, ... }:
{ pkgs, lib, host, ... }:
lib.mkIf (host == "NxXPS")
{
home.packages = [
pkgs.libinput-gestures
pkgs.ydotool
home.packages = with pkgs; [
libinput-gestures
];
home.file.".config/libinput/gestures".text = ''
home.file.".config/libinput-gestures.conf".text = ''
# Swipe threshold (0-100)
swipe_threshold 0
# Gestures
gesture swipe left 3 echo key k:276 | dotool
gesture swipe right 3 echo key k:275 | dotool
gesture swipe right 3 ydotool key 158:1 158:0 # back
gesture swipe left 3 ydotool key 159:1 159:0 # forward
'';
# systemd.user.services = {
# ydotoold = {
# Unit = {
# Description = "An auto-input utility for wayland";
# Documentation = [ "man:ydotool(1)" "man:ydotoold(8)" ];
# };
# Service = {
# ExecStart = "/run/current-system/sw/bin/ydotoold --socket-path /tmp/ydotool_socket ";
# };
# Install = {
# WantedBy = ["default.target"];
# };
# };
# };
}

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, user, rice, ... }:
lib.mkIf (user != "tv")
{ pkgs, rice, ... }:
{
home.packages = with pkgs; [
git
@@ -11,9 +10,7 @@ lib.mkIf (user != "tv")
# List of directories to check
directories=(
"$HOME/nix-dots"
"$HOME/shared/nx-obsidian-vault"
"$HOME/shared/HSMW/Praxis/BCAM/bolt-llmserver"
"$HOME/shared/HSMW/Praxis/BCAM/bcam-tools"
"$HOME/obsidian-vault"
"$HOME/Pictures/wallpapers"
)
echo ""
@@ -56,13 +53,19 @@ lib.mkIf (user != "tv")
windowSize = "normal";
gui.theme = with rice.color; {
lightTheme = false;
activeBorderColor = [ border "bold"];
inactiveBorderColor = [ black.bright ];
optionsTextColor = [ blue.base ];
selectedLineBgColor = [ foreground ];
selectedRangeByColor = [ magenta.bright ];
activeBorderColor = [ foreground "bold" ];
inactiveBorderColor = [ border ];
optionsTextColor = [ tertiary.base ];
selectedLineBgColor = [ secondary.base ];
selectedRangeByColor = [ weird.bright ];
showRandomTip = true;
animateExplosion = true;
cherryPickedCommitFgColor = [ accent.base ]; # Foreground color of copied commit
cherryPickedCommitBgColor = [ secondary.dark ]; # Background color of copied commit
markedBaseCommitFgColor = [ accent.base ]; # Foreground color of marked base commit (for rebase)
markedBaseCommitBgColor = [ secondary.dark ]; # Background color of marked base commit (for rebase)
unstagedChangesColor = [ negative.base ]; # Color for file with unstaged changes
defaultFgColor = [ "default" ]; # Default text color
};
};
};

View File

@@ -1,15 +1,17 @@
{ pkgs, pkgs-unstable, ... }:
{
# there also is a system module
home.packages = with pkgs; [
home.packages = (with pkgs; [
gnupg
gpg-tui
] ++ ( with pkgs-unstable; [
]) ++ ( with pkgs-unstable; [
pinentry-all
]);
# services.pcscd.enable = true;
services.gpg-agent = {
services.gpg-agent = let
min2sec = min: (min * 60);
in {
enable = true;
verbose = true;
sshKeys = [
@@ -17,7 +19,9 @@
];
enableSshSupport = true;
enableFishIntegration = true;
# pinentryPackage = pkgs.pinentry-gtk2;
defaultCacheTtlSsh = min2sec 60;
defaultCacheTtl = min2sec 30;
# pinentryPackage = pkgs.pinentry-curses;
};
home.file.".gnupg/gpg.conf".text = ''

View File

@@ -1,22 +1,27 @@
{ config, pkgs, pkgs-unstable, lib, user, ... }:
let
theme-name = "Catppuccin-Macchiato-Compact-Pink-Dark";
{ config, pkgs, lib, rice, user, ... }: let
# theme-name = "Colloid-Pink-Dark-Compact";
# theme-package = pkgs.colloid-gtk-theme.override {
# themeVariants = [ "pink" ];
# colorVariants = [ "dark" ];
# sizeVariants = [ "compact" ];
# tweaks = [ "black" ];
# };
theme-name = "catppuccin-macchiato-pink-compact+rimless,black";
theme-package = pkgs.catppuccin-gtk.override {
accents = [ "pink" ];
size = "compact";
tweaks = [ "rimless" "black" ];
variant = "macchiato";
};
in
lib.mkIf (user != "tv")
{
in {
home.packages = with pkgs; [
# gnome.gnome-themes-extra
# gnome.adwaita-icon-theme
gnome.gnome-tweaks
gtk3
gtk4
catppuccin-gtk
# catppuccin-gtk
bibata-cursors
] ++ [
# pkgs-unstable.themix-gui
];
@@ -36,25 +41,18 @@ lib.mkIf (user != "tv")
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
cursorTheme = {
name = "Catppuccin-Mocha-Pink-Cursors";
package = pkgs.catppuccin-cursors.mochaPink;
size = 20;
};
cursorTheme = rice.cursor;
};
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.catppuccin-cursors.mochaPeach;
name = "Catppuccin-Mocha-Pink-Cursors";
size = 20;
};
} // rice.cursor;
xdg.configFile = {
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
"gtk-4.0/assets".source = "${theme-package}/share/themes/${theme-name}/gtk-4.0/assets";
"gtk-4.0/gtk.css".source = "${theme-package}/share/themes/${theme-name}/gtk-4.0/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${theme-package}/share/themes/${theme-name}/gtk-4.0/gtk-dark.css";
};

View File

@@ -1,13 +1,21 @@
{ pkgs, pkgs-unstable, rice, ... }:
{ pkgs, pkgs-unstable,lib, rice, ... }:
{
home = {
packages = with pkgs; [
nixfmt # nix formater
nil # nix language server
# nixfmt-classic # nix formater
# nil # nix language server
# nixd # specified in nixd.nix
python311Packages.python-lsp-server
ruff
ruff-lsp
pyright
lldb # debugger for llvm stuff
yaml-language-server # yaml
marksman # markdown
vale-ls # style-checker lsp (needs vale)
ltex-ls # Ltex (language tool)
] ++ (with pkgs-unstable; [
bash-language-server
helix
]);
sessionVariables = {
@@ -54,12 +62,99 @@
};
};
keys.normal = {
C-g = [":new" ":insert-output lazygit" ":buffer-close!" ":redraw"];
"C-g" = [ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ];
"A-`" = [ "no_op" ];
"`" = [ "no_op" ];
};
keys.normal."ö" = {
"s" = [ "switch_case" ];
"u" = [ "switch_to_uppercase" ];
"l" = [ "switch_to_lowercase" ];
};
};
languages.language = [{
languages = {
language = [
{
name = "nix";
language-servers = [ "nixd" "nil" ];
}
{
name = "latex";
language-servers = [ "texlab" "language-tool" ];
}
{
name = "markdown";
# language-servers = [ "marksman" "style-check" "language-tool" ];
language-servers = [ "language-tool" "marksman" ];
file-types = [ "md" "MD" ];
scope = "text.<name>";
}
{
name = "python";
language-servers = [ "pyright" "ruff" ];
formatter = {
command = "ruff";
args = [
"format"
"--line-length"
"120"
"-"
];
};
debugger = {
name = "debugpy";
transport = "stdio";
command = "python";
args = [ "-m" "debugpy.adapter" ];
templates = [{
name = "source";
request = "launch";
completion = [{
name = "entrypoint";
completion = "filename";
default = ".";
}];
args = {
mode = "debug";
program = "{0}";
};
}];
};
}
];
language-server = {
"nixd" = {
command = "nixd";
};
"style-check" = {
command = lib.getExe pkgs.vale-ls;
};
"language-tool" = {
command = "${pkgs.ltex-ls}/bin/ltex-ls";
};
"ruff" = {
command = "ruff-lsp";
config.settings.args = [
# Set line length
# "--line-length"
# "79"
# Enable some ruff rules
# "--select"
# (
# "F,W,E,I,N,D200,D201,D202,D203,D204,D205,D206,D207,D208,D209,D210,D211,"
# + "D212,D213,D214,D215,D300,D301,D400,D401,D402,D403,D404,D405,D406,"
# + "D407,D408,D409,D410,D411,D412,D413,D414,D415,D416,D417,D418,D419,"
# + "UP,YTT,TRIO,ASYNC,B,A,COM,C4,DTZ,T10,DJ,EXE,FA,ISC,ICN001,G010,"
# + "G101,G201,G202,INP,PIE,Q,RSE,RET,SLOT,SIM,TCH,INT,ARG,PTH,TD001,"
# + "TD004,TD005,TD006,TD007,PD,PL,TRY004,TRY200,TRY201,TRY302,TRY400,"
# + "TRY401,FLY,NPY,AIR,PERF,FURB,LOG,RUF"
# )
];
};
};
};
themes = {
base16 = with rice.color; {
"attributes" = foreground;
@@ -70,7 +165,7 @@
"constant" = accent.bright;
"constant.character.escape" = special.bright;
"constant.numeric" = foreground;
"constructor" = blue.dark;
"constructor" = weird.base;
"debug" = yellow.base;
"diagnostic.modifiers" = [ "underlined" ];
"diff.delta" = blue.bright;
@@ -80,13 +175,13 @@
"function" = secondary.bright;
"hint" = tertiary.bright;
"info" = foreground;
"keyword" = secondary.base;
"keyword" = special.base;
"label" = foreground;
"namespace" = weird.bright;
"operator" = foreground;
"special" = special.base;
"string" = secondary.bright;
"type" = red.dark;
"type" = red.base;
"variable" = accent.base;
"variableother.member" = foreground;
"warning" = red.base;
@@ -146,7 +241,7 @@
};
"ui.cursor.match" = { # Matching bracket etc.
"bg" = green.dark;
"modifiers" = [ "reversed" ];
"modifiers" = [ ];
};
"ui.gutter" = {
"bg" = black.base;
@@ -210,7 +305,8 @@
"fg" = black.bright;
};
"ui.virtual.inlay-hint" = {
"fg" = black.bright;
"fg" = weird.bright;
"bg" = weird.dark;
};
"ui.virtual.ruler" = {
"bg" = background;

View File

@@ -1,11 +1,8 @@
{pkgs-unstable, lib, user, ... }:
lib.mkIf (user != "tv")
{ pkgs, ... }:
{
home.packages = [
pkgs-unstable.hyprland-autoname-workspaces
];
home.file.".config/hyprland-autoname-workspaces/config.toml".text = ''
home = {
packages = with pkgs; [ hyprland-autoname-workspaces ];
file.".config/hyprland-autoname-workspaces/config.toml".text = ''
version = "1.1.14"
[class]
@@ -49,11 +46,13 @@ lib.mkIf (user != "tv")
"leagueclientux.exe" = "󰰌"
zathura = "󰈦"
code-oss = "󰨞"
codium-url-handler = "󰨞"
discord = "󰙯"
vesktop = "󰙯"
blueman-manager = "󰂯"
Alacritty = ""
zoom = "󰬡"
spotify = ""
[class_active]
"(?i)ExampleOneTerm" = "icon"
@@ -74,6 +73,9 @@ lib.mkIf (user != "tv")
[initial_title_in_class]
[initial_title]
"Spotify Premium" = ""
[initial_title_in_class_active]
[initial_title_in_initial_class]
@@ -101,4 +103,5 @@ lib.mkIf (user != "tv")
client_dup_active = "*{icon}*{delim}{icon}{counter_unfocused_sup}"
client_dup_fullscreen = "[{icon}]{delim}{icon}{counter_unfocused_sup}"
'';
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, inputs, host, user, nvidia, rice, lib, ... }:
{config, pkgs, pkgs-unstable, inputs, host, user, nvidia, rice, lib, ... }:
let
animation-speed = "5";
transparency = builtins.toString rice.transparency;
@@ -42,27 +42,28 @@ let
name = "HDMI-A-1";
resolution = "3840x2160";
position = "0x0";
scale = "1.0";
scale = "2.0";
};
};
};
in
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
in {
home.packages = (with pkgs; [
# hyprland itself is a system package
hyprland-protocols
hyprlock
hypridle
hyprcursor
grim
slurp
] ++ (with pkgs-unstable; [
# ]) ++ (with pkgs-unstable; [
]) ++ (with inputs; [
hyprswitch.packages.x86_64-linux.default
]);
wayland.windowManager.hyprland = {
enable = true;
# package = pkgs-unstable.hyprland;
@@ -143,6 +144,8 @@ lib.mkIf (user != "tv")
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"WLR_NO_HARDWARE_CURSORS,1"
"HYPRCURSOR_THEME,${config.gtk.cursorTheme.name}"
"HYPRCURSOR_SIZE,${toString config.gtk.cursorTheme.size}"
] else [];
input = {
@@ -159,8 +162,8 @@ lib.mkIf (user != "tv")
gaps_in = builtins.div rice.gap-size 2;
gaps_out = rice.gap-size;
border_size = rice.border-width;
"col.active_border" = "rgba(${rice.lib.nohash rice.color.border}ff) rgba(${rice.lib.nohash rice.color.border2}ff) 90deg";
"col.inactive_border" = "rgba(${rice.lib.nohash rice.color.background}ff) rgba(${rice.lib.nohash rice.color.border2}ff) 90deg";
"col.active_border" = "rgba(${rice.lib.nohash rice.color.border2}ff) rgba(${rice.lib.nohash rice.color.border}ff) 90deg";
"col.inactive_border" = "rgba(${rice.lib.nohash rice.color.background}ff) rgba(${rice.lib.nohash rice.color.border}ff) 90deg";
# cursor_inactive_timeout = 10;
@@ -225,12 +228,11 @@ lib.mkIf (user != "tv")
dwindle = {
preserve_split = true; # you probably want this
no_gaps_when_only = false;
no_gaps_when_only = true;
};
master = {
new_is_master = true;
};
# master = {
# };
misc = {
disable_hyprland_logo = true;
@@ -239,18 +241,17 @@ lib.mkIf (user != "tv")
};
exec-once = [
"hyprpm reload -n "
"waybar "
"hyprpaper -n "
"swww init"
"= /home/nx2/scripts/swww-randomize.sh"
"waybar"
"swww-daemon"
"hyprland-autoname-workspaces"
"/usr/lib/polkit-kde-authentication-agent-1 "
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"syncthing -no-browser"
"mako"
"ibus engine xkb:de::deu"
"fcitx5"
# "ibus engine xkb:de::deu"
"libinput-gestures"
# "hyprswitch --daemon"
];
windowrulev2 = [
@@ -264,10 +265,10 @@ lib.mkIf (user != "tv")
"opacity ${transparency}, code-oss"
"opacity ${transparency}, VSCodium"
"opacity ${transparency}, Code"
"opacity ${transparency}, sent"
# "opacity ${transparency}, sent"
"opacity ${transparency}, neovide"
"opacity ${transparency}, obsidian"
"opacity ${transparency}, zathura"
# "opacity ${transparency}, zathura"
# "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Alacritty"
# "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Kitty"
"opacity ${transparency}, discord"
@@ -294,6 +295,7 @@ lib.mkIf (user != "tv")
"float, title:^(Compact folders)$"
"tile, sent"
"fullscreen, wlogout"
"fullscreen, sent"
"workspace 14, lutris"
"workspace 100, title:^(Apex Legends)$"
"workspace 100, ^(cyberpunk2077.exe)$"
@@ -328,9 +330,11 @@ lib.mkIf (user != "tv")
# "SUPER, F4,"
"SUPER, F5, exec, nx_gcal_event force-lookup"
"SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate"
# "SUPER, F6,"
"SUPER, F6, exec, kitty -e 'htop'"
"SUPER, F7, exec, kitty -e 'nmtui'"
''SUPER, F8, exec, find ~/Pictures/wallpapers/* -type f -not -path "~/Pictures/wallpapers/.git/*" | sort -R | head -n 1 | xargs swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120''
# "SUPER, F9, hyprload,reload"
''SUPER, F9, exec, kitty -e sh -c 'change_colors_json $(swww query | sed -n 1p | sed -e "s-.*image: --g") && nh home switch && firefox /home/${user}/.config/color-pallete.html' ''
''SUPER SHIFT, F9, exec, firefox /home/${user}/.config/color-pallete.html ''
# "SUPER, F10, hyprload,update"
"SUPER, F11, exec, waybar"
"SUPER SHIFT, F11, exec, pkill waybar "
@@ -373,6 +377,7 @@ lib.mkIf (user != "tv")
# "SUPER, TAB, overview:toggle"
# "SUPER, TAB, hyprexpo:expo, toggle"
"ALT, TAB, focuscurrentorlast"
# "SUPER, TAB, exec, hyprswitch --daemon"
"SUPER, Q, killactive"
"SUPER, W, exec, waybar_mode set '󰈹 '"
"SUPER, W, submap, browserSM "
@@ -380,11 +385,13 @@ lib.mkIf (user != "tv")
"SUPER, R, exec, rofi -show drun"
# "SUPER, T, exec, alacritty"
# "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace""
"SUPER, T, exec, kitty"
"SUPER, T, exec, SESSION_FROM_DE=TRUE kitty"
"SUPER SHIFT, T, exec, kitty -e sh -c 'ssh nxace'"
# "SUPER, Z, "
"SUPER, U, exec, thunderbird "
"SUPER, I, exec, kitty -e fish -c 'hx ~/nix-dots/ && fish'"
"SUPER SHIFT, I, exec, kitty -e fish -c 'nh home switch || read'"
"SUPER CTRL, I, exec, kitty -e fish -c 'nh os switch || read'"
"SUPER, O, exec, obsidian "
"SUPER, P, pin "
# "SUPER, Ü,"
@@ -451,8 +458,8 @@ lib.mkIf (user != "tv")
## MEGA KEYS:
'' , Print, exec, grim -g "$(slurp)"''
"SUPER, Next, resizeactive, 100 -100"
"SUPER, Prior, resizeactive, -100 100"
# "SUPER, Next, resizeactive, 5% 5%" # binde
# "SUPER, Prior, resizeactive, -5% -5%" # binde
###########################################################################
## FN KEYS:
@@ -482,6 +489,11 @@ lib.mkIf (user != "tv")
bindl = [
# ",switch:on:Lid Switch, exec, hyprlock &"
];
binde = [
# "SUPER, TAB, exec, hyprswitch --daemon --do-initial-execute"
"SUPER, Next, resizeactive, 10% 10%"
"SUPER, Prior, resizeactive, -10% -10%"
];
};
@@ -818,6 +830,56 @@ lib.mkIf (user != "tv")
showEmptyWorkspace = false
}
}
# allows repeated switching with same keypress that starts the submap
binde = SUPER, TAB, exec, hyprswitch --daemon --do-initial-execute
bind = SUPER, TAB, submap, switch
bind = SUPER, TAB, exec, waybar_mode set "sw"
# allows repeated switching with same keypress that starts the submap
binde = SUPER SHIFT, TAB, exec, hyprswitch --daemon --do-initial-execute -r
bind = SUPER SHIFT, TAB, submap, switch
bind = SUPER, TAB, exec, waybar_mode set "swr"
submap = switch
# allow repeated window switching in submap (same keys as repeating while starting)
binde = SUPER, TAB, exec, hyprswitch --daemon
binde = SUPER SHIFT, TAB, exec, hyprswitch --daemon -r
# switch to specific window offset
bind = , 1, exec, hyprswitch --daemon --offset=1
bind = , 2, exec, hyprswitch --daemon --offset=2
bind = , 3, exec, hyprswitch --daemon --offset=3
bind = , 4, exec, hyprswitch --daemon --offset=4
bind = , 5, exec, hyprswitch --daemon --offset=5
bind = , 6, exec, hyprswitch --daemon --offset=6
bind = , 7, exec, hyprswitch --daemon --offset=7
bind = , 8, exec, hyprswitch --daemon --offset=8
bind = , 8, exec, hyprswitch --daemon --offset=8
bind = , 9, exec, hyprswitch --daemon --offset=9
bind = SUPER $reverse, 1, exec, hyprswitch --daemon --offset=1 -r
bind = SUPER $reverse, 2, exec, hyprswitch --daemon --offset=2 -r
bind = SUPER $reverse, 3, exec, hyprswitch --daemon --offset=3 -r
bind = SUPER $reverse, 4, exec, hyprswitch --daemon --offset=4 -r
bind = SUPER $reverse, 5, exec, hyprswitch --daemon --offset=5 -r
bind = SUPER $reverse, 6, exec, hyprswitch --daemon --offset=6 -r
bind = SUPER $reverse, 7, exec, hyprswitch --daemon --offset=7 -r
bind = SUPER $reverse, 8, exec, hyprswitch --daemon --offset=8 -r
bind = SUPER $reverse, 9, exec, hyprswitch --daemon --offset=9 -r
bind = SUPER $reverse, 5, exec, hyprswitch --daemon --offset=5 -r
# exit submap and stop hyprswitch
bindrt = SUPER, SUPER_L, exec, hyprswitch --stop-daemon
bindrt = SUPER, SUPER_L, submap, reset
bindrt = SUPER, SUPER_L, exec, waybar_mode unset
# if it somehow doesn't close on releasing $switch_release, escape can kill
bindr = ,escape, exec, pkill hyprswitch
bindr = ,escape, submap, reset
submap = reset
'';
};

View File

@@ -1,36 +1,31 @@
{ config, pkgs, rice, lib, user, ... }:
lib.mkIf (user != "tv")
{ rice, ... }:
{
home.packages = with pkgs; [
kitty
];
programs.kitty = {
enable = true;
font = {
name = rice.font.code.name2;
package = rice.font.code.package;
};
settings = {
background = rice.color.background;
foreground = rice.color.foreground;
cursor = rice.color.foreground;
color0 = rice.color.black.base;
color8 = rice.color.black.bright;
color1 = rice.color.red.base;
color9 = rice.color.red.bright;
color2 = rice.color.green.base;
color10 = rice.color.green.bright;
color3 = rice.color.yellow.base;
color11 = rice.color.yellow.bright;
color4 = rice.color.blue.base;
color12 = rice.color.blue.bright;
color5 = rice.color.magenta.base;
color13 = rice.color.magenta.bright;
color6 = rice.color.cyan.base;
color14 = rice.color.cyan.bright;
color7 = rice.color.white.base;
color15 = rice.color.white.bright;
settings = with rice.color; {
background = background;
foreground = foreground;
cursor = foreground;
color0 = black.base;
color8 = black.bright;
color1 = red.base;
color9 = red.bright;
color2 = green.base;
color10 = green.bright;
color3 = yellow.base;
color11 = yellow.bright;
color4 = blue.base;
color12 = blue.bright;
color5 = magenta.base;
color13 = magenta.bright;
color6 = cyan.base;
color14 = cyan.bright;
color7 = white.base;
color15 = white.bright;
background_opacity = builtins.toString rice.transparency;
window_padding_width = 5;
remember_window_size = false;

View File

@@ -2,6 +2,7 @@
lib.mkIf (host != "NxACE")
{
home.packages = with pkgs; [
texlab # LSP
(texlive.combine { inherit (texlive) scheme-full xifthen ifmtarg framed paralist titlesec xcolor; })
];
}

View File

@@ -1,10 +1,6 @@
{ pkgs, rice, lib, user, ... }:
lib.mkIf (user != "tv")
{ pkgs, rice, ... }:
{
home.packages = [
pkgs.mako
pkgs.libnotify
];
home.packages = with pkgs; [ libnotify ];
services.mako = with rice; {
enable = true;
defaultTimeout = 5000; # in ms
@@ -14,7 +10,7 @@ lib.mkIf (user != "tv")
borderSize = border-width;
font = font.code.name2;
borderRadius = rounding;
anchor = "bottom-right";
anchor = "top-right";
margin = builtins.toString (gap-size * 2) ;
};
}

87
home-modules/matrix.nix Normal file
View File

@@ -0,0 +1,87 @@
{ pkgs, host, ... }:
{
home.packages = with pkgs; [
# cinny-desktop
(weechat.override {
configure = { availablePlugins, ... }: {
scripts = with pkgs.weechatScripts; [
weechat-matrix
];
};
})
];
sops.secrets."weechat/passphrase" = { path = "%r/secrets/weechat/passphrase"; };
home.file = {
".config/weechat/sec.conf".text = ''
[crypt]
cipher = aes256
hash_algo = sha256
passphrase_command = "cat $XDG_RUNTIME_DIR/secrets/weechat/passphrase"
salt = on
[data]
__passphrase__ = on
matrix_nx2site_password = "AD1FDBA557C3C2BA41A0BAAD43FBE91E35830A7779A82DE4C3C34204133459512B2008E83A5FDDA9C1209F9DEF833819DF5E9726AEB01162B421864DD3F08F4F9900DADB"
'';
".config/weechat/matrix.conf".text = ''
[network]
autoreconnect_delay_growing = 2
autoreconnect_delay_max = 600
debug_buffer = off
debug_category = all
debug_level = error
fetch_backlog_on_pgup = on
lag_min_show = 500
lag_reconnect = 90
lazy_load_room_users = off
max_backlog_sync_events = 10
max_initial_sync_events = 30
max_nicklist_users = 5000
print_unconfirmed_messages = on
read_markers_conditions = "''${markers_enabled}"
resending_ignores_devices = on
typing_notice_conditions = "''${typing_enabled}"
[look]
bar_item_typing_notice_prefix = "Typing: "
busy_sign = ""
code_block_margin = 2
code_blocks = on
disconnect_sign = ""
encrypted_room_sign = "🔐"
encryption_warning_sign = " "
human_buffer_names = off
markdown_input = on
max_typing_notice_item_length = 50
new_channel_position = none
pygments_style = "native"
quote_wrap = 67
redactions = strikethrough
server_buffer = merge_with_core
[color]
error_message_bg = default
error_message_fg = darkgray
nick_prefixes = "admin=lightgreen;mod=lightgreen;power=yellow"
quote_bg = default
quote_fg = lightgreen
unconfirmed_message_bg = default
unconfirmed_message_fg = darkgray
untagged_code_bg = default
untagged_code_fg = blue
[server]
nx2site.autoconnect = off
nx2site.address = "nx2.site"
nx2site.port = 443
nx2site.proxy = ""
nx2site.ssl_verify = on
nx2site.username = "nx2"
nx2site.password = "''${sec.data.matrix_nx2site_password}"
nx2site.device_name = "Weechat@${host}"
nx2site.autoreconnect_delay = 10
nx2site.sso_helper_listening_port = 0
'';
};
}

6
home-modules/nixd.nix Normal file
View File

@@ -0,0 +1,6 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
nixd
];
}

35
home-modules/nvidia.nix Normal file
View File

@@ -0,0 +1,35 @@
{ pkgs, lib, nvidia, ... }:
lib.mkIf (nvidia.enable == true)
{
home = {
packages = with pkgs; [
nvtopPackages.full
];
sessionVariables = {
NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
WLR_NO_HARDWARE_CURSORS = "1"; # Fix cursor rendering issue on wlr nvidia.
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "Hyprland";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
LIBVA_DRIVER_NAME = "nvidia";
__GL_GSYNC_ALLOWED = "1";
__GL_VRR_ALLOWED = "0";
WLR_DRM_NO_ATOMIC = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORM = "wayland";
QT_QPA_PLATFORMTHEME = "qt5ct";
GDK_SCALE = "2";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NVD_BACKEND = "direct";
};
};
}

View File

@@ -1,9 +1,6 @@
{ config, pkgs, secrets, lib, user, ... }:
let
{ config, pkgs, secrets, ... }: let
sep = " ";
in
lib.mkIf (user != "tv")
{
in {
home = {
file."${config.xdg.dataHome}/nx-gcal-event-credentials.json".text = ''
{
@@ -26,7 +23,7 @@ lib.mkIf (user != "tv")
# (pkgs.python311.withPackages (python-pkgs: [
# python-pkgs.google
# ]))
(writeScriptBin "nx_gcal_event" ''
(writeScriptBin "nx_gcal_event" /* python */ ''
#!${pkgs.python3}/bin/python3
import datetime
import os

99
home-modules/nx2site.nix Normal file
View File

@@ -0,0 +1,99 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
(writeShellApplication {
name = "nxmd";
text = let
ascii_size = (pkgs.writers.writePython3Bin "ascii_size" {
# libraries = with pkgs.python311Packages; [ ];
flakeIgnore = [];
} /* python */ ''
from sys import argv
with open(argv[1], "r", encoding='utf-8') as f:
raw = f.read()
sraw = raw.split("\n")
linestart = 0
lineend = 0
started = False
for linenum in range(len(sraw)):
if sraw[linenum].strip() == "```ascii":
linestart = linenum
started = True
if started and sraw[linenum].strip() == "```":
lineend = linenum
break
maxwidth = 0
for linenum in range(linestart, lineend):
linewidth = len(sraw[linenum])
if linewidth > maxwidth:
maxwidth = linewidth
print(f"Maximum length of the `ascii` code clock is {maxwidth} characters.")
px = (1 / maxwidth) * 1500
vw = (1 / maxwidth) * 150
snew = sraw
snew[3] = "aaw: " + str(round(vw, 2))
snew[4] = "aawm: " + str(round(px, 2))
new = "\n".join(snew)
with open(argv[1], "w", encoding='utf-8') as f:
f.write(new)
print(f"The resulting font sizes are {px}px (aawm) and {vw}vw (aam).")
print(f"You can now use the push operation on {argv[1]}.")
''
);
in /* bash */ ''
ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}')
nxdate="$(date +'%A the ')"
nxdate="$nxdate""$ord"
nxdate="$nxdate""$(date +' of %B %Y')"
if [[ $# -eq 0 ]]; then
echo "Error: No arguments provided."
echo "Usage: $0 push <markdown-file>"
exit 1
fi
if [[ "$1" == "push" ]]; then
if [[ ! "$2" =~ \.md$ ]]; then
echo "Error: Second argument must be a markdown (.md) file"
echo "Usage: $0 push <markdown-file>"
exit 1
fi
pandoc \
"$2" \
--highlight-style=breezeDark \
--standalone \
--mathjax \
--ascii \
--template /var/nginx/assets/template.html \
--metadata pdate="$nxdate" \
--verbose --from markdown-markdown_in_html_blocks+raw_html \
-o /var/nginx/webroot/"$(basename "$2" .md )".html
echo pushed "$2"
elif [[ "$1" == "ascii-size" ]]; then
if [[ ! "$2" =~ \.md$ ]]; then
echo "Error: Second argument must be a markdown (.md) file"
echo "Usage: $0 ascii-size <markdown-file>"
exit 1
fi
${ascii_size}/bin/ascii_size "$2"
else
echo "Error: First argument must be 'push'"
echo "Usage: $0 push <markdown-file>"
exit 1
fi
'';
})
];
}

View File

@@ -1,5 +1,4 @@
{ config, pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
libreoffice

37
home-modules/ollama.nix Normal file
View File

@@ -0,0 +1,37 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
(writers.writePython3Bin "ooo" {
libraries = [ pkgs.python3Packages.ollama ];
flakeIgnore = [ "E501" "E305" "E701" "E704" "E302" "E114" "F841" "E121" ];
} /* python */ ''
import sys
import ollama
if len(sys.argv) < 2:
print("Usage: ./ooo.py <system_message>")
sys.exit(1)
system_message = sys.argv[1]
input_text = sys.stdin.read()
try:
response = ollama.chat(model='llama3.1:8b', messages=[
{
'role': 'system',
'content': "You are a text transformer. Follow the folling instruction:\n\n" + system_message + "\n\nOnly output the transformed text. Do not add any addidional conversation around the output. Just the result.",
},
{
'role': 'user',
'content': input_text,
},
])
print(response['message']['content'])
sys.exit(0)
except Exception as e:
print(f"An error occurred: {e}", file=sys.stderr)
sys.exit(1)
'')
];
}

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, system, user, host, allowed, secrets, ... }:
{ pkgs, lib, host, secrets, ... }:
lib.mkIf (host != "NxACE")
{
home.packages = [
@@ -22,9 +22,9 @@ lib.mkIf (host != "NxACE")
".vpn/ljk-pnx-pass.txt".text = secrets.pnxVpn.pass;
# Remmina
".local/share/remmina/pnx_rdp_srv-phoe3-vmdms_192-168-1-104.remmina".source = ./pnx/pnx_rdp_srv-phoe3-vmdms_192-168-1-104.remmina;
".local/share/remmina/pnx_rdp_srv-phoenix-3_192-168-1-108.remmina".source = ./pnx/pnx_rdp_srv-phoenix-3_192-168-1-108.remmina;
".local/share/remmina/pnx_rdp_srv-phoenix2_192-168-1-101.remmina".source = ./pnx/pnx_rdp_srv-phoenix2_192-168-1-101.remmina;
".local/share/remmina/pnx_rdp_srv-remote_192-168-1-21.remmina".source = ./pnx/pnx_rdp_srv-remote_192-168-1-21.remmina;
".local/share/remmina/pnx_rdp_srv-phoe3-vmdms_192-168-1-104.remmina".source = ./assets/pnx/pnx_rdp_srv-phoe3-vmdms_192-168-1-104.remmina;
".local/share/remmina/pnx_rdp_srv-phoenix-3_192-168-1-108.remmina".source = ./assets/pnx/pnx_rdp_srv-phoenix-3_192-168-1-108.remmina;
".local/share/remmina/pnx_rdp_srv-phoenix2_192-168-1-101.remmina".source = ./assets/pnx/pnx_rdp_srv-phoenix2_192-168-1-101.remmina;
".local/share/remmina/pnx_rdp_srv-remote_192-168-1-21.remmina".source = ./assets/pnx/pnx_rdp_srv-remote_192-168-1-21.remmina;
};
}

View File

@@ -2,13 +2,16 @@
{
home = {
packages = with pkgs; [
libclang
glibc
# clang-tools
glibc_multi
glib
gcc
# pkgsi686Linux.glibc
clang-tools
];
sessionVariables = {
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib:${pkgs.glibc.dev}/include";
C_INCLUDE_PATH = "${pkgs.llvmPackages.libclang.lib}/lib:${pkgs.glibc.dev}/include";
sessionVariables = with pkgs; {
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib:${pkgs.glibc.dev}/include:${glibc_multi.dev}/include";
C_INCLUDE_PATH = "${llvmPackages.libclang.lib}/lib:${pkgs.glibc.dev}/include:${glibc_multi.dev}/include";
CLANG_RESOURCE_DIR = "${llvmPackages.clang-unwrapped}";
};
};
}

View File

@@ -1,7 +1,10 @@
{ pkgs, ... }:
{ pkgs, pkgs-unstable, lib, host, ... }:
lib.mkIf (host != "NxACE")
{
home.packages = with pkgs; [
gleam
erlang
];
rebar3
] ++ (with pkgs-unstable; [
gleam
]);
}

View File

@@ -1,19 +1,20 @@
{ config, pkgs, lib, user, ... }:
let
{ pkgs, ... }:
{
home = let
python-with-packages = pkgs.python3.withPackages (pp: with pp; [
ipython
pipdeptree
requests
google google-api-python-client google-auth-httplib2 google-auth-oauthlib
debugpy
black
]);
in
lib.mkIf (user != "tv")
{
home.packages = [
in {
packages = [
python-with-packages
];
home.sessionVariables = {
sessionVariables = {
PYTHONPATH = "${python-with-packages}/${python-with-packages.sitePackages}";
};
};
}

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{
qt = {
platformTheme = "gtk";

View File

@@ -1,13 +1,11 @@
{ config, pkgs, rice, lib, user, ... }:
let
trdr = "${rice.lib.float-to-drune rice.transparency}";
in
lib.mkIf (user != "tv")
{
{ pkgs, rice, ... }: {
home.packages = with pkgs; [
rofi-wayland
];
home.file.".config/rofi/config.rasi".text = ''
home.file = let
trdr = "${rice.lib.float-to-drune rice.transparency}";
in with rice.color; {
".config/rofi/config.rasi".text = ''
configuration {
show-icons: false;
display-drun: "";
@@ -17,8 +15,8 @@ lib.mkIf (user != "tv")
* {
font: "${rice.font.code.name2} 12";
foreground: ${rice.color.foreground};
background-color: ${rice.color.background}${trdr};
foreground: ${foreground};
background-color: ${background}${trdr};
padding: 0px;
margin: 0px;
spacing: 0px;
@@ -26,10 +24,10 @@ lib.mkIf (user != "tv")
}
#window {
background-color: ${rice.color.background}${trdr};
background-color: ${background}${trdr};
border: ${builtins.toString rice.border-width}px;
border-radius: ${builtins.toString rice.rounding};
border-color: ${rice.color.blue.base};
border-color: ${border};
}
#mainbox {
border: 0;
@@ -39,7 +37,7 @@ lib.mkIf (user != "tv")
border: 0px;
}
#textbox {
text-color: ${rice.color.foreground};
text-color: ${foreground};
}
#listview {
fixed-height: 0;
@@ -53,12 +51,13 @@ lib.mkIf (user != "tv")
#element {
border: 0;
padding: 0px ;
padding: 0px;
border-radius: ${if rice.rounding > 0 then "2" else "0"}px;
}
#element.normal.normal { background-color: ${rice.color.background}${trdr}; text-color: ${rice.color.foreground}; }
#element.selected.normal { background-color: ${rice.color.blue.base}${trdr}; text-color: ${rice.color.background}; }
#element.alternate.normal { background-color: ${rice.color.black.base}${trdr}; text-color: ${rice.color.foreground}; }
#element.normal.normal { background-color: ${background}${trdr}; text-color: ${accent.base}; }
#element.selected.normal { background-color: ${tertiary.base}${trdr}; text-color: ${background}; }
#element.alternate.normal { background-color: ${background}${trdr}; text-color: ${secondary.base}; }
#scrollbar {
@@ -71,35 +70,36 @@ lib.mkIf (user != "tv")
border: ${builtins.toString rice.border-width}px dash;
}
#button.selected {
text-color: ${rice.color.foreground};
text-color: ${foreground};
}
#inputbar {
spacing: 0;
text-color: ${rice.color.background};
background-color: ${rice.color.red.base}${trdr};
text-color: ${background};
background-color: ${accent.base}${trdr};
padding: 0;
margine-bottom: 2px;
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#prompt {
spacing: 0;
background-color: transparent;
text-color: ${rice.color.foreground};
text-color: ${foreground};
}
#textbox-prompt-colon {
expand: false;
str: ">";
margin: 0px 0.3em 0em 0em ;
text-color: ${rice.color.background};
text-color: ${background};
background-color: transparent;
}
#case-indicator {
spacing: 0;
text-color: ${rice.color.foreground};
text-color: ${foreground};
background-color: transparent;
}
#entry {
spacing: 0;
text-color: ${rice.color.background};
text-color: ${background};
background-color: transparent;
placeholder: "";
}
@@ -109,4 +109,5 @@ lib.mkIf (user != "tv")
text-color: inherit;
}
'';
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, rice, user, ... }:
{ pkgs, rice, ... }:
let
my-sent = pkgs.sent.override {
patches = [
@@ -11,25 +11,14 @@ in
{
home = {
packages = [
# pkgs.sent
my-sent
];
file.".local/share/sent.patch".text = ''
diff --git a/config.def.h b/config.def.h
index 60eb376..64e7f05 100644
--- a/config.def.h
+++ b/config.def.h
@@ -9,8 +9,8 @@ static char *fontfallbacks[] = {
#define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */
static const char *colors[] = {
- "#000000", /* foreground color */
- "#FFFFFF", /* background color */
+ "${rice.color.foreground}", /* foreground color */
+ "${rice.color.background}", /* background color */
};
static const float linespacing = 1.4;
(pkgs.writeShellApplication {
name = "nxsent";
text = with rice.color; let
in /* bash */ ''
echo "$@" | sent -c "${accent.base}" -b "${background}"
'';
})
];
};
}

View File

@@ -1,15 +1,10 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
lib.mkIf (user != "tv")
{ pkgs, domain, ... }:
{
home.packages = with pkgs; [
sshfs
];
home.file.".ssh/config".text = ''
home = {
packages = with pkgs; [ sshfs ];
file.".ssh/config".text = ''
HOST nxace
HostName nx2.site
HostName ssh.${domain}
User nx2
Port 50022
@@ -18,19 +13,15 @@ lib.mkIf (user != "tv")
User nx2
Port 50022
HOST nxrpi
HostName nx2.site
User pi
Port 50023
HOST nxrpil
HostName 192.168.178.31
User pi
Port 50023
User nx2
Port 22
HOST nxgit
HostName git.nx2.site
HostName ssh.${domain}
User git
Port 20022
'';
};
}

View File

@@ -1,10 +1,5 @@
{ pkgs, lib, user, rice, ... }:
lib.mkIf (user != "tv")
{ lib, rice, ... }:
{
home.packages = [
pkgs.starship
];
programs.starship = {
enable = true;
# enableBashIntegration = true;

18
home-modules/tts.nix Executable file
View File

@@ -0,0 +1,18 @@
{ pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
(writeShellApplication {
name = "ttss";
text = let
cmd = inp: "piper -m /home/nx2/tts/en_GB-cori-high.onnx --output_raw ${inp} | ffmpeg -hide_banner -loglevel error -f s16le -ar 22050 -ac 1 -i - -f wav - | mpv -";
in /* bash */ ''
if [ -p /dev/stdin ]; then
${cmd "</dev/stdin"}
else
${cmd ''<<< "$@"''}
fi
'';
})
];
}

17
home-modules/vale.nix Normal file
View File

@@ -0,0 +1,17 @@
{ pkgs, ... }: let
vws = pkgs.vale.withStyles (s: [ s.alex s.google ]);
in {
home = {
packages = [
vws
];
file.".config/vale/.vale.ini".text = ''
StylesPath = ${vws}/share/vale/styles/
MinAlertLevel = suggestion
[*]
BasedOnStyles = alex, Google
'';
};
}

View File

@@ -44,6 +44,12 @@
version = "2.8.0";
sha256 = "sha256-mT2P1lEdW66YkDRN6fi0rmmvvyBfXiJjAUHns8a8ipE=";
}
{
name = "dancehelix";
publisher = "silverquark";
version = "0.5.16";
sha256 = "sha256-oHwtlbB18ctEnfStDOpJ+2/Kq41JZog8FVhTa1/s7m0=";
}
# {
# name = "remote-ssh-edit";
# publisher = "ms-vscode-remote";

View File

@@ -0,0 +1,149 @@
{ pkgs-unstable, ... }:
{
home.packages = with pkgs-unstable; [
(writers.writePython3Bin "change_colors_json" {
libraries = with python3Packages; [ numpy pillow scikit-learn ];
flakeIgnore = [ "E302" "E305" "E226" "E501" ];
} /*python */ ''
from colorsys import hls_to_rgb, rgb_to_hls
import json
import sys
from typing import Literal, cast
from numpy.typing import NDArray
from sklearn.cluster import KMeans
import numpy as np
from PIL import Image
def fc(c: int) -> str:
assert c < 256
s = str(hex(c))[2:]
if c < 16:
return "0" + s
elif len(s) == 1:
return s + s
else:
return s
class Color(object):
def __init__(self, rgb: tuple[int, ...], frequency: float):
assert len(rgb) == 3, "RGB values must be a tuple of length 3"
self.rgb = cast(tuple[int, int, int], rgb)
self.freq: float = frequency
def __lt__(self, other: "Color") -> bool:
return self.freq < other.freq
@property
def hls(self) -> tuple[float, float, float]:
return rgb_to_hls(r=self.rgb[0] / 255, g=self.rgb[1] / 255, b=self.rgb[2] / 255)
@property
def luminance(self) -> float:
return np.dot(np.array([0.2126, 0.7152, 0.0722]), self.rgb)
def k_means_extraction(arr: NDArray[float], height: int, width: int, palette_size: int) -> list[Color]:
arr = np.reshape(arr, (width * height, -1))
model = KMeans(n_clusters=palette_size, n_init="auto", init="k-means++", random_state=2024)
labels = model.fit_predict(arr)
palette = np.array(model.cluster_centers_, dtype=int)
color_count = np.bincount(labels)
color_frequency = color_count / float(np.sum(color_count))
colors = []
for color, freq in zip(palette, color_frequency):
colors.append(Color(color, freq))
return colors
class Palette:
def __init__(self, colors: list[Color]):
self.colors = colors
self.frequencies = [c.freq for c in colors]
def __getitem__(self, item: int) -> Color:
return self.colors[item]
def __len__(self) -> int:
return self.number_of_colors
def ensure_color(c: Color, alter_sat: bool) -> list[int]:
hue, lum, sat = c.hls
if alter_sat:
new_sat = min((sat**0.5) + 0.4, 1)
else:
new_sat = sat
new_lum = max(lum, 0.5)
r, g, b = hls_to_rgb(h=hue, l=new_lum, s=new_sat)
return [int(r*255), int(g*255), int(b*255)]
def list_to_hex(ilist: list[int]) -> str:
return f"#{fc(ilist[0])}{fc(ilist[1])}{fc(ilist[2])}"
def alter_hue(ilist: list[int], hue: int) -> list[int]:
assert hue >= 0 and hue <= 360
r, g, b = ilist
h, l, s = rgb_to_hls((r/255), (g/255), (b/255))
new_hue = (((h*360) + hue) % 360) / 360
r, g, b = hls_to_rgb(h=new_hue, l=l, s=s)
return [int(r*255), int(g*255), int(b*255)]
def alter_l(ilist: list[int], l_in_1_0: float) -> list[int]:
assert l_in_1_0 >= 0 and l_in_1_0 <= 1
r, g, b = ilist
h, _, s = rgb_to_hls((r/255), (g/255), (b/255))
r, g, b = hls_to_rgb(h=h, l=l_in_1_0, s=s)
return [int(r*255), int(g*255), int(b*255)]
def extract_colors(
image: str,
palette_size: int = 5,
resize: bool = True,
sort_mode: Literal["luminance", "frequency"] | None = None,
) -> Palette:
img = Image.open(image).convert("RGB")
# open the image
img = img.resize((256, 256))
width, height = img.size
arr = np.asarray(img)
colors = k_means_extraction(arr, height, width, palette_size)
if sort_mode == "luminance":
colors.sort(key=lambda c: c.luminance, reverse=False)
else:
colors.sort(reverse=True)
return Palette(colors)
if __name__ == "__main__":
img = sys.argv[1]
palette = extract_colors(image=img, palette_size=3)
accent = ensure_color(c=palette[0], alter_sat=False)
secondary = ensure_color(c=palette[1], alter_sat=True)
tertiary = ensure_color(c=palette[2], alter_sat=False)
weird = alter_hue(ilist=accent, hue=80)
special = alter_hue(ilist=accent, hue=180)
foreground = alter_l(accent, 0.9)
background = alter_l(accent, 0.1)
d = {
"base": {
"foreground": list_to_hex(foreground),
"background": list_to_hex(background)
},
"to_alter": {
"accent": list_to_hex(accent),
"secondary": list_to_hex(secondary),
"tertiary": list_to_hex(tertiary),
"special": list_to_hex(special),
"weird": list_to_hex(weird)
}
}
with open("/home/nx2/nix-dots/flake-modules/colors.json", "w") as f:
f.write(json.dumps(d, indent=4))
'')
];
}

View File

@@ -1,12 +1,9 @@
{ config, lib, pkgs, pkgs-unstable, user, rice, ... }:
let
{ lib, pkgs, user, rice, ... }: let
sep = " ";
in
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
(pkgs.writeShellScriptBin "waybar_mode" ''
#!/usr/bin/env bash
in {
home.packages =
let
waybar_mode_script = /*bash*/ ''
print_help() {
echo "Usage: waybar_mode {set <string>|unset}"
}
@@ -36,23 +33,24 @@ lib.mkIf (user != "tv")
;;
esac
exit 0
'')
(pkgs.writeShellScriptBin "cclock" ''
#!/bin/bash
#ord=$(date +"%e" | awk '{printf("%d%s\n", $1, substr("thstndrd", ($1%100-20)%10*2+1, 2))}')
'';
cclock_script = /*bash*/ ''
ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}')
if [ $# -eq 0 ]; then
echo "󰃮${sep}$(date +'%A the')" "$ord" "of" "$(date +'%B')" " ${sep}$(date +'%R')"
elif [ "$1" = "--no-icons" ]; then
echo "$(date +'%A the')" "$ord" "of" "$(date +'%B')" "$(date +'%R')"
fi
'')
] ++ [ pkgs-unstable.waybar ];
'';
in
with pkgs; [
(writeShellApplication { name = "waybar_mode"; text = waybar_mode_script;})
(writeShellApplication { name = "cclock"; text = cclock_script;})
];
programs.waybar = {
enable = true;
package = pkgs-unstable.waybar;
package = pkgs.waybar;
settings = {
bar = {
# height = 20;
@@ -99,10 +97,10 @@ lib.mkIf (user != "tv")
exec = "cclock";
restart-interval = 60;
};
"custom/ctimeremaining" = {
exec = "nx_gcal_event lookup";
restart-interval = 60;
};
# "custom/ctimeremaining" = {
# exec = "nx_gcal_event lookup";
# restart-interval = 60;
# };
"custom/mode" = {
exec = "cat /tmp/waybar-mode";
interval = "once";
@@ -163,7 +161,7 @@ lib.mkIf (user != "tv")
};
};
};
style = ''
style = with rice.color; let f = rice.lib.hex-to-rgb-comma-string; in ''
* {
font-family: ${rice.font.code.name2};
font-size: 1em;
@@ -173,17 +171,16 @@ lib.mkIf (user != "tv")
}
window#waybar {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.background},${builtins.toString rice.transparency});
background-color: rgba(${f background},${builtins.toString rice.transparency});
transition-duration: 5s;
transition-property: background-color;
/* border: ${builtins.toString rice.border-width}px solid rgb(${rice.lib.hex-to-rgb-comma-string rice.color.border}); */
/* border: ${builtins.toString rice.border-width}px solid rgb(${f border}); */
/* margin: ${builtins.toString rice.gap-size}px; */
/* border-radius: ${builtins.toString rice.rounding}px; */
}
#clock,
#custom-cclock,
#custom-ctimeremaining,
#custom-mode,
#battery,
#cpu,
@@ -198,54 +195,54 @@ lib.mkIf (user != "tv")
padding: 0px 3px;
margin-top: 0.3em;
border-radius: ${builtins.toString rice.rounding}px;
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.accent.bright});
color: rgb(${f accent.bright});
}
#workspaces button {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.white.dark});
color: rgb(${f accent.base});
padding-left: 15px;
padding-right: 15px;
border-radius: ${builtins.toString rice.rounding}px;
}
#workspaces button.active {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.background});
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.accent.base},${builtins.toString rice.transparency});
color: rgb(${f background});
background-color: rgba(${f accent.base},${builtins.toString rice.transparency});
}
#workspaces button:hover {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.tertiary.bright});
color: rgb(${f tertiary.bright});
}
#workspaces button.urgent {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.magenta.base},${builtins.toString rice.transparency});
background-color: rgba(${f magenta.base},${builtins.toString rice.transparency});
}
#custom-mode {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.base});
color: rgb(${f red.base});
}
#window, #custom-ctimeremaining {
font-family: ${rice.font.base.name}, ${rice.font.code.name2};
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.tertiary.bright});
color: rgb(${f tertiary.bright});
}
#wireplumber.muted {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.tertiary.bright});
color: rgb(${f tertiary.bright});
}
#wireplumber {
padding-left: 10px;
}
#battery.warning:not(.charging) {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green.base});;
color: rgb(${f green.base});;
}
#battery.critical {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.dark});;
background: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.bright});
color: rgb(${f red.dark});;
background: rgb(${f red.bright});
}
#battery.charging { color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green.base}); }
#battery.charging { color: rgb(${f green.base}); }
'';
#battery.critical:not(.charging) {

View File

@@ -1,11 +1,9 @@
{ config, pkgs, lib, user, rice,... }:
lib.mkIf (user != "tv")
{ pkgs, rice,... }:
{
home.packages = with pkgs; [
wlogout
];
home.file.".config/wlogout/style.css".text = ''
home = {
packages = with pkgs; [ wlogout ];
file = {
".config/wlogout/style.css".text = /* css */ ''
* { all: unset; }
window {
@@ -25,15 +23,14 @@ lib.mkIf (user != "tv")
}
button:hover {
color: ${rice.color.blue.base} ;
color: ${rice.color.blue.base};
}
button:focus {
color: ${rice.color.blue.base} ;
color: ${rice.color.blue.base};
}
'';
home.file.".config/wlogout/layout".text = ''
".config/wlogout/layout".text = /* json */ ''
{
"label": "lock",
"action": "hyprlock",
@@ -83,16 +80,6 @@ lib.mkIf (user != "tv")
"keybind": "h"
}
'';
# lock { background-image: image(url("./lock.png")); }
# lock:focus { background-image: image(url("./lock-hover.png")); }
# logout { background-image: image(url("./logout.png")); }
# logout:focus { background-image: image(url("./logout-hover.png")); }
# suspend { background-image: image(url("./suspend.png")); }
# suspend:focus { background-image: image(url("./suspend-hover.png")); }
# shutdown { background-image: image(url("./power.png")); }
# shutdown:focus { background-image: image(url("./power-hover.png")); }
# reboot { background-image: image(url("./restart.png")); }
# reboot:focus { background-image: image(url("./restart-hover.png")); }
# hibernate { background-image: image(url("./hibernate.png")); }
# hibernate:hover { background-image: image(url("./hibernate-hover.png"));}
};
};
}

View File

@@ -1,16 +1,15 @@
{ pkgs, lib, system, user, inputs, ... }:
lib.mkIf (user != "tv")
{ pkgs, system, rice, inputs, ... }:
{
home.packages = with pkgs; [
yazi
# yazi
dragon
unar
];
programs.yazi = {
enable = true;
# package = inputs.yazi.packages.${system}.default;
package = inputs.yazi.packages.${system}.default;
enableFishIntegration = true;
settings = {
manager = {
@@ -28,58 +27,80 @@ lib.mkIf (user != "tv")
];
};
opener = {
edit = [
"edit" = [
{ run = ''hx "$@"''; desc = "helix"; block = true;}
{ run = ''codium "$@"''; orphan = true;}
{ run = ''nano "$@"''; desc = "nano"; block = true;}
];
play = [
"play" = [
{ run = ''mpv "$@"''; }
{ run = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; desc = "Show mediainfo";}
];
archive = [
"archive" = [
{ run = ''unar "$1"''; desc = "Extract here"; }
{ run = ''tar -x "$1"''; desc = "tar -x"; }
{ run = ''unzip "$1"''; desc = "unzip"; }
];
image = [
"image" = [
{ run = ''imv "$@"''; desc = "imv";}
{ run = ''gimp "$@"''; desc = "gimp";}
{ run = ''swww img "$@"''; desc = "swww wallpaper";}
{ run = ''swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 "$@"''; desc = "swww wallpaper";}
];
font = [
"svg" = [
{ run = ''inkscape "$@"''; desc = "inkscape";}
{ run = ''firefoc "$@"''; desc = "firefox";}
];
"font" = [
{ run = ''fontpreview "$@"''; desc = "fontpreview"; }
{ run = ''fontforge "$@"''; desc = "fortforge"; }
];
document = [
"document" = [
{ run = ''zathura "$@"''; desc = "zathura"; }
{ run = ''xournal "$@"''; desc = "xournal"; }
{ run = ''firefox "$@"''; desc = "firefox"; }
];
browser = [
"browser" = [
{ run = ''firefox "$@"''; desc = "firefox"; }
{ run = ''zen "$@"''; desc = "zen"; }
{ run = ''chromium --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"''; desc = "chromium"; }
{ run = ''w3m "$@"''; desc = "w3m"; }
{ run = ''lynx "$@"''; desc = "lynx"; }
];
office = [
"office" = [
{ run = ''libreoffice "$@"''; desc = "libreoffice"; }
{ run = ''libreoffice --view "$@"''; desc = "libreoffice read-only"; }
];
shell = [
{ run = ''sh -c "$@"''; desc = "sh -c"; }
"shell" = [
{ run = ''bash -c "$@"''; desc = "bash -c"; }
{ run = ''fish -c "$@"''; desc = "fish -c"; }
{ run = ''sh -c "$@"''; desc = "sh -c"; }
];
python = [
"python" = [
{ run = ''python "$@"''; desc = "python"; }
];
"directory" = [
{ run = ''lazygit "$@"''; desc = "python"; }
];
};
open.rules = [
{ mime = "text/*"; use = "edit"; }
{ mime = "text/plain"; use = "edit"; }
{ mime = "text/html"; use = ["edit" "browser"]; }
{ mime = "text/htm"; use = ["edit" "browser"]; }
{ mime = "text/x-python"; use = "python"; }
{ mime = "text/*"; use = "edit"; }
{ mine = "inode/x-empty"; use = "edit"; }
{ mine = "inode/directory"; use = "edit"; }
{ mime = "image/*"; use = "image"; }
{ mime = "image/svg"; use = ["image" "edit"]; }
{ mime = "video/*"; use = "video"; }
{ mime = "application/x-httpd-php"; use = ["edit" "browser"]; }
{ mime = "application/json"; use = "edit"; }
{ mime = "application/ld+json"; use = "edit"; }
{ mime = "image/*"; use = "image"; }
{ mime = "image/svg"; use = ["image" "edit"]; }
{ mime = "application/pdf"; use = "document"; }
{ mime = "application/epub"; use = "document"; }
{ mime = "video/*"; use = "video"; }
{ mime = "application/vnd.oasis.opendocument.*"; use = "office"; }
{ mime = "application/vnd.ms-powerpoint"; use = "office"; }
{ mime = "application/vnd.ms-excel"; use = "office"; }
@@ -87,7 +108,6 @@ lib.mkIf (user != "tv")
{ mime = "application/rtf"; use = "office"; }
{ mime = "application/x-sh"; use = ["edit" "shell"]; }
{ mime = "application/x-python-code"; use = "python"; }
{ mime = "text/x-python"; use = "python"; }
{ mime = "application/xml"; use = "edit"; }
{ mime = "application/xul"; use = "edit"; }
{ mime = "application/x-bzip"; use = "archive"; }
@@ -99,5 +119,88 @@ lib.mkIf (user != "tv")
{ mime = "application/x-7z-compressed"; use = "archive"; }
];
};
theme = with rice.color; {
manager = {
cwd = { fg = foreground; bg = background; };
hovered = { fg = background; bg = accent.base; };
preview_hovered = { underline = false; };
find_keyword = { fg = weird.base; italic = true; };
find_position = { fg = weird.base; bg = "reset"; italic = true; };
marker_selected = { fg = accent.base; bg = accent.base; };
marker_copied = { fg = weird.base; bg = weird.base; };
marker_cut = { fg = negative.base; bg = negative.base; };
tab_active = { fg = background; bg = accent.base; };
tab_inactive = { fg = accent.base; bg = background; };
tab_width = 1;
border_symbol = "";
border_style = { fg = border; };
};
status = {
separator_open = " "; #"";
separator_close = " "; #"";
separator_style = { fg = accent.base; bg = black.base; };
mode_normal = { fg = yellow.bright; bg = yellow.dark; };
mode_select = { fg = cyan.bright; bg = cyan.dark; };
mode_unset = { fg = blue.bright; bg = blue.dark; };
progress_label = { fg = secondary.base; bold = true; };
progress_normal = { fg = accent.base; bg = black.base; };
progress_error = { fg = negative.base; bg = black.base; };
permissions_t = { fg = special.base; };
permissions_r = { fg = accent.base; };
permissions_w = { fg = secondary.base; };
permissions_x = { fg = tertiary.base; };
permissions_s = { fg = special.base; };
};
input = {
border = { fg = border; };
title = {};
value = {};
selected = { reversed = true; };
};
select = {
border = { fg = border; };
active = { fg = accent.base; };
inactive = {};
};
tasks = {
border = { fg = border2; };
title = {};
hovered = { underline = true; };
};
which = {
mask = { bg = black.base; };
cand = { fg = accent.base; };
rest = { fg = secondary.base; };
desc = { fg = tertiary.base; };
separator = " ";
separator_style = { fg = foreground; };
};
help = {
on = { fg = "#fe8019"; };
exec = { fg = "#83a598"; };
desc = { fg = "#928374"; };
hovered = { bg = "#504945"; bold = true; };
footer = { fg = "#3c3836"; bg = "#a89984"; };
};
filetype = {
rules = [
# Empty files
{ mime = "inode/x-empty"; fg = white.dark; }
{ mime = "inode/directory"; fg = accent.base; }
{ name = "*"; is = "link"; fg = tertiary.base; }
{ name = "*"; is = "orphan"; fg = negative.base; }
{ name = "*"; is = "block"; fg = special.base; }
{ name = "*"; is = "char"; fg = special.bright; }
{ name = "*"; is = "exec"; fg = secondary.base; }
{ name = "*"; is = "fifo"; fg = weird.base; }
{ name = "*"; is = "sock"; fg = weird.bright; }
{ name = "*"; is = "sticky"; fg = special.base; }
# Fallback
{ name = "*"; fg = foreground; }
];
};
};
};
}

36
home-modules/zathura.nix Normal file
View File

@@ -0,0 +1,36 @@
{ pkgs, rice, ... }:
{
programs.zathura = {
enable = true;
options = with rice.color; {
completion-bg = background;
completion-fg = foreground;
completion-highlight-bg = background;
completion-highlight-fg = accent.base;
default-bg = "rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency})";
default-fg = foreground;
highlight-active-color = "rgba(${rice.lib.hex-to-rgb-comma-string accent.base},0.5)";
highlight-color = "rgba(${rice.lib.hex-to-rgb-comma-string secondary.base},0.5)";
highlight-fg = "rgba(${rice.lib.hex-to-rgb-comma-string secondary.base},0.5)";
index-active-bg = background;
inputbar-bg = background;
inputbar-fg = foreground;
notification-bg = background;
notification-error-bg = background;
notification-error-fg = foreground;
notification-fg = foreground;
notification-warning-bg = background;
notification-warning-fg = foreground;
recolor = true;
recolor-darkcolor = foreground;
recolor-keephue = true;
recolor-lightcolor = background;
selection-clipboard = "clipboard";
statusbar-bg = black.base;
statusbar-fg = foreground;
n-completion-items = 9999999999999;
exec-command = "open";
};
};
}

View File

@@ -1,5 +1,4 @@
{ config, pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{ pkgs, ... }:
{
home.packages = [
pkgs.zoxide

131
home.nix
View File

@@ -1,85 +1,86 @@
{ config, pkgs, pkgs-unstable, lib, system, inputs, host, user, rice, allowed, secrets, ... }:
{ pkgs, pkgs-unstable, host, user, inputs, ... }:
{
imports = [
./home-modules/vscode.nix
# ./home-modules/firefox.nix
./home-modules/discord.nix
./home-modules/chatterino.nix
./home-modules/email.nix
./home-modules/bitwarden.nix
./home-modules/virt-manager.nix
./home-modules/office.nix
./home-modules/obs.nix
./home-modules/sent.nix
./home-modules/gestures.nix
./home-modules/pnx.nix
./home-modules/hyprland.nix
./home-modules/hyprland-autoname-workspaces.nix
./home-modules/waybar.nix
./home-modules/nx-gcal-event.nix
./home-modules/wlogout.nix
./home-modules/rofi.nix
./home-modules/games.nix
./home-modules/kitty.nix
./home-modules/fish.nix
./home-modules/auto-mount.nix
./home-modules/bash.nix
./home-modules/starship.nix
# ./home-modules/nvim.nix
./home-modules/helix.nix
./home-modules/yazi.nix
./home-modules/zoxide.nix
./home-modules/nh.nix
./home-modules/ssh.nix
./home-modules/gpg.nix
./home-modules/sops.nix
./home-modules/git.nix
./home-modules/mako.nix
./home-modules/gtk.nix
./home-modules/qt.nix
./home-modules/latex.nix
./home-modules/pandoc.nix
./home-modules/programming/python.nix
./home-modules/programming/c.nix
./home-modules/programming/node.nix
./home-modules/programming/gleam.nix
./home-modules/bitwarden.nix
./home-modules/chatterino.nix
./home-modules/color-pallete.nix
./home-modules/direnv.nix
./home-modules/discord.nix
./home-modules/email.nix
./home-modules/firefox.nix
./home-modules/fish.nix
# ./home-modules/foot.nix
./home-modules/games.nix
./home-modules/gestures.nix
./home-modules/git.nix
./home-modules/gpg.nix
./home-modules/gtk.nix
./home-modules/helix.nix
./home-modules/hyprland-autoname-workspaces.nix
./home-modules/hyprland.nix
./home-modules/kitty.nix
./home-modules/latex.nix
./home-modules/mako.nix
# ./home-modules/matrix.nix
# ./home-modules/nm.nix
./home-modules/nh.nix
./home-modules/nixd.nix
./home-modules/nvidia.nix
./home-modules/nx2site.nix
# ./home-modules/nx-gcal-event.nix
./home-modules/obs.nix
./home-modules/office.nix
./home-modules/ollama.nix
./home-modules/pandoc.nix
./home-modules/pnx.nix
./home-modules/programming/c.nix
./home-modules/programming/gleam.nix
./home-modules/programming/node.nix
./home-modules/programming/python.nix
./home-modules/qt.nix
./home-modules/rofi.nix
./home-modules/sent.nix
./home-modules/sops.nix
./home-modules/ssh.nix
./home-modules/starship.nix
./home-modules/tts.nix
./home-modules/vale.nix
./home-modules/virt-manager.nix
./home-modules/vscode.nix
./home-modules/wallpaper-to-colors.nix
./home-modules/waybar.nix
./home-modules/wlogout.nix
./home-modules/yazi.nix
./home-modules/zathura.nix
./home-modules/zoxide.nix
];
home.username = user;
home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05";
nixpkgs.config = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) allowed.unfree-packages;
permittedInsecurePackages = allowed.inecure-packages;
};
home.packages = with pkgs; [
chromium
zathura
# zathura
xfce.thunar
spotify
# spotify
spicetify-cli
swww playerctl
imv mpv mediainfo exiftool ffmpeg
pavucontrol fontpreview gtk2fontsel
lynx bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow
pavucontrol
fontpreview gtk2fontsel
lynx w3m browsh
bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow
brightnessctl wev
piper-tts
sssnake pipes
dig
screen
reflex
gnumake
cmake
@@ -91,16 +92,20 @@
wl-clipboard
xclip
xournal
ghostscript
inputs.zen-browser.packages."${system}".default
] ++ (with pkgs-unstable; [
obsidian
firefox
spotify
]) ++ (if host != "NxACE" then (with pkgs; [
signal-desktop
obsidian
element-desktop
zoom-us
gimp
inkscape
]) else (with pkgs; [
]) else (with pkgs-unstable; [
]));

View File

@@ -1,4 +1,4 @@
{ lib, ... }:
lib:
let
# takes in "ff0044" (no hash!) and returns { r = "ff", g = "00", b = "44" }
slice-hex = hex: with builtins; { r = substring 0 2 hex; g = substring 2 2 hex; b = substring 4 2 hex; };

File diff suppressed because one or more lines are too long

BIN
splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

7
system-modules/adb.nix Normal file
View File

@@ -0,0 +1,7 @@
{ host, lib, ... }:
lib.mkIf (host != "NxACE")
{
programs.adb = {
enable = true;
};
}

View File

@@ -0,0 +1,4 @@
{ ... }:
{
services.udisks2.enable = true;
}

View File

@@ -1,7 +1,7 @@
{ config, pkgs, host, inputs, ... }:
{ config, pkgs, pkgs-unstable, lib, host, domain, inputs, ... }:
let
grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.nx2.site";
domain = "git.${domain}";
owner = "nx2";
repo = "grub-theme-ascii-diana";
rev = "0.5.0";
@@ -17,13 +17,66 @@ in
environment.systemPackages = with pkgs; [ sbctl ];
boot = {
lanzaboote = {
lanzaboote =
let
windows-efi-shell-fs-alias = "HD0a65535a2";
in
{
enable = true;
pkiBundle = "/etc/secureboot";
};
loader.systemd-boot.enable = false; # let lanzaboote install systemd-boot
package = lib.mkForce (pkgs.writeShellApplication {
name = "lzbt";
runtimeInputs = [
inputs.lanzaboote.packages.x86_64-linux.tool
pkgs.coreutils
pkgs.sbctl
];
# https://forum.endeavouros.com/t/tutorial-add-a-systemd-boot-loader-menu-entry-for-a-windows-installation-using-a-separate-esp-partition/37431
text = /*bash*/ ''
# execute normal lanazboote functionality
lzbt "$@"
# kernelPackages = pkgs.linuxPackages_latest;
# Create windows.nsh file
ESP='${config.boot.loader.efi.efiSysMountPoint}'
echo "${windows-efi-shell-fs-alias}:EFI\Microsoft\Boot\Bootmgfw.efi" > "$ESP/windows.nsh"
# cp efi-shell boot file
# systemd-boot will automatically add an entry for it
cp -f '${pkgs.edk2-uefi-shell.efi}' "$ESP/shellx64.efi"
# should exist already
mkdir -p "$ESP/loader/entries"
# sign shell file
sbctl sign -s "$ESP/shellx64.efi"
# Create windows.conf boot entry
cat << EOF > "$ESP/loader/entries/windows.conf"
title Windows-Hack
efi /shellx64.efi
options -nointerrupt -noconsolein -noconsoleout windows.nsh
EOF
'';
});
};
loader.systemd-boot = {
enable = false; # let lanzaboote install systemd-boot
consoleMode = "max";
configurationLimit = 10;
# extraEntries = {
# "Windo7s-11.conf" = ''
# Windows eleven
# search --file --no-floppy --set=root /EFI/Microsoft/Boot/bootmgfw.efi
# chainloader (''${root})/EFI/Microsoft/Boot/bootmgfw.efi
# '';
# "Firmware.conf" = ''
# Firmware
# fwsetup
# '';
# "Shutdown.conf" = ''
# title Shutdown
# halt
# '';
# };
};
kernelPackages = pkgs-unstable.linuxPackages_zen;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "v4l2loopback" ];
extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1'';
@@ -52,22 +105,21 @@ in
'';
};
};
kernelPackages = pkgs-unstable.linuxPackages_6_10;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "v4l2loopback" ];
extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1'';
extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1'';
};
} else { # NxACE
kernelPackages = pkgs.linuxPackages_latest;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
boot.loader.grub = {
enable = true;
configurationLimit = 30;
device = "nodev";
# useOSProber = true;
efiSupport = true;
fontSize = 50;
boot = {
loader = {
efi.canTouchEfiVariables = true;
splashImage = null;
grub = {
enable = true;
device = "nodev";
efiSupport = true;
};
};
};
};
}

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, user, allowed, secrets, ... }:
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [

View File

@@ -1,42 +1,24 @@
{ pkgs, user, host, lib, ... }:
if (host != "NxACE") then
{ pkgs, user, ... }:
{
services.greetd = {
enable = true;
settings = rec {
hyprland = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland";
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland --remember-user-session --window-padding 5";
user = user;
};
default_session = hyprland;
vt = 2;
};
};
}
else
{
environment.systemPackages = with pkgs; [
sddm
# where-is-my-sddm-theme
];
services.xserver = {
displayManager = {
defaultSession = "hyprland";
sddm = {
enable = true;
# theme = "where_is_my_sddm_theme";
settings = {
theme = {
# background = /home/nx2/Pictures/
passwordFontSize = 12;
passwordInputCursorVisible = true;
};
};
};
autoLogin = lib.mkIf (host == "NxACE") {
enable = true;
user = "tv";
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
Standarderror = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
}

View File

@@ -15,6 +15,7 @@
users.users."${user}".extraGroups = [ "docker" ];
networking.firewall.allowedTCPPorts = [
80
443
8384
];
}

87
system-modules/fcitx5.nix Normal file
View File

@@ -0,0 +1,87 @@
{ pkgs, pkgs-unstable, ... }:
{
# i18n.inputMethod = {
# type = "fcitx5";
# enable = true;
# fcitx5.addons = with pkgs; [
# fcitx5-gtk # alternatively, kdePackages.fcitx5-qt
# fcitx5-chinese-addons # table input method support
# fcitx5-nord # a color theme
# ];
# };
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.waylandFrontend = true;
fcitx5.addons = with pkgs; [
fcitx5-gtk # alternatively, kdePackages.fcitx5-qt
fcitx5-chinese-addons # table input method support
fcitx5-nord # a color theme
];
};
# i18n.inputMethod = {
# enabled = "fcitx5";
# ignoreUserConfig = true;
# waylandFrontend = true;
# fcitx5 = {
# addons = with pkgs-unstable; [
# rime-data
# fcitx5-rime
# # Chinese
# fcitx5-chinese-addons
# fcitx5-table-extra
# fcitx5-pinyin-moegirl
# fcitx5-pinyin-zhwiki
# # Japanese
# # fcitx5-mozc
# ];
# settings = {
# globalOptions = {
# Hotkey = {
# # Enumerate when press trigger key repeatedly
# EnumerateWithTriggerKeys = "True";
# # Skip first input method while enumerating
# EnumerateSkipFirst = "False";
# };
# "Hotkey/EnumerateForwardKeys" = { "0" = "Control+space"; };
# "Hotkey/EnumerateBackwardKeys" = { "0" = "Control+Shift+space"; };
# "Hotkey/PrevPage" = { "0" = "Up"; };
# "Hotkey/NextPage" = { "0" = "Down"; };
# "Hotkey/PrevCandidate" = { "0" = "Shift+Tab"; };
# "Hotkey/NextCandidate" = { "0" = "Tab"; };
# Behavior = {
# ActiveByDefault = "False"; # Active By Default
# ShareInputState = "No"; # Share Input State
# PreeditEnabledByDefault = "True"; # Show preedit in application
# ShowInputMethodInformation = "True"; # Show Input Method Information when switch input method
# showInputMethodInformationWhenFocusIn = "False"; # Show Input Method Information when changing focus
# CompactInputMethodInformation = "True"; # Show compact input method information
# ShowFirstInputMethodInformation = "True"; # Show first input method information
# DefaultPageSize = "5"; # Default page size
# OverrideXkbOption = "False"; # Override Xkb Option
# PreloadInputMethod = "True"; # Preload input method to be used by default
# };
# };
# inputMethod = {
# "Groups/0" = {
# "Name" = "Default";
# "Default Layout" = "us";
# "DefaultIM" = "mozc";
# };
# "Groups/0/Items/0" = {
# "Name" = "keyboard-us";
# "Layout" = null;
# };
# "Groups/0/Items/1" = {
# "Name" = "mozc";
# "Layout" = null;
# };
# "GroupOrder" = {
# "0" = "Default";
# };
# };
# };
# };
# };
}

View File

@@ -1,7 +1,12 @@
{ config, pkgs, ...}:
{
environment.systemPackages = with pkgs; [
environment = {
systemPackages = with pkgs; [
jmtpfs
simple-mtpfs
android-file-transfer
];
};
programs.fuse.userAllowOther = true;
}

11
system-modules/gc.nix Normal file
View File

@@ -0,0 +1,11 @@
{ ... }:
{
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
settings.auto-optimise-store = true;
};
}

View File

@@ -4,12 +4,9 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
environment.systemPackages = if host == "NxNORTH" then with pkgs; [
environment.systemPackages = with pkgs; [
ntfs3g
btrfs-progs
] else if host == "NxXPS" then with pkgs; [
ntfs3g
] else [];
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
# boot.initrd.kernelModules = [ ];
@@ -19,7 +16,7 @@
fileSystems = if host != "NxACE" then {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
"/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = if host == "NxXPS" then "ntfs" else "btrfs"; };
"/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
} else {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };

View File

@@ -13,40 +13,45 @@ lib.mkIf (host != "NxACE")
systemd.services."health_reminder" =
let
hm = pkgs.writeScriptBin "health_reminder" ''
hm =
let p = /*python*/ ''
#!${pkgs.python3}/bin/python3
import random
import re
class Action:
def __init__(self, actionA: str, actionB: str, likelihood: int, options: str):
self.actionA = actionA
self.actionB = actionB
def __init__(self, action: str, likelihood: int, options: list[str] = None):
self.action = action
self.likelihood = likelihood
self.options = options
self.options = options if options is not None else []
def __str__(self):
if self.options:
return f"{self.actionA}{random.choice(self.options)}{self.actionB}"
else:
return self.actionA
try:
choice = random.choice(self.options)
except IndexError:
choice = ""
action = re.sub("%o", choice, self.action)
return action
actions = [
Action("look away for 20 Seconds!", "", 300, ""),
Action("Shrimp 3000!", "", 90, ""),
Action("Do ", " Biceps curls with each Arm! ", 5, ["50", "10", "20"]),
Action("Do ", " Shourlder thingees", 5, ["30", "50", "20"]),
Action("Plank for ", " senonds!", 5, ["60", "60", "70"]),
Action("Strech your upper body!", "", 10, ""),
Action("Strech your core!", "", 5, ""),
Action("Strech your legs!", "", 5, ""),
Action("Make Tea!", "", 5, ""),
Action("look away for %o Seconds!",300, ["10", "15"] ),
Action("Posture Check!", 90 ),
Action("Do %o Biceps curls!", 5, ["50", "100", "150"] ),
Action("Do %o Shourlder thingees", 5, ["40 + 40", "50", "60"]),
Action("Plank for %o senonds!", 5, ["60", "60", "70"] ),
Action("Strech your upper body!", 20 ),
Action("Strech your core!", 10 ),
Action("Strech your legs!", 10 ),
Action("Make Tea!", 5 ),
Action("Touch Grass!", 5 )
]
total_likelihood = sum(a.likelihood for a in actions)
random_action = random.choices(actions, [a.likelihood for a in actions], k=1)[0]
print(random_action)
'';
in pkgs.writeScriptBin "health_reminder" p;
in
{
script = ''

View File

@@ -1,24 +1,30 @@
{ pkgs, lib, host, secrets, ... }:
lib.mkIf (host != "NxACE")
{
environment.systemPackages = [
pkgs.strongswanNM
environment.systemPackages = with pkgs; [
strongswanNM
];
environment.etc = {
# Easyroam
"ssl/certs/easyroam_client_cert.pem".source = ../secrets/easyroam-hsmw/easyroam_client_cert.pem;
"ssl/certs/easyroam_root_ca.pem".source = ../secrets/easyroam-hsmw/easyroam_root_ca.pem;
"ssl/certs/easyroam_client_key.pem".source = ../secrets/easyroam-hsmw/easyroam_client_key.pem;
"NetworkManager/system-connections/eduroam.nmconnection" = {
text = secrets.easyroamHSMW.nmconfig;
mode = "0600";
# # Easyroam
# "ssl/certs/easyroam_client_cert.pem".source = ../secrets/easyroam-hsmw/easyroam_client_cert.pem;
# "ssl/certs/easyroam_root_ca.pem".source = ../secrets/easyroam-hsmw/easyroam_root_ca.pem;
# "ssl/certs/easyroam_client_key.pem".source = ../secrets/easyroam-hsmw/easyroam_client_key.pem;
# "NetworkManager/system-connections/eduroam.nmconnection" = {
# text = secrets.easyroamHSMW.nmconfig;
# mode = "0600";
# };
# "ipsec.d/hsmw.secrets".text = ''${secrets.email.hsmw.un}@hs-mittweida.de : EAP "megasecret"'';
# "ipsec.d/USERTrust-ECC.pem".source = ../secrets/vpn-hsmw/USERTrust-ECC-Certification-Authority.pem;
# "ipsec.d/USERTrust-RSA.pem".source = ../secrets/vpn-hsmw/USERTrust-RSA-Certification-Authority.pem;
};
"ipsec.d/hsmw.secrets".text = ''${secrets.email.hsmw.mail} : EAP "${secrets.email.hsmw.password}"'';
"ipsec.d/USERTrust-ECC.pem".source = ../secrets/vpn-hsmw/USERTrust-ECC-Certification-Authority.pem;
"ipsec.d/USERTrust-RSA.pem".source = ../secrets/vpn-hsmw/USERTrust-RSA-Certification-Authority.pem;
sops.secrets = {
"USERTrust/ECC" = { path = "/etc/ipsec.d/USERTrust-ECC.pem"; };
"USERTrust/RSA" = { path = "/etc/ipsec.d/USERTrust-RSA.pem"; };
"hsmw-vpn-secret" = { path = "/etc/ipsec.d/hsmw.secret"; mode = "600"; };
};
networking.networkmanager.enableStrongSwan = true;
@@ -35,13 +41,13 @@ lib.mkIf (host != "NxACE")
left = "%defaultroute";
leftid = "%any";
leftauth = "eap";
eap_identity = secrets.email.hsmw.mail;
eap_identity = "${secrets.email.hsmw.un}@hs-mittweida.de";
leftsourceip = "%config";
leftdns = "%config4";
leftfirewall = "no";
leftdns = "%config4"; # Ensure that DNS resolution works as expected
leftfirewall = "no"; # Keep firewall disabled, but manually check rules
right = "141.55.128.84";
rightid = "@vpn4.hs-mittweida.de";
rightsubnet = "0.0.0.0/0";
rightsubnet = "141.55.128.0/16"; # Split tunneling: Only route traffic for the VPN subnet
rightauth = "pubkey";
auto = "add";
};
@@ -73,7 +79,7 @@ lib.mkIf (host != "NxACE")
"openssl"
"resolve"
];
secrets = [ "/etc/ipsec.d/hsmw.secrets" ];
secrets = [ "/etc/ipsec.d/hsmw.secret" ];
ca = {
hsmw = {
auto = "add";

16
system-modules/kanata.nix Normal file
View File

@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
services.kanata = {
enable = true;
package = pkgs.kanata;
keyboards.default.config = ''
(defsrc
caps
)
(deflayer default
esc
)
'';
};
}

View File

@@ -1,12 +1,13 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host == "NxACE")
{
services.xserver.desktopManager.kodi = {
enable = true;
};
services.cage = {
user = "kodi";
program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
enable = true;
};
}
{}
# {
# services.xserver.desktopManager.kodi = {
# enable = true;
# };
# services.cage = {
# user = "kodi";
# program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
# enable = true;
# };
# }

View File

@@ -1,14 +1,32 @@
{ config, pkgs, host, ... }:
let
in
{ pkgs, lib, host, secrets, ... }:
{
# sops.secrets = {
# "wireless-networking.env" = {};
# };
networking.hostName = host;
networking.networkmanager = {
networking = {
nameservers = [
"1.1.1.1"
"8.8.8.8"
];
hostName = host;
networkmanager = {
enable = true;
};
networking.enableIPv6 = true;
enableIPv6 = true;
firewall.allowedTCPPorts = [
80
443
];
};
environment.etc = {
"ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt";
};
sops.secrets = {
"eduroam/tuda_nmconnection" = {
mode = "0600";
owner = "root";
path = "/etc/NetworkManager/system-connections/eduroam.nmconnection";
};
};
}

8
system-modules/nixd.nix Normal file
View File

@@ -0,0 +1,8 @@
{ inputs, ... }:
{
nix.nixPath = [
"nixpkgs=${inputs.nixpkgs}"
"nixpkgs-unstable=${inputs.nixpkgs-unstable}"
"nixpkgs-latest=${inputs.nixpkgs-latest}"
];
}

View File

@@ -1,11 +1,8 @@
{ config, pkgs, pkgs-unstable, lib, nvidia, ... }:
let
in
{ config, pkgs, lib, nvidia, ... }:
lib.mkIf nvidia.enable
{
config = lib.mkIf nvidia.enable {
environment.systemPackages = with pkgs; [
lshw
nvtop
glxinfo
(pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
@@ -14,7 +11,7 @@ in
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
'')
] ++ [
# ] ++ [
# pkgs-unstable.nvtopPackages.intel
# pkgs-unstable.nvtopPackages.nvidia
];
@@ -44,7 +41,7 @@ in
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = true;
powerManagement.finegrained = nvidia.prime;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
@@ -60,13 +57,11 @@ in
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
package = config.boot.kernelPackages.nvidiaPackages.beta; };
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
};
};
}

View File

@@ -1,28 +1,186 @@
{ config, pkgs, lib, user, host, ... }:
{ config, pkgs, domain, secrets, ... }:
{
imports = if host == "NxACE" then [
sops.secrets = {
"nx2site/namecheap.pw" = { };
# "nx2site/cloudflare/api-token-dns-edit" = { };
"nx2site/cloudflare/global-api-key" = { };
};
] else [];
config = lib.mkIf (host == "NxACE") {
systemd = {
timers."namecheap-dynamic-dns" = {
timers."dynamic-dns" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "2m";
OnUnitActiveSec = "10m";
Unit = "namecheap-dynamic-dns.service";
Unit = "dynamic-dns.service";
};
};
services."namecheap-dynamic-dns" = {
services."dynamic-dns" = let
u = let
account_id = secrets.email.gmail-online.mail;
zone_id = "33fecab36e060f49d492127345ea95a0";
record_id = {
base = "58d3412e8d88889d1a611b3669f0700f";
sub = "fc861353142bc05d5dbad1799178e6a1";
base6 = "d1b90e21d2d747dcb30448bd65312927";
sub6 = "b8082b7afe9e80971fc9f9dda16ec284";
};
passord-file-path = config.sops.secrets."nx2site/cloudflare/global-api-key".path;
log-file-path = "/var/log/couldflare.log";
count-file-path = "/var/log/cloudflare-count.txt";
in pkgs.writers.writePython3Bin "dyn_dns" {
libraries = with pkgs.python311Packages; [ requests ];
flakeIgnore = [ "E501" "E305" "E701" "E704" "E302" "E114" "F841" "E121" "E261" "E303"];
} /* python */ ''
import requests
import subprocess
from datetime import datetime
def get_public_ip(ipv6=False):
return subprocess.run(['${pkgs.curl}/bin/curl', '-s', '-6' if ipv6 else '-4', 'https://ifconfig.me'], capture_output=True, text=True).stdout.strip()
def main():
my_ip = get_public_ip()
my_ip6 = get_public_ip(ipv6=True)
with open("${count-file-path}", "r") as f:
content = f.read()
if content == "": count = 0
else: count = int(content)
count += 1
with open("${count-file-path}", "w") as f:
f.write(str(count))
# 4
with open("${passord-file-path}", 'r') as pw_file:
pw = pw_file.read().strip()
# Perform DNS updates
# https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record
resp_base = requests.patch(
'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/${record_id.base}',
headers={
'Content-Type': 'application/json',
'X-Auth-Email': '${account_id}',
'X-Auth-Key': pw
},
json={
"comment": "Domain verification record",
"name": "${domain}",
"proxied": True,
"settings": {},
"tags": [],
"ttl": 1, # automatic
"content": my_ip,
"type": "A"
}
)
resp_subd = requests.patch(
'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/${record_id.sub}',
headers={
'Content-Type': 'application/json',
'X-Auth-Email': '${account_id}',
'X-Auth-Key': pw
},
json={
"comment": "Domain verification record",
"name": "${domain}",
"proxied": True,
"settings": {},
"tags": [],
"ttl": 1, # automatic
"content": my_ip,
"type": "A"
}
)
if resp_base.status_code != 200:
print(resp_base.text)
now_str = datetime.now().strftime('%Y/%m/%d-%R')
log_entry = f"At {now_str} - to {my_ip} - Response {resp_base.status_code}\n"
print(log_entry, end="")
with open("${log-file-path}", 'a') as log_file:
log_file.write(log_entry)
# Perform DNS updates
# https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record
resp_base = requests.patch(
'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/${record_id.base6}',
headers={
'Content-Type': 'application/json',
'X-Auth-Email': '${account_id}',
'X-Auth-Key': pw
},
json={
"comment": "Domain verification record",
"name": "${domain}",
"proxied": True,
"settings": {},
"tags": [],
"ttl": 1, # automatic
"content": my_ip6,
"type": "AAAA"
}
)
resp_subd = requests.patch(
'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/${record_id.sub6}',
headers={
'Content-Type': 'application/json',
'X-Auth-Email': '${account_id}',
'X-Auth-Key': pw
},
json={
"comment": "Domain verification record",
"name": "${domain}",
"proxied": True,
"settings": {},
"tags": [],
"ttl": 1, # automatic
"content": my_ip6,
"type": "AAAA"
}
)
if resp_base.status_code != 200:
print(resp_base.text)
now_str = datetime.now().strftime('%Y/%m/%d-%R')
log_entry = f"At {now_str} - to {my_ip6} - Response {resp_base.status_code}\n"
print(log_entry, end="")
with open("${log-file-path}", 'a') as log_file: log_file.write(log_entry)
if __name__ == "__main__":
main()
'';
in {
script = ''
/home/nx2/nx2site/domain/update-namecheap.sh
set -eu
${u}/bin/dyn_dns
'';
serviceConfig = {
Type = "oneshot";
User = "nx2";
User = "root";
};
};
};
networking.hosts = { # docker network inspect nx2site_default | grep -E "Name|IPv4" | tr "\n" " " | sed -r 's- +- -g;s-\n?"Name": -\n-g' | sed -r '1d;2d;s-"(.+?)", "IPv4Address": "(.+)/16",- "\2" = [ "\1.docker" ];-g'
# "172.1.2.1" = [ "staticweb.docker" ];
# "172.1.3.1" = [ "matrix.docker" ];
# "172.1.0.9" = [ "matrixdb.docker" ];
# "172.1.4.1" = [ "matrix-ss.docker" ];
# "172.1.0.7" = [ "matrix-ssdb.docker" ];
"172.1.5.1" = [ "pw.docker" ];
"172.1.6.1" = [ "git.docker" ];
# "172.1.0.10" = [ "gitdb.docker" ];
# "172.1.7.1" = [ "nn.docker" ];
# "172.1.8.1" = [ "llm.docker" ];
# "172.1.9.1" = [ "proxy.docker" ];
# "172.1.10.1" = [ "share.docker" ];
# "172.1.11.1" = [ "odq.docker" ];
};
}

View File

@@ -0,0 +1,71 @@
{ config, pkgs-unstable, domain, ... }:
{
sops.secrets = {
"postgres-pw" = { owner = "gitea"; };
};
services.gitea = {
enable = true;
package = pkgs-unstable.gitea;
group = "gitea"; # default
user = "gitea"; # default
appName = "NxGit";
stateDir = "/var/lib/gitea"; # default
useWizard = false; # default
# camoHmacKeyFile = ;
customDir = "${config.services.gitea.stateDir}/custom"; # default
database = {
createDatabase = false; # default
host = "127.0.0.1"; # default
port = 5432;
passwordFile = config.sops.secrets."postgres-pw".path;
# path = "${config.services.gitea.stateDir}/data/gitea.db"; # default
# socket = "/run/postgresql";
socket = null;
type = "postgres";
name = "gitea"; # default
user = "gitea"; # default
};
dump = {
enable = true;
backupDir = "${config.services.gitea.stateDir}/dump"; # default
file = null; # default
interval = "daily";
type = "zip"; # default
};
extraConfig = null; # default
lfs = {
enable = false; # default
contentDir = "${config.services.gitea.stateDir}/data/lfs"; # default
};
mailerPasswordFile = null; # default
metricsTokenFile = null; # default
repositoryRoot = "${config.services.gitea.stateDir}/repositories"; # default
settings = {
log = {
LEVEL = "Info";
# LEVEL = "Error";
ROOT_PATH = "${config.services.gitea.stateDir}/log"; # default
};
i18n = {
LANGS = "en-US";
};
server = {
DISABLE_SSH = false; # default
SSH_PORT = 20022;
DOMAIN = "pw2.${domain}";
HTTP_ADDR = "http://${config.services.gitea.settings.server.DOMAIN}:${toString config.services.gitea.settings.server.HTTP_PORT}/";
HTTP_PORT = 3000; # default
PROTOCOL = "http"; # default
ROOT_URL = "https:pw2.${domain}/"; # default
STATIC_ROOT_PATH = "${config.services.gitea.stateDir}/static";
};
session = {
COOKIE_SECURE = true;
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
}

View File

@@ -0,0 +1,140 @@
{ config, pkgs, lib, domain, ... }:
{
sops.secrets = {
"nx2site/sslCertificate.pem" = { owner = config.services.nginx.user; };
"nx2site/sslCertificateKey.pem" = { owner = config.services.nginx.user; };
"nx2site/dhparams.pem" = { owner = config.services.nginx.user; };
};
security.acme = {
acceptTerms = true;
defaults = {
email = "acme@${domain}";
webroot = "/var/nginx/webroot";
group = "nginx";
};
certs = {
"${domain}" = {
extraDomainNames = builtins.map (subd: "${subd}.${domain}") [ "git" "git2" "pw" "pw2" "sync" ];
};
};
};
users.users."nginx" = {
extraGroups = [ "nginx" "acme" ];
useDefaultShell = false;
linger = true;
home = "/var/nginx/";
homeMode = "770";
createHome = true;
isSystemUser = true;
isNormalUser = false;
};
systemd.services.nginx.serviceConfig.ProtectHome = "read-only";
services.nginx = let
dl = [
{ addr = "0.0.0.0"; port = 443; ssl = true; }
{ addr = "0.0.0.0"; port = 80; ssl = false; }
{ addr = "[::0]"; port = 443; ssl = true; }
{ addr = "[::0]"; port = 80; ssl = false; }
];
in {
enable = true;
user = "nginx";
group = "nginx";
additionalModules = [];
# appendConfig = '''';
clientMaxBodySize = "20m";
defaultHTTPListenPort = 80;
defaultListenAddresses = [ "0.0.0.0" ] ++ lib.optional config.networking.enableIPv6 "[::0]";
defaultListen = dl;
defaultMimeTypes = "${pkgs.mailcap}/etc/nginx/mime.types";
defaultSSLListenPort = 443;
enableQuicBPF = true;
enableReload = true;
package = pkgs.nginxQuic;
proxyResolveWhileRunning = false;
proxyTimeout = "20s";
recommendedBrotliSettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedZstdSettings = true;
serverTokens = false;
sslDhparam = config.sops.secrets."nx2site/dhparams.pem".path;
sslProtocols = "TLSv1.2 TLSv1.3";
statusPage = false;
streamConfig = ""; # udp config
validateConfigFile = true;
virtualHosts = let
vh = {
kTLS = true;
http2 = true;
http3 = true;
http3_hq = true;
quic = true;
addSSL = true;
enableACME = true;
};
in {
"${domain}" = vh // {
root = "/var/nginx/webroot";
default = true;
listen = dl;
locations = {
"/" = {
extraConfig = ''
index index.html;
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
return 301 /$1;
}
try_files $uri $uri.html $uri/ /404.html =404;
'';
};
"~^(/ba)$" = { return = "301 /BA.pdf"; };
"/.well-known/matrix/client" = { return = "502"; };
"/.well-known/matrix/server" = { return = "502"; };
};
};
"matrix.${domain}" = {
listen = dl;
locations = { "~.*" = { return = "502"; }; };
};
"pw.${domain}" = vh // {
listen = dl;
locations = let d = "pw.docker:80"; in {
"/" = { proxyPass = "http://${d}"; };
"/admin" = { proxyPass = "http://${d}"; };
"/notifications/hub" = { proxyPass = "http://${d}"; };
"/notifications/hub/negotiate" = { proxyPass = "http://${d}"; };
};
};
"pw2.${domain}" = vh // {
listen = dl;
locations = let d = "127.0.0.1:3000"; in {
"/" = { proxyPass = "http://${d}"; };
"/admin" = { proxyPass = "http://${d}"; };
"/notifications/hub" = { proxyPass = "http://${d}"; };
"/notifications/hub/negotiate" = { proxyPass = "http://${d}"; };
};
};
"sync.${domain}" = vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:11434"; }; };
};
"git.${domain}" = vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://git.docker:3000"; }; };
};
"git2.${domain}" = vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:8222"; }; };
};
"~^(.*).${domain}$" = {
listen = dl;
root = "/var/nginx/webroot";
locations = { "~.*" = { return = "301 https://${domain}/502.html"; }; };
};
};
};
}

View File

View File

@@ -1,46 +1,22 @@
{ pkgs, lib, host, nvidia, ... }:
{
environment.systemPackages = with pkgs; [
ollama
];
# services.ollama.environmentVariables = {
# OLLAMA_ORIGINS = "*";
{ pkgs, pkgs-unstable, pkgs-latest, lib, host, nvidia, ... }:
let
p = pkgs-latest.ollama;
# p = pkgs-unstable.ollama.overrideAttrs (oldAttrs: rec {
# inherit (oldAttrs) pname;
# version = "0.3.0";
# src = pkgs.fetchFromGitHub {
# owner = "ollama";
# repo = "ollama";
# rev = "v${version}";
# hash = "sha256-69CpRAggx6a1NJq+CA9QliXuUbDgC1ERRuA3y17KVAM=";
# fetchSubmodules = true;
# };
# });
in {
environment.systemPackages = [ p ];
# systemd.services.ollama = {
# environment.OLLAMA_ORIGINS = "*";
# description = "Ollama Service";
# after = [ "network-online.target" "ollama-doesnt-respect-xdg-data-home.service" ];
# serviceConfig = {
# Type = "simple";
# # Environment = "\"XDG_DATA_HOME=/run/current-system/sw/share\"";
# ExecStart = "${pkgs.ollama}/bin/ollama serve";
# User = "ollama";
# Group = "ollama";
# Restart = "always";
# RestartSec = "3";
# };
# wantedBy = [ "default.target" ];
# };
# users.users.ollama = {
# isSystemUser = true;
# home = "/usr/share/ollama";
# shell = "/bin/false";
# group = "ollama";
# };
# users.groups.ollama = {};
# systemd.services.ollama-doesnt-respect-xdg-data-home = {
# wantedBy = ["multi-user.target"];
# script = ''
# mkdir -p /usr/share/ollama/.ollama
# chown ollama:ollama -R /usr/share/ollama
# '';
# };
services.ollama = {
package = p;
enable = true;
acceleration = lib.mkIf nvidia.enable "cuda";
listenAddress = if host == "NxACE" then "0.0.0.0:11434" else "127.0.0.1:11434";

View File

@@ -0,0 +1,83 @@
{ config, pkgs, lib, user, ... }:
{
services = {
postgresql = {
enable = true;
package = pkgs.postgresql_12;
dataDir = "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"; # default
# identMap = ''
# ${user} ${user} ${user}
# '';
enableJIT = false; # default
initdbArgs = []; # default
checkConfig = true; # default
enableTCPIP = false;
# # extraPlugins =
initialScript = null; # default
authentication = lib.mkForce ''
# TYPE DATABASE USER ADDRESS METHOD
local all all trust
host all all 127.0.0.1/32 trust #scram-sha-256
host all all ::1/128 trust #scram-sha-256
'';
# recoveryConfig = null;
ensureDatabases = [
"gitea"
# "vaultwarden"
];
settings = {
port = 5432; # default
listen_addresses = "localhost";
log_line_prefix = "[%p] "; # default
shared_preload_libraries = [ ]; # default
};
ensureUsers = [
# {
# name = "${user}";
# ensureDBOwnership = false;
# ensureClauses = {
# login = true;
# # inherit
# createdb = true;
# bypassrls = true;
# superuser = true;
# createrole = true;
# replication = true;
# };
# }
{
# as liong as there is no declarative user management you gotta set a pw by hand
# sudo -u postgres psql -c "ALTER USER gitea PASSWORD 'new-passwd';"
name = "gitea";
ensureDBOwnership = true;
}
];
};
# postgresqlBackup = {
# enable
# startAt
# location
# databases
# backupAll
# compression
# }
# postgresqlWalReceiver.receivers."main" = {
# postgresqlPackage = pkgs.postgresql_15;
# directory = /mnt/pg_wal/main/;
# slot = "main_wal_receiver";
# connection = "postgresql://user@somehost";
# compress
# extraArgs
# synchronous
# environment
# statusInterval
# };
# }
};
}

13
system-modules/qmk.nix Normal file
View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
hardware.keyboard.qmk.enable = true;
# home.packages = with pkgs; [
# via
# ];
environment.systemPackages = with pkgs; [
via
qmk
];
services.udev.packages = [ pkgs.via ];
}

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
{ config, pkgs, lib, ... }:
{
services.pipewire = {

View File

@@ -1,5 +1,10 @@
{ config, lib, user, host, secrets, ...}:
let
{
config,
lib,
user,
host,
secrets,
... }: let
# helper funcitons
conv = _: device: with device; { "${name}" = {id = id;};};
justname = devices: (builtins.map (device: device.name)) devices;
@@ -18,16 +23,17 @@ let
dirs = {
default = { name = "sync"; path = "/home/${user}/sync"; };
s21u-dcim = { name = "s21u-dcim"; path = "/vault/Pictures/Lennart"; };
diane-dcim = { name = "diane-dcim"; path = "/vault/Pictures/Diane"; };
dianesd-dcim = { name = "dianesd-dcim"; path = "/vault/Pictures/Diane-SD"; };
daniel-dcim = { name = "daniel-dcim"; path = "/vault/Pictures/Daniel"; };
tessa-dcim = { name = "tessa-dcim"; path = "/vault/Pictures/Tessa"; };
};
in
lib.mkIf (user != "tv")
{
in {
sops.secrets = {
"syncthing/${host}/cert.pem" = { owner = user; };
"syncthing/${host}/key.pem" = { owner = user; };
};
services.syncthing = with (builtins.mapAttrs conv devices); {
enable = true;
user = "${user}";
@@ -45,8 +51,7 @@ lib.mkIf (user != "tv")
) else if (host == "NxNORTH") then (
xps // ace // s21u
) else (
# north // xps // s21u // diane // daniel // tessa // georg
north // xps // s21u
north // xps // s21u // diane // daniel // tessa // georg
);
folders = with dirs; if (host == "NxXPS") then {
"${default.name}" = {
@@ -58,11 +63,31 @@ lib.mkIf (user != "tv")
path = default.path;
devices = with devices; (justname [ xps ace s21u ]);
};
} else {
} else { # NxACE
"${default.name}" = {
path = default.path;
devices = with devices; (justname [ xps north s21u ]);
};
"${s21u-dcim.name}" = {
path = s21u-dcim.path;
devices = with devices; (justname [ s21u ]);
};
"${diane-dcim.name}" = {
path = diane-dcim.path;
devices = with devices; (justname [ diane ]);
};
"${dianesd-dcim.name}" = {
path = dianesd-dcim.path;
devices = with devices; (justname [ diane ]);
};
"${daniel-dcim.name}" = {
path = daniel-dcim.path;
devices = with devices; (justname [ daniel ]);
};
"${tessa-dcim.name}" = {
path = tessa-dcim.path;
devices = with devices; (justname [ tessa ]);
};
};
gui = {
theme = "black";

View File

@@ -1,24 +1,31 @@
{ config, pkgs, lib, system, host, user, allowed, secrets, ... }:
{ pkgs, user, ... }:
{
users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
users.users."${user}" = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "audio" "video" "docker" "libvirtd" "uinput" ];
extraGroups = [
"networkmanager"
"wheel"
"audio"
"video"
"docker"
"libvirtd"
"uinput"
"input"
"ydotool"
"acme"
"nginx"
"adbusers"
"gitea"
"postgres"
];
useDefaultShell = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key
];
packages = with pkgs; []; # all in home.nix
};
users.users.tv = lib.mkIf (host == "NxACE") {
isNormalUser = true;
extraGroups = [ "networkmanager" "audio" "video" "uinput" ];
useDefaultShell = true;
packages = with pkgs; []; # all in home.nix
};
programs = {
bash = {

View File

@@ -0,0 +1,5 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host == "NxXPS")
{
programs.ydotool.enable = true;
}