Compare commits

...

137 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
90 changed files with 4279 additions and 3295 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,31 +1,49 @@
{ pkgs, pkgs-unstable, inputs, ... }: { pkgs, inputs, lib, host, ... }:
{ {
imports = [ imports = ([
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
./system-modules/adb.nix
./system-modules/auto-mount.nix
./system-modules/hardware-configuration.nix ./system-modules/hardware-configuration.nix
./system-modules/fuse.nix ./system-modules/fuse.nix
./system-modules/nvidia.nix ./system-modules/nvidia.nix
./system-modules/users.nix ./system-modules/users.nix
./system-modules/sound.nix ./system-modules/sound.nix
./system-modules/fonts.nix ./system-modules/fonts.nix
./system-modules/boot.nix
./system-modules/gc.nix
./system-modules/boot.nix ./system-modules/boot.nix
./system-modules/dm.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/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/health_reminder.nix
./system-modules/ollama.nix ./system-modules/hsmw.nix
./system-modules/nx2site.nix ./system-modules/kanata.nix
./system-modules/kodi.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. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
@@ -50,39 +68,39 @@
security.rtkit.enable = true; security.rtkit.enable = true;
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true; services.libinput.enable = true;
hardware.uinput.enable = true; hardware.uinput.enable = true;
hardware.bluetooth.enable = true; # enables support for Bluetooth hardware.bluetooth = {
hardware.bluetooth.powerOnBoot = true; # enable = true;
powerOnBoot = true;
package = pkgs.bluez5-experimental;
settings.Policy.AutoEnable = "true";
settings.General.Enable = "Source,Sink,Media,Socket";
};
services.blueman.enable = true; 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: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; ([
git git
lazygit # home-manager module is bugged
git-crypt git-crypt
lazygit # home-manager module is bugged
wget wget
curl curlHTTP3
zip zip
unzip unzip
p7zip p7zip
unar unar
nano nano
micro
htop htop
direnv direnv
openssl openssl
blueman blueman
dmidecode dmidecode
file file
] ++ (with pkgs-unstable; [ # ]) ++ (with pkgs-unstable; [
sendme # # sendme
]); ]);
environment.variables = { environment.variables = {
@@ -99,8 +117,9 @@
system.stateVersion = "24.05"; 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 = '' programs.bash.shellInit = ''
source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh 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": { "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": { "crane": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@@ -33,30 +87,23 @@
"type": "github" "type": "github"
} }
}, },
"firefox-addons": { "flake-compat": {
"inputs": { "flake": false,
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "lastModified": 1696426674,
"lastModified": 1718337800, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"narHash": "sha256-Azz2lg6WsfT4SDMTA3DtJ6hS7kox3e0buSrV4J+zMAQ=", "owner": "edolstra",
"owner": "rycee", "repo": "flake-compat",
"repo": "nur-expressions", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "aaf15fa3ed60109af8aad4cbb19c1fe28b4476ad", "type": "github"
"type": "gitlab"
}, },
"original": { "original": {
"dir": "pkgs/firefox-addons", "owner": "edolstra",
"owner": "rycee", "repo": "flake-compat",
"repo": "nur-expressions", "type": "github"
"type": "gitlab"
} }
}, },
"flake-compat": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1673956053,
@@ -73,6 +120,24 @@
} }
}, },
"flake-parts": { "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": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"lanzaboote", "lanzaboote",
@@ -94,23 +159,8 @@
} }
}, },
"flake-utils": { "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": { "inputs": {
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
@@ -126,7 +176,47 @@
"type": "github" "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": { "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": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
@@ -155,11 +245,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717527182, "lastModified": 1726989464,
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=", "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "845a5c4c073f74105022533907703441e0464bc3", "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -185,11 +275,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717181720, "lastModified": 1728669738,
"narHash": "sha256-yv+QZWsusu/NWjydkxixHC2g+tIJ9v+xkE2EiVpJj6g=", "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "9e27a2c2ceb1e0b85bd55b0afefad196056fe87c", "rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -200,20 +290,23 @@
}, },
"hyprland": { "hyprland": {
"inputs": { "inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor", "hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"hyprutils": "hyprutils", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"systems": "systems", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_2",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1718365532, "lastModified": 1729629261,
"narHash": "sha256-2wd1ytcpvnBlhTxP1O/G4PJSY3fKuTxQLDxp+kFP4Sg=", "narHash": "sha256-IJtor2qFpsZkCm4UMnCHOSosW9GXKZVOm7DILtJJgoM=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "a9d53a2252f7ec084e2487d18777e2df01c8c351", "rev": "29997ef4ba8ef0a80390e80199998d1390177454",
"revCount": 4825, "revCount": 5366,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -241,11 +334,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718111105, "lastModified": 1729596320,
"narHash": "sha256-sLGohaz+8pCce4+wehXSlwOu7c7+We4Zc1ToXGCJYfs=", "narHash": "sha256-sBPr6O2Ad916f+L7biAjmJVx4TLDITC4joKgeOT47V8=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-plugins", "repo": "hyprland-plugins",
"rev": "151102b7d7c4f61ff42f275e72008d28318dac96", "rev": "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -258,21 +351,19 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"xdph",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hyprland",
"xdph",
"systems" "systems"
] ]
}, },
"locked": { "locked": {
"lastModified": 1691753796, "lastModified": 1728345020,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", "rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -297,11 +388,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717881852, "lastModified": 1728168612,
"narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=", "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "ec6938c66253429192274d612912649a0cfe4d28", "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -310,6 +401,26 @@
"type": "github" "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": { "hyprutils": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -322,11 +433,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717881334, "lastModified": 1728941256,
"narHash": "sha256-a0inRgJhPL6v9v7RPM/rx1kbXdfe3xJA1c9z0ZkYnh4=", "narHash": "sha256-WRypmcZ2Bw94lLmcmxYokVOHPJSZ7T06V49QZ4tkZeQ=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "0693f9398ab693d89c9a0aa3b3d062dd61b7a60e", "rev": "fd4be8b9ca932f7384e454bcd923c5451ef2aa85",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -347,11 +458,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717784906, "lastModified": 1726874836,
"narHash": "sha256-YxmfxHfWed1fosaa7fC1u7XoKp1anEZU+7Lh/ojRKoM=", "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "0f30f9eca6e404130988554accbb64d1c9ec877d", "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -363,10 +474,10 @@
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"pre-commit-hooks-nix": "pre-commit-hooks-nix", "pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
@@ -387,11 +498,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1717974879, "lastModified": 1728888510,
"narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=", "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3", "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -401,7 +512,51 @@
"type": "github" "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": { "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": { "locked": {
"lastModified": 1678872516, "lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
@@ -417,29 +572,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_3": {
"locked": { "locked": {
"lastModified": 1717880976, "lastModified": 1729357638,
"narHash": "sha256-BRvSCsKtDUr83NEtbGfHLUOdDK0Cgbezj2PtcHnz+sQ=", "narHash": "sha256-66RHecx+zohbZwJVEPF7uuwHeqf8rykZTMCTqIrOew4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4913a7c3d8b8d00cb9476a6bd730ff57777f740c", "rev": "bb8c2cf7ea0dd2e18a52746b2c3a5b0c73b93c22",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "release-23.11", "ref": "release-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1718160348, "lastModified": 1729413321,
"narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=", "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "57d6973abba7ea108bac64ae7629e7431e0199b6", "rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -449,6 +604,21 @@
} }
}, },
"nixpkgs_2": { "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": { "locked": {
"lastModified": 1682741954, "lastModified": 1682741954,
"narHash": "sha256-RPZxzRu8XU0YD2WeYUFYzJy5yAvWUsxkuK+zWw+6WVk=", "narHash": "sha256-RPZxzRu8XU0YD2WeYUFYzJy5yAvWUsxkuK+zWw+6WVk=",
@@ -464,13 +634,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1718208800, "lastModified": 1729449015,
"narHash": "sha256-US1tAChvPxT52RV8GksWZS415tTS7PV42KTc2PNDBmc=", "narHash": "sha256-Gf04dXB0n4q0A9G5nTGH3zuMGr6jtJppqdeljxua1fo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cc54fb41d13736e92229c21627ea4f22199fee6b", "rev": "89172919243df199fe237ba0f776c3e3e3d72367",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -479,6 +649,62 @@
"type": "indirect" "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": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@@ -489,12 +715,12 @@
"lanzaboote", "lanzaboote",
"flake-utils" "flake-utils"
], ],
"gitignore": "gitignore", "gitignore": "gitignore_2",
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1681413034, "lastModified": 1681413034,
@@ -512,14 +738,18 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"firefox-addons": "firefox-addons", "Hyprspace": "Hyprspace",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins", "hyprland-plugins": "hyprland-plugins",
"hyprswitch": "hyprswitch",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"nixpkgs-latest": "nixpkgs-latest",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix" "sops-nix": "sops-nix",
"yazi": "yazi",
"zen-browser": "zen-browser"
} }
}, },
"rust-overlay": { "rust-overlay": {
@@ -547,19 +777,40 @@
"type": "github" "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": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_3"
}, },
"locked": { "locked": {
"lastModified": 1718137936, "lastModified": 1729587807,
"narHash": "sha256-psA+1Q5fPaK6yI3vzlLINNtb6EeXj111zQWnZYyJS9c=", "narHash": "sha256-YOc4033a/j1TbdLfkaSOSX2SrvlmuM+enIFoveNTCz4=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c279dec105dd53df13a5e57525da97905cc0f0d6", "rev": "26642e8f193f547e72d38cd4c0c4e45b49236d27",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -584,6 +835,36 @@
} }
}, },
"systems_2": { "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": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -600,11 +881,22 @@
}, },
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [ "hyprlang": [
"hyprland", "hyprland",
"hyprlang" "hyprlang"
], ],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
@@ -615,11 +907,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717918856, "lastModified": 1728166987,
"narHash": "sha256-I38bmPLqamvOfVSArd1hhZtkVRAYBK38fOHZCU1P9Qg=", "narHash": "sha256-w6dVTguAn9zJ+7aPOhBQgDz8bn6YZ7b56cY8Kg5HJRI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "72907822c19afc0983c69d59d299204381623725", "rev": "fb9c8d665af0588bb087f97d0f673ddf0d501787",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -627,6 +919,44 @@
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"type": "github" "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", "root": "root",

257
flake.nix
View File

@@ -2,211 +2,70 @@
description = "Multisystem NixOS Flake of Lennart J. Kurzweg"; description = "Multisystem NixOS Flake of Lennart J. Kurzweg";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05"; nixpkgs = { url = "nixpkgs/nixos-24.05"; };
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
home-manager = { nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; };
url = "github:nix-community/home-manager/release-24.05"; home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; };
inputs.nixpkgs.follows = "nixpkgs"; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
}; lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; };
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = { hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; };
url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
# url = "github:hyprwm/Hyprland"; Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; };
# inputs.nixpkgs.follows = "nixpkgs"; hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
# Hyprspace = {
# url = "github:KZDKM/Hyprspace";
# inputs.hyprland.follows = "hyprland";
# };
# nixvim = { # firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; };
# url = "github:nix-community/nixvim/nixos-23.11"; yazi.url = "github:sxyazi/yazi";
# inputs.nixpkgs.follows = "nixpkgs"; zen-browser.url = "github:MarceColl/zen-browser-flake";
# };
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: outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let
let system = "x86_64-linux";
system = "x86_64-linux"; user = "nx2";
pkgs = nixpkgs.legacyPackages.${system}; domain = "nx2.site";
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
user = "nx2"; config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
pkgs = import nixpkgs { inherit system config; };
pkgs-unstable = import nixpkgs-unstable { inherit system config; };
pkgs-latest = import nixpkgs-latest { inherit system config; };
nvidia = { nvidia-set = import ./flake-modules/nvidia.nix;
enable = true; secrets = import ./git-crypt/secrets.nix;
prime = true; rice = import ./flake-modules/rice.nix pkgs;
# unfree = if enable then [ in {
unfree = [ nixosConfigurations = let
"nvidia-x11" make-nixos-system = host: nixpkgs.lib.nixosSystem {
"nvidia-settings" inherit system;
"nvidia-persistenced" modules = [ ./configuration.nix ];
"cudatoolkit" specialArgs = let
"cudatoolkit-11.8.0" nvidia = nvidia-set // {
"cudatoolkit-12.2.2" enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
]; prime = if (host == "NxXPS") then true else false;
# ] else []; };
}; in { inherit inputs user host domain pkgs-unstable pkgs-latest secrets rice nvidia; };
allowed = {
unfree-packages = [
"spotify"
"cudatoolkit-12.2.2"
"discord"
"obsidian"
"zoom-us"
"zoom"
] ++ nvidia.unfree;
inecure-packages = [
"electron-25.9.0"
];
};
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 {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs user host pkgs-unstable allowed secrets rice nvidia; };
};
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; };
};
};
homeConfigurations = {
"${user}@NxXPS" = let host = "NxXPS"; in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
};
"${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 {
NxXPS = make-nixos-system "NxXPS";
NxNORTH = make-nixos-system "NxNORTH";
NxACE = make-nixos-system "NxACE";
}; };
homeConfigurations = let
make-home-configuration = host: user: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
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 = { programs.bash = {
enable = true; enable = true;
shellAliases = { shellAliases = {
@@ -19,11 +15,5 @@ lib.mkIf (user != "tv")
"checkjobs" "checkjobs"
]; ];
enableCompletion = false; enableCompletion = false;
# initExtra = ''
# if [[ $- == *i* ]] # if interactive
# then
# eval "$(${pkgs.starship}/bin/starship init bash)"
# fi
# '';
}; };
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,29 +1,106 @@
{ config, pkgs, rice, ... }: { rice, ... }:
{ {
home.file.".config/color-pallet.txt".text = with rice.color; '' home.file.".config/color-pallete.html".text = with rice.color; let
black: dark: ${black.dark} cb = color-set: color-name: size: /* html */ ''
base: ${black.base} <div class="color-container" style="border-color: ${color-set.base}">
bright: ${black.bright} <div class="color-box" style="background: ${color-set.dark}; height: ${builtins.toString size}px;">
white: dark: ${white.dark} <p style="color: ${color-set.bright}"> ${color-name}.dark </p>
base: ${white.base} </div>
bright: ${white.bright} <div class="color-box" style="background: ${color-set.base}; height: ${builtins.toString size}px;">
blue: dark: ${blue.dark} <p class="dynamic-text"> ${color-name}.base </p>
base: ${blue.base} </div>
bright: ${blue.bright} <div class="color-box" style="background: ${color-set.bright}; height: ${builtins.toString size}px;">
magenta: dark: ${magenta.dark} <p style="color: ${color-set.dark}"> ${color-name}.bright </p>
base: ${magenta.base} </div>
bright: ${magenta.bright} </div>
red: dark: ${red.dark} '';
base: ${red.base}
bright: ${red.bright}
cyan: dark: ${cyan.dark} in /* html */ ''
base: ${cyan.base} <!DOCTYPE html>
bright: ${cyan.bright} <head>
green: dark: ${green.dark} <meta charset="UTF-8">
base: ${green.base} <meta name="darkreader-lock">
bright: ${green.bright} <meta name="viewport" content="width=device-width, initial-scale=1.0">
yellow: dark: ${yellow.dark} <title>Color Pallete</title>
base: ${yellow.base} <style>
bright: ${yellow.bright} * {
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,492 +1,200 @@
{ config, pkgs, pkgs-unstable, lib, host, user, allowed, ... }: { pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE") lib.mkIf (host != "NxACE")
{ {
home.packages = [ home = {
pkgs-unstable.vesktop packages = with pkgs; [
]; vesktop
];
home.file.".config/vesktop/settings/settings.json".text = '' file.".config/vesktop/settings/settings.json".text = let
{ settingsSyncVersion = "1729179678715";
"notifyAboutUpdates": true, in /* json */ ''{
"autoUpdate": false, "notifyAboutUpdates": true,
"autoUpdateNotification": true, "autoUpdate": false,
"useQuickCss": true, "autoUpdateNotification": true,
"themeLinks": [ "useQuickCss": true,
"https://luckfire.github.io/amoled-cord/src/amoled-cord.css" "themeLinks": [
], "https://luckfire.github.io/amoled-cord/src/amoled-cord.css"
"enabledThemes": [], ],
"enableReactDevtools": false, "enabledThemes": [],
"frameless": false, "enableReactDevtools": false,
"transparent": true, "frameless": false,
"winCtrlQ": false, "transparent": true,
"macosTranslucency": false, "winCtrlQ": false,
"disableMinSize": false, "macosTranslucency": false,
"winNativeTitleBar": false, "disableMinSize": false,
"plugins": { "winNativeTitleBar": false,
"BadgeAPI": { "plugins": {
"enabled": true "BadgeAPI": { "enabled": true },
}, "CommandsAPI": { "enabled": true },
"CommandsAPI": { "ContextMenuAPI": { "enabled": true },
"enabled": true "MemberListDecoratorsAPI": { "enabled": false },
}, "MessageAccessoriesAPI": { "enabled": false },
"ContextMenuAPI": { "MessageDecorationsAPI": { "enabled": false },
"enabled": true "MessageEventsAPI": { "enabled": false },
}, "MessagePopoverAPI": { "enabled": false },
"MemberListDecoratorsAPI": { "NoticesAPI": { "enabled": true },
"enabled": false "ServerListAPI": { "enabled": false },
}, "NoTrack": { "enabled": true },
"MessageAccessoriesAPI": { "Settings": {
"enabled": false "enabled": true,
}, "settingsLocation": "aboveActivity"
"MessageDecorationsAPI": { },
"enabled": false "SupportHelper": { "enabled": true },
}, "ChatInputButtonAPI": { "enabled": false },
"MessageEventsAPI": { "AlwaysAnimate": { "enabled": true },
"enabled": false "AlwaysTrust": { "enabled": true },
}, "AnonymiseFileNames": { "enabled": false },
"MessagePopoverAPI": { "WebRichPresence (arRPC)": { "enabled": false },
"enabled": false "BANger": { "enabled": false },
}, "BetterFolders": { "enabled": false },
"NoticesAPI": { "BetterGifAltText": { "enabled": false },
"enabled": true "BetterGifPicker": { "enabled": false },
}, "BetterNotesBox": { "enabled": false },
"ServerListAPI": { "BetterRoleDot": { "enabled": false },
"enabled": false "BetterUploadButton": { "enabled": false },
}, "BiggerStreamPreview": { "enabled": false },
"NoTrack": { "BlurNSFW": { "enabled": false },
"enabled": true "CallTimer": { "enabled": false },
}, "ClearURLs": { "enabled": false },
"Settings": { "ClientTheme": { "enabled": false },
"enabled": true, "ColorSighted": { "enabled": false },
"settingsLocation": "aboveActivity" "ConsoleShortcuts": { "enabled": false },
}, "CopyUserURLs": { "enabled": false },
"SupportHelper": { "CrashHandler": { "enabled": true },
"enabled": true "CustomRPC": { "enabled": false },
}, "Dearrow": { "enabled": false },
"ChatInputButtonAPI": { "Decor": { "enabled": false },
"enabled": false "DisableCallIdle": { "enabled": false },
}, "EmoteCloner": { "enabled": false },
"AlwaysAnimate": { "Experiments": { "enabled": false },
"enabled": true "F8Break": { "enabled": false },
}, "FakeNitro": { "enabled": false },
"AlwaysTrust": { "FakeProfileThemes": { "enabled": true },
"enabled": true "FavoriteEmojiFirst": { "enabled": false },
}, "FavoriteGifSearch": { "enabled": false },
"AnonymiseFileNames": { "FixCodeblockGap": { "enabled": false },
"enabled": false "FixSpotifyEmbeds": { "enabled": false },
}, "FixYoutubeEmbeds": { "enabled": false },
"WebRichPresence (arRPC)": { "ForceOwnerCrown": { "enabled": false },
"enabled": false "FriendInvites": { "enabled": false },
}, "GameActivityToggle": { "enabled": false },
"BANger": { "GifPaste": { "enabled": false },
"enabled": false "GreetStickerPicker": { "enabled": false },
}, "HideAttachments": { "enabled": false },
"BetterFolders": { "iLoveSpam": { "enabled": false },
"enabled": false "IgnoreActivities": { "enabled": false },
}, "ImageZoom": { "enabled": false },
"BetterGifAltText": { "InvisibleChat": { "enabled": false },
"enabled": false "KeepCurrentChannel": { "enabled": false },
}, "LastFMRichPresence": { "enabled": false },
"BetterGifPicker": { "LoadingQuotes": { "enabled": false },
"enabled": false "MemberCount": { "enabled": false },
}, "MessageClickActions": { "enabled": false },
"BetterNotesBox": { "MessageLinkEmbeds": { "enabled": false },
"enabled": false "MessageLogger": { "enabled": false },
}, "MessageTags": { "enabled": false },
"BetterRoleDot": { "MoreCommands": { "enabled": false },
"enabled": false "MoreKaomoji": { "enabled": false },
}, "MoreUserTags": { "enabled": false },
"BetterUploadButton": { "Moyai": { "enabled": false },
"enabled": false "MutualGroupDMs": { "enabled": false },
}, "NewGuildSettings": { "enabled": false },
"BiggerStreamPreview": { "NoBlockedMessages": { "enabled": false },
"enabled": false "NoDevtoolsWarning": { "enabled": false },
}, "NoF1": { "enabled": false },
"BlurNSFW": { "NoMosaic": { "enabled": false },
"enabled": false "NoPendingCount": { "enabled": false },
}, "NoProfileThemes": { "enabled": false },
"CallTimer": { "NoReplyMention": { "enabled": false },
"enabled": false "NoScreensharePreview": { "enabled": false },
}, "NoTypingAnimation": { "enabled": false },
"ClearURLs": { "NoUnblockToJump": { "enabled": false },
"enabled": false "NormalizeMessageLinks": { "enabled": false },
}, "NotificationVolume": { "enabled": false },
"ClientTheme": { "NSFWGateBypass": { "enabled": false },
"enabled": false "OnePingPerDM": { "enabled": false },
}, "oneko": { "enabled": false },
"ColorSighted": { "OpenInApp": { "enabled": false },
"enabled": false "Party mode 🎉": { "enabled": false },
}, "PermissionFreeWill": { "enabled": false },
"ConsoleShortcuts": { "PermissionsViewer": { "enabled": false },
"enabled": false "petpet": { "enabled": false },
}, "PictureInPicture": { "enabled": false },
"CopyUserURLs": { "PinDMs": { "enabled": false },
"enabled": false "PlainFolderIcon": { "enabled": false },
}, "PlatformIndicators": { "enabled": false },
"CrashHandler": { "PreviewMessage": { "enabled": false },
"enabled": true "PronounDB": { "enabled": false },
}, "QuickMention": { "enabled": false },
"CustomRPC": { "QuickReply": { "enabled": false },
"enabled": false "ReactErrorDecoder": { "enabled": false },
}, "ReadAllNotificationsButton": { "enabled": false },
"Dearrow": { "RelationshipNotifier": { "enabled": false },
"enabled": false "RevealAllSpoilers": { "enabled": false },
}, "ReverseImageSearch": { "enabled": false },
"Decor": { "ReviewDB": { "enabled": false },
"enabled": false "RoleColorEverywhere": { "enabled": true },
}, "SearchReply": { "enabled": false },
"DisableCallIdle": { "SecretRingToneEnabler": { "enabled": false },
"enabled": false "SendTimestamps": { "enabled": false },
}, "ServerListIndicators": { "enabled": false },
"EmoteCloner": { "ServerProfile": { "enabled": false },
"enabled": false "ShikiCodeblocks": { "enabled": false },
}, "ShowAllMessageButtons": { "enabled": false },
"Experiments": { "ShowConnections": { "enabled": false },
"enabled": false "ShowHiddenChannels": { "enabled": false },
}, "ShowMeYourName": { "enabled": false },
"F8Break": { "ShowTimeouts": { "enabled": false },
"enabled": false "SilentMessageToggle": { "enabled": false },
}, "SilentTyping": { "enabled": false },
"FakeNitro": { "SortFriendRequests": { "enabled": false },
"enabled": false "SpotifyControls": { "enabled": false },
}, "SpotifyCrack": { "enabled": false },
"FakeProfileThemes": { "SpotifyShareCommands": { "enabled": false },
"enabled": true "StartupTimings": { "enabled": false },
}, "SuperReactionTweaks": { "enabled": false },
"FavoriteEmojiFirst": { "TextReplace": { "enabled": false },
"enabled": false "ThemeAttributes": { "enabled": false },
}, "TimeBarAllActivities": { "enabled": false },
"FavoriteGifSearch": { "Translate": { "enabled": false },
"enabled": false "TypingIndicator": { "enabled": false },
}, "TypingTweaks": { "enabled": false },
"FixCodeblockGap": { "Unindent": { "enabled": false },
"enabled": false "UnsuppressEmbeds": { "enabled": false },
}, "UrbanDictionary": { "enabled": false },
"FixSpotifyEmbeds": { "UserVoiceShow": { "enabled": false },
"enabled": false "USRBG": { "enabled": false },
}, "ValidUser": { "enabled": false },
"FixYoutubeEmbeds": { "VoiceChatDoubleClick": { "enabled": false },
"enabled": false "VcNarrator": { "enabled": false },
}, "VencordToolbox": { "enabled": false },
"ForceOwnerCrown": { "ViewIcons": { "enabled": false },
"enabled": false "ViewRaw": { "enabled": false },
}, "VoiceMessages": { "enabled": false },
"FriendInvites": { "WebContextMenus": {
"enabled": false "enabled": true,
}, "addBack": true },
"GameActivityToggle": { "WebKeybinds": { "enabled": true },
"enabled": false "WhoReacted": { "enabled": false },
}, "Wikisearch": { "enabled": false },
"GifPaste": { "XSOverlay": { "enabled": false }
"enabled": false },
}, "notifications": {
"GreetStickerPicker": { "timeout": 5000,
"enabled": false "position": "bottom-right",
}, "useNative": "not-focused",
"HideAttachments": { "logLimit": 50
"enabled": false },
}, "cloud": {
"iLoveSpam": { "authenticated": false,
"enabled": false "url": "https://api.vencord.dev/",
}, "settingsSync": false,
"IgnoreActivities": { "settingsSyncVersion": ${settingsSyncVersion}
"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
}
},
"notifications": {
"timeout": 5000,
"position": "bottom-right",
"useNative": "not-focused",
"logLimit": 50
},
"cloud": {
"authenticated": false,
"url": "https://api.vencord.dev/",
"settingsSync": false,
"settingsSyncVersion": 1710459223618
}
}
'';
} }

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, host, rice, secrets, ... }: { pkgs, lib, host, user, rice, secrets, ... }:
lib.mkIf (host != "NxACE") lib.mkIf (host != "NxACE")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
@@ -6,8 +6,7 @@ lib.mkIf (host != "NxACE")
]; ];
programs.thunderbird = programs.thunderbird = let
let
inherit (lib.generators) toJSON; inherit (lib.generators) toJSON;
extensions = toJSON {} { extensions = toJSON {} {
"default-theme@mozilla.org" = "5787f490-29b8-436e-a111-640da8590790"; "default-theme@mozilla.org" = "5787f490-29b8-436e-a111-640da8590790";
@@ -22,7 +21,7 @@ lib.mkIf (host != "NxACE")
in { in {
enable = true; enable = true;
profiles = { profiles = {
default = { "${user}" = {
isDefault = true; isDefault = true;
settings = with rice.color; { settings = with rice.color; {
"calendar.alarms.showmissed" = false; "calendar.alarms.showmissed" = false;
@@ -47,7 +46,18 @@ lib.mkIf (host != "NxACE")
"mailnews.headers.showReferences" = true; "mailnews.headers.showReferences" = true;
"mailnews.headers.showSender" = true; "mailnews.headers.showSender" = true;
"mailnews.headers.showUserAgent" = 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 = { thunderbird = {
enable = true; enable = true;
profiles = [ "default" ]; profiles = [ "nx2" ];
# The id given as argument is an automatically generated account identifier. # The id given as argument is an automatically generated account identifier.
settings = OAuth2Settings; settings = OAuth2Settings;
}; };
@@ -96,28 +106,29 @@ lib.mkIf (host != "NxACE")
}; };
thunderbird = { thunderbird = {
enable = true; enable = true;
profiles = [ "default" ]; profiles = [ "nx2" ];
# The id given as argument is an automatically generated account identifier. # The id given as argument is an automatically generated account identifier.
settings = OAuth2Settings; settings = OAuth2Settings;
}; };
}; };
hsmw = { hsmw = with secrets.email.hsmw; {
address = secrets.email.hsmw.mail; address = "${un}@hs-mittweida.de";
userName = secrets.email.hsmw.mail; userName = "${un}@hs-mittweida.de";
realName = "Lennart J. Kurzweg"; realName = "Lennart J. Kurzweg";
imap = { imap = {
port = 993; port = 993;
host = "xc.hs-mittweida.de"; host = "xc.hs-mittweida.de";
}; };
smtp = { smtp = {
port = 465; port = 587;
host = "xc.hs-mittweida.de"; host = "xc.hs-mittweida.de";
tls.useStartTls = true;
}; };
signature = { signature = {
text = '' text = ''
MatNr: ${secrets.email.hsmw.mnr} MatNr: ${mnr}
SemGr: ${secrets.email.hsmw.semgr} SemGr: ${semgr}
About Me: https://nx2.site/about-me About Me: https://nx2.site/about-me
Contact: https://nx2.site/contact Contact: https://nx2.site/contact
GPG: https://nx2.site/gpg GPG: https://nx2.site/gpg
@@ -126,7 +137,42 @@ lib.mkIf (host != "NxACE")
}; };
thunderbird = { thunderbird = {
enable = true; 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, ...}: { # { pkgs-unstable, secrets, user, system, inputs, ...}:
programs.firefox = { { rice, user, ... }:
enable = true; # browser.tabs.allow_transparent_browser
package = pkgs-unstable.firefox; {
# package = pkgs.firefox; home.file = with rice.color; let
profiles.${user} = { blur = builtins.toString 20;
# extensions = with inputs.firefox-addons; [ in {
# ublock-origin ".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ ''
# darkreader :root{
# bitwarden /* Popup panels */
# flagfox --arrowpanel-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
# sponsorblock --arrowpanel-border-color : ${border} !important;
# languagetool --arrowpanel-color : ${secondary.base} !important;
# istilldontcareaboutcookies --arrowpanel-dimmed : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important;
# return-youtube-dislikes --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;
extensions = [ inputs.firefox-addons.darkreader ];
bookmarks = [ /* Autocomplete */
{ --autocomplete-popup-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
name = "Github Code Search"; --autocomplete-popup-color : ${foreground} !important;
keyword = "cs"; --autocomplete-popup-highlight-background: ${accent.base} !important;
url = "https://github.com/search?type=code&auto_enroll=true"; --autocomplete-popup-highlight-color : ${foreground} !important;
}
];
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;
};
};
};
# xdg.mimeApps.defaultApplications = { /* Toolbar background */
# "text/html" = ["firefox.desktop"]; --toolbar-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important;
# "text/xml" = ["firefox.desktop"]; --toolbar-non-lwt-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
# "x-scheme-handler/http" = ["firefox.desktop"]; --toolbar-non-lwt-bgimage : none !important;
# "x-scheme-handler/https" = ["firefox.desktop"]; --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, ... }: { pkgs, lib, rice, user, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
fish fish
@@ -51,10 +50,12 @@ lib.mkIf (user != "tv")
nf = "neofetch"; nf = "neofetch";
nxf = "nxfetch"; nxf = "nxfetch";
nn = "nano"; nn = "nano";
m = "micro"; hxx = "hx .";
p = "python"; p = "python";
ipy = "ipython"; ipy = "ipython";
c = "codium"; c = "codium";
cc = "codium .";
code = "codium";
g = "git"; g = "git";
lzg = "lazygit"; lzg = "lazygit";
# gst = "git status"; # gst = "git status";
@@ -79,9 +80,8 @@ lib.mkIf (user != "tv")
lzd = "lazydocker"; lzd = "lazydocker";
d = "docker"; d = "docker";
dcmp = "docker compose"; 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 # ya = "yazi"; # function
# nxfiglet = "figlet"; # nxfiglet = "figlet";
}; };
@@ -89,9 +89,17 @@ lib.mkIf (user != "tv")
set -g fish_greeting set -g fish_greeting
if not set -q IN_NIX_SHELL if not set -q IN_NIX_SHELL
nxfetch 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 end
# ${pkgs.starship}/bin/starship init fish | source
# ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
''; '';
functions = { functions = {
# gpg = ''; # gpg = '';

View File

@@ -1,32 +1,16 @@
{ config, pkgs, lib, host, ... }: { pkgs, lib, host, ... }:
lib.mkIf (host == "NxXPS") lib.mkIf (host == "NxXPS")
{ {
home.packages = [ home.packages = with pkgs; [
pkgs.libinput-gestures libinput-gestures
pkgs.ydotool
]; ];
home.file.".config/libinput/gestures".text = '' home.file.".config/libinput-gestures.conf".text = ''
# Swipe threshold (0-100) # Swipe threshold (0-100)
swipe_threshold 0 swipe_threshold 0
# Gestures # Gestures
gesture swipe left 3 echo key k:276 | dotool gesture swipe right 3 ydotool key 158:1 158:0 # back
gesture swipe right 3 echo key k:275 | dotool 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, ... }: { pkgs, rice, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
git git
@@ -11,9 +10,7 @@ lib.mkIf (user != "tv")
# List of directories to check # List of directories to check
directories=( directories=(
"$HOME/nix-dots" "$HOME/nix-dots"
"$HOME/shared/nx-obsidian-vault" "$HOME/obsidian-vault"
"$HOME/shared/HSMW/Praxis/BCAM/bolt-llmserver"
"$HOME/shared/HSMW/Praxis/BCAM/bcam-tools"
"$HOME/Pictures/wallpapers" "$HOME/Pictures/wallpapers"
) )
echo "" echo ""
@@ -56,13 +53,19 @@ lib.mkIf (user != "tv")
windowSize = "normal"; windowSize = "normal";
gui.theme = with rice.color; { gui.theme = with rice.color; {
lightTheme = false; lightTheme = false;
activeBorderColor = [ border "bold"]; activeBorderColor = [ foreground "bold" ];
inactiveBorderColor = [ black.bright ]; inactiveBorderColor = [ border ];
optionsTextColor = [ blue.base ]; optionsTextColor = [ tertiary.base ];
selectedLineBgColor = [ foreground ]; selectedLineBgColor = [ secondary.base ];
selectedRangeByColor = [ magenta.bright ]; selectedRangeByColor = [ weird.bright ];
showRandomTip = true; showRandomTip = true;
animateExplosion = 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,16 +1,15 @@
{ pkgs, pkgs-unstable, ... }: { pkgs, pkgs-unstable, ... }:
{ {
# there also is a system module # there also is a system module
home.packages = with pkgs; [ home.packages = (with pkgs; [
gnupg gnupg
gpg-tui gpg-tui
] ++ ( with pkgs-unstable; [ ]) ++ ( with pkgs-unstable; [
pinentry-all pinentry-all
]); ]);
# services.pcscd.enable = true; # services.pcscd.enable = true;
services.gpg-agent = services.gpg-agent = let
let
min2sec = min: (min * 60); min2sec = min: (min * 60);
in { in {
enable = true; enable = true;
@@ -22,7 +21,7 @@
enableFishIntegration = true; enableFishIntegration = true;
defaultCacheTtlSsh = min2sec 60; defaultCacheTtlSsh = min2sec 60;
defaultCacheTtl = min2sec 30; defaultCacheTtl = min2sec 30;
# pinentryPackage = pkgs.pinentry-gtk2; # pinentryPackage = pkgs.pinentry-curses;
}; };
home.file.".gnupg/gpg.conf".text = '' home.file.".gnupg/gpg.conf".text = ''

View File

@@ -1,22 +1,27 @@
{ config, pkgs, pkgs-unstable, lib, user, ... }: { config, pkgs, lib, rice, user, ... }: let
let # theme-name = "Colloid-Pink-Dark-Compact";
theme-name = "Catppuccin-Macchiato-Compact-Pink-Dark"; # 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 { theme-package = pkgs.catppuccin-gtk.override {
accents = [ "pink" ]; accents = [ "pink" ];
size = "compact"; size = "compact";
tweaks = [ "rimless" "black" ]; tweaks = [ "rimless" "black" ];
variant = "macchiato"; variant = "macchiato";
}; };
in in {
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# gnome.gnome-themes-extra # gnome.gnome-themes-extra
# gnome.adwaita-icon-theme # gnome.adwaita-icon-theme
gnome.gnome-tweaks gnome.gnome-tweaks
gtk3 gtk3
gtk4 gtk4
catppuccin-gtk # catppuccin-gtk
bibata-cursors
] ++ [ ] ++ [
# pkgs-unstable.themix-gui # pkgs-unstable.themix-gui
]; ];
@@ -36,25 +41,18 @@ lib.mkIf (user != "tv")
gtk4.extraConfig = { gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1; gtk-application-prefer-dark-theme = 1;
}; };
cursorTheme = { cursorTheme = rice.cursor;
name = "Catppuccin-Mocha-Pink-Cursors";
package = pkgs.catppuccin-cursors.mochaPink;
size = 20;
};
}; };
home.pointerCursor = { home.pointerCursor = {
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
package = pkgs.catppuccin-cursors.mochaPeach; } // rice.cursor;
name = "Catppuccin-Mocha-Pink-Cursors";
size = 20;
};
xdg.configFile = { xdg.configFile = {
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets"; "gtk-4.0/assets".source = "${theme-package}/share/themes/${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.css".source = "${theme-package}/share/themes/${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/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 = { home = {
packages = with pkgs; [ packages = with pkgs; [
nixfmt # nix formater # nixfmt-classic # nix formater
nil # nix language server # nil # nix language server
# nixd # specified in nixd.nix
python311Packages.python-lsp-server python311Packages.python-lsp-server
ruff
ruff-lsp
pyright
lldb # debugger for llvm stuff lldb # debugger for llvm stuff
yaml-language-server # yaml yaml-language-server # yaml
] ++ (with pkgs-unstable; [ marksman # markdown
vale-ls # style-checker lsp (needs vale)
ltex-ls # Ltex (language tool)
] ++ (with pkgs-unstable; [
bash-language-server
helix helix
]); ]);
sessionVariables = { sessionVariables = {
@@ -54,12 +62,99 @@
}; };
}; };
keys.normal = { 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 = [
{
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"
# )
];
};
}; };
}; };
languages.language = [{
name = "nix";
}];
themes = { themes = {
base16 = with rice.color; { base16 = with rice.color; {
"attributes" = foreground; "attributes" = foreground;
@@ -70,7 +165,7 @@
"constant" = accent.bright; "constant" = accent.bright;
"constant.character.escape" = special.bright; "constant.character.escape" = special.bright;
"constant.numeric" = foreground; "constant.numeric" = foreground;
"constructor" = blue.dark; "constructor" = weird.base;
"debug" = yellow.base; "debug" = yellow.base;
"diagnostic.modifiers" = [ "underlined" ]; "diagnostic.modifiers" = [ "underlined" ];
"diff.delta" = blue.bright; "diff.delta" = blue.bright;
@@ -80,13 +175,13 @@
"function" = secondary.bright; "function" = secondary.bright;
"hint" = tertiary.bright; "hint" = tertiary.bright;
"info" = foreground; "info" = foreground;
"keyword" = secondary.base; "keyword" = special.base;
"label" = foreground; "label" = foreground;
"namespace" = weird.bright; "namespace" = weird.bright;
"operator" = foreground; "operator" = foreground;
"special" = special.base; "special" = special.base;
"string" = secondary.bright; "string" = secondary.bright;
"type" = red.dark; "type" = red.base;
"variable" = accent.base; "variable" = accent.base;
"variableother.member" = foreground; "variableother.member" = foreground;
"warning" = red.base; "warning" = red.base;
@@ -146,7 +241,7 @@
}; };
"ui.cursor.match" = { # Matching bracket etc. "ui.cursor.match" = { # Matching bracket etc.
"bg" = green.dark; "bg" = green.dark;
"modifiers" = [ "reversed" ]; "modifiers" = [ ];
}; };
"ui.gutter" = { "ui.gutter" = {
"bg" = black.base; "bg" = black.base;
@@ -210,7 +305,8 @@
"fg" = black.bright; "fg" = black.bright;
}; };
"ui.virtual.inlay-hint" = { "ui.virtual.inlay-hint" = {
"fg" = black.bright; "fg" = weird.bright;
"bg" = weird.dark;
}; };
"ui.virtual.ruler" = { "ui.virtual.ruler" = {
"bg" = background; "bg" = background;

View File

@@ -1,104 +1,107 @@
{pkgs-unstable, lib, user, ... }: { pkgs, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = [ home = {
pkgs-unstable.hyprland-autoname-workspaces packages = with pkgs; [ hyprland-autoname-workspaces ];
]; file.".config/hyprland-autoname-workspaces/config.toml".text = ''
version = "1.1.14"
home.file.".config/hyprland-autoname-workspaces/config.toml".text = ''
version = "1.1.14"
[class] [class]
VirtualBox = "" VirtualBox = ""
steam = "󰓓" steam = "󰓓"
"VirtualBox Manager" = "" "VirtualBox Manager" = ""
"com.obsproject.Studio" = "" "com.obsproject.Studio" = ""
"[Ff]irefox" = "󰈹" "[Ff]irefox" = "󰈹"
"[Tt]hunderbird" = "" "[Tt]hunderbird" = ""
pcbnew = "" pcbnew = ""
".*.exe" = "" ".*.exe" = ""
Element = "󰘨" Element = "󰘨"
Signal = "󱅵" Signal = "󱅵"
Gimp = "" Gimp = ""
VSCodium = "󰨞" VSCodium = "󰨞"
"[sS]potify" = "" "[sS]potify" = ""
virt-manager = "" virt-manager = ""
lutris = "󰊗" lutris = "󰊗"
DEFAULT = "{class}" DEFAULT = "{class}"
"epicgameslauncher.exe" = "󰯷" "epicgameslauncher.exe" = "󰯷"
"[Cc]ode" = "󰨞" "[Cc]ode" = "󰨞"
"galaxyclient.exe" = "󰮡" "galaxyclient.exe" = "󰮡"
pavucontrol = "󰕾" pavucontrol = "󰕾"
"Tor Browser" = "󰾔" "Tor Browser" = "󰾔"
mpv = "" mpv = ""
chatterino = "" chatterino = ""
libreoffice-writer = "" libreoffice-writer = ""
kitty = "" kitty = ""
"cyberpunk2077.exe" = "󰾲" "cyberpunk2077.exe" = "󰾲"
KiCad = "" KiCad = ""
"[tT]hunar" = "" "[tT]hunar" = ""
"riotclientux.exe" = "󰰌" "riotclientux.exe" = "󰰌"
libreoffice-calc = "" libreoffice-calc = ""
"org.remmina.Remmina" = "󰢹" "org.remmina.Remmina" = "󰢹"
"org.inkscape.Inkscape" = "󰕙" "org.inkscape.Inkscape" = "󰕙"
"VirtualBox Machine" = "" "VirtualBox Machine" = ""
Bitwarden = "" Bitwarden = ""
"[gG]imp-.*" = "" "[gG]imp-.*" = ""
Chromium = "" Chromium = ""
obsidian = "󰠮" obsidian = "󰠮"
"leagueclientux.exe" = "󰰌" "leagueclientux.exe" = "󰰌"
zathura = "󰈦" zathura = "󰈦"
code-oss = "󰨞" code-oss = "󰨞"
discord = "󰙯" codium-url-handler = "󰨞"
vesktop = "󰙯" discord = "󰙯"
blueman-manager = "󰂯" vesktop = "󰙯"
Alacritty = "" blueman-manager = "󰂯"
zoom = "󰬡" Alacritty = ""
zoom = "󰬡"
spotify = ""
[class_active] [class_active]
"(?i)ExampleOneTerm" = "icon" "(?i)ExampleOneTerm" = "icon"
[initial_class] [initial_class]
[initial_class_active] [initial_class_active]
[workspaces_name] [workspaces_name]
[title_in_class] [title_in_class]
[title_in_class_active] [title_in_class_active]
[title_in_initial_class] [title_in_initial_class]
[title_in_initial_class_active] [title_in_initial_class_active]
[initial_title_in_class] [initial_title_in_class]
[initial_title_in_class_active] [initial_title]
"Spotify Premium" = ""
[initial_title_in_initial_class] [initial_title_in_class_active]
[initial_title_in_initial_class_active] [initial_title_in_initial_class]
[exclude] [initial_title_in_initial_class_active]
aProgram = "^$"
"" = "^$"
"(?i)fcitx" = ".*"
"[Ss]team" = "^(Friends List.*)?$"
"explorer.exe" = ".*"
"(?i)TestApp" = ""
[format] [exclude]
dedup = false aProgram = "^$"
dedup_inactive_fullscreen = false "" = "^$"
delim = " " "(?i)fcitx" = ".*"
workspace = "{id}:{clients}" "[Ss]team" = "^(Friends List.*)?$"
workspace_empty = "{id}" "explorer.exe" = ".*"
client = "{icon}" "(?i)TestApp" = ""
client_fullscreen = "{icon}"
client_active = "{icon}" [format]
client_dup = "{icon}{counter_sup}" dedup = false
client_dup_active = "*{icon}*{delim}{icon}{counter_unfocused_sup}" dedup_inactive_fullscreen = false
client_dup_fullscreen = "[{icon}]{delim}{icon}{counter_unfocused_sup}" delim = " "
workspace = "{id}:{clients}"
workspace_empty = "{id}"
client = "{icon}"
client_fullscreen = "{icon}"
client_active = "{icon}"
client_dup = "{icon}{counter_sup}"
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 let
animation-speed = "5"; animation-speed = "5";
transparency = builtins.toString rice.transparency; transparency = builtins.toString rice.transparency;
@@ -46,22 +46,23 @@ let
}; };
}; };
}; };
in in {
lib.mkIf (user != "tv") home.packages = (with pkgs; [
{
home.packages = with pkgs; [
# hyprland itself is a system package # hyprland itself is a system package
hyprland-protocols hyprland-protocols
hyprlock hyprlock
hypridle hypridle
hyprcursor
grim grim
slurp slurp
] ++ (with pkgs-unstable; [ # ]) ++ (with pkgs-unstable; [
]) ++ (with inputs; [
hyprswitch.packages.x86_64-linux.default
]); ]);
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
@@ -143,6 +144,8 @@ lib.mkIf (user != "tv")
"GBM_BACKEND,nvidia-drm" "GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia" "__GLX_VENDOR_LIBRARY_NAME,nvidia"
"WLR_NO_HARDWARE_CURSORS,1" "WLR_NO_HARDWARE_CURSORS,1"
"HYPRCURSOR_THEME,${config.gtk.cursorTheme.name}"
"HYPRCURSOR_SIZE,${toString config.gtk.cursorTheme.size}"
] else []; ] else [];
input = { input = {
@@ -159,8 +162,8 @@ lib.mkIf (user != "tv")
gaps_in = builtins.div rice.gap-size 2; gaps_in = builtins.div rice.gap-size 2;
gaps_out = rice.gap-size; gaps_out = rice.gap-size;
border_size = rice.border-width; 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.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.border2}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; # cursor_inactive_timeout = 10;
@@ -225,12 +228,11 @@ lib.mkIf (user != "tv")
dwindle = { dwindle = {
preserve_split = true; # you probably want this preserve_split = true; # you probably want this
no_gaps_when_only = false; no_gaps_when_only = true;
}; };
master = { # master = {
new_is_master = true; # };
};
misc = { misc = {
disable_hyprland_logo = true; disable_hyprland_logo = true;
@@ -239,18 +241,17 @@ lib.mkIf (user != "tv")
}; };
exec-once = [ exec-once = [
"hyprpm reload -n " "waybar"
"waybar " "swww-daemon"
"hyprpaper -n "
"swww init"
"= /home/nx2/scripts/swww-randomize.sh"
"hyprland-autoname-workspaces" "hyprland-autoname-workspaces"
"/usr/lib/polkit-kde-authentication-agent-1 " "/usr/lib/polkit-kde-authentication-agent-1 "
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"syncthing -no-browser" "syncthing -no-browser"
"mako" "mako"
"ibus engine xkb:de::deu" "fcitx5"
# "ibus engine xkb:de::deu"
"libinput-gestures" "libinput-gestures"
# "hyprswitch --daemon"
]; ];
windowrulev2 = [ windowrulev2 = [
@@ -264,10 +265,10 @@ lib.mkIf (user != "tv")
"opacity ${transparency}, code-oss" "opacity ${transparency}, code-oss"
"opacity ${transparency}, VSCodium" "opacity ${transparency}, VSCodium"
"opacity ${transparency}, Code" "opacity ${transparency}, Code"
"opacity ${transparency}, sent" # "opacity ${transparency}, sent"
"opacity ${transparency}, neovide" "opacity ${transparency}, neovide"
"opacity ${transparency}, obsidian" "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}), 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" # "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" "opacity ${transparency}, discord"
@@ -294,6 +295,7 @@ lib.mkIf (user != "tv")
"float, title:^(Compact folders)$" "float, title:^(Compact folders)$"
"tile, sent" "tile, sent"
"fullscreen, wlogout" "fullscreen, wlogout"
"fullscreen, sent"
"workspace 14, lutris" "workspace 14, lutris"
"workspace 100, title:^(Apex Legends)$" "workspace 100, title:^(Apex Legends)$"
"workspace 100, ^(cyberpunk2077.exe)$" "workspace 100, ^(cyberpunk2077.exe)$"
@@ -328,9 +330,11 @@ lib.mkIf (user != "tv")
# "SUPER, F4," # "SUPER, F4,"
"SUPER, F5, exec, nx_gcal_event force-lookup" "SUPER, F5, exec, nx_gcal_event force-lookup"
"SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate" "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, 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, F10, hyprload,update"
"SUPER, F11, exec, waybar" "SUPER, F11, exec, waybar"
"SUPER SHIFT, F11, exec, pkill waybar " "SUPER SHIFT, F11, exec, pkill waybar "
@@ -373,6 +377,7 @@ lib.mkIf (user != "tv")
# "SUPER, TAB, overview:toggle" # "SUPER, TAB, overview:toggle"
# "SUPER, TAB, hyprexpo:expo, toggle" # "SUPER, TAB, hyprexpo:expo, toggle"
"ALT, TAB, focuscurrentorlast" "ALT, TAB, focuscurrentorlast"
# "SUPER, TAB, exec, hyprswitch --daemon"
"SUPER, Q, killactive" "SUPER, Q, killactive"
"SUPER, W, exec, waybar_mode set '󰈹 '" "SUPER, W, exec, waybar_mode set '󰈹 '"
"SUPER, W, submap, browserSM " "SUPER, W, submap, browserSM "
@@ -380,11 +385,13 @@ lib.mkIf (user != "tv")
"SUPER, R, exec, rofi -show drun" "SUPER, R, exec, rofi -show drun"
# "SUPER, T, exec, alacritty" # "SUPER, T, exec, alacritty"
# "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace"" # "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 SHIFT, T, exec, kitty -e sh -c 'ssh nxace'"
# "SUPER, Z, " # "SUPER, Z, "
"SUPER, U, exec, thunderbird " "SUPER, U, exec, thunderbird "
"SUPER, I, exec, kitty -e fish -c 'hx ~/nix-dots/ && fish'" "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, O, exec, obsidian "
"SUPER, P, pin " "SUPER, P, pin "
# "SUPER, Ü," # "SUPER, Ü,"
@@ -451,8 +458,8 @@ lib.mkIf (user != "tv")
## MEGA KEYS: ## MEGA KEYS:
'' , Print, exec, grim -g "$(slurp)"'' '' , Print, exec, grim -g "$(slurp)"''
"SUPER, Next, resizeactive, 100 -100" # "SUPER, Next, resizeactive, 5% 5%" # binde
"SUPER, Prior, resizeactive, -100 100" # "SUPER, Prior, resizeactive, -5% -5%" # binde
########################################################################### ###########################################################################
## FN KEYS: ## FN KEYS:
@@ -482,6 +489,11 @@ lib.mkIf (user != "tv")
bindl = [ bindl = [
# ",switch:on:Lid Switch, exec, hyprlock &" # ",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 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,37 +1,32 @@
{ config, pkgs, rice, lib, user, ... }: { rice, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [
kitty
];
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font = { font = {
name = rice.font.code.name2; name = rice.font.code.name2;
package = rice.font.code.package; package = rice.font.code.package;
}; };
settings = { settings = with rice.color; {
background = rice.color.background; background = background;
foreground = rice.color.foreground; foreground = foreground;
cursor = rice.color.foreground; cursor = foreground;
color0 = rice.color.black.base; color0 = black.base;
color8 = rice.color.black.bright; color8 = black.bright;
color1 = rice.color.red.base; color1 = red.base;
color9 = rice.color.red.bright; color9 = red.bright;
color2 = rice.color.green.base; color2 = green.base;
color10 = rice.color.green.bright; color10 = green.bright;
color3 = rice.color.yellow.base; color3 = yellow.base;
color11 = rice.color.yellow.bright; color11 = yellow.bright;
color4 = rice.color.blue.base; color4 = blue.base;
color12 = rice.color.blue.bright; color12 = blue.bright;
color5 = rice.color.magenta.base; color5 = magenta.base;
color13 = rice.color.magenta.bright; color13 = magenta.bright;
color6 = rice.color.cyan.base; color6 = cyan.base;
color14 = rice.color.cyan.bright; color14 = cyan.bright;
color7 = rice.color.white.base; color7 = white.base;
color15 = rice.color.white.bright; color15 = white.bright;
background_opacity = builtins.toString rice.transparency; background_opacity = builtins.toString rice.transparency;
window_padding_width = 5; window_padding_width = 5;
remember_window_size = false; remember_window_size = false;
}; };

View File

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

View File

@@ -1,10 +1,6 @@
{ pkgs, rice, lib, user, ... }: { pkgs, rice, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = [ home.packages = with pkgs; [ libnotify ];
pkgs.mako
pkgs.libnotify
];
services.mako = with rice; { services.mako = with rice; {
enable = true; enable = true;
defaultTimeout = 5000; # in ms defaultTimeout = 5000; # in ms
@@ -14,7 +10,7 @@ lib.mkIf (user != "tv")
borderSize = border-width; borderSize = border-width;
font = font.code.name2; font = font.code.name2;
borderRadius = rounding; borderRadius = rounding;
anchor = "bottom-right"; anchor = "top-right";
margin = builtins.toString (gap-size * 2) ; 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, ... }: { config, pkgs, secrets, ... }: let
let sep = " ";
sep = " "; in {
in
lib.mkIf (user != "tv")
{
home = { home = {
file."${config.xdg.dataHome}/nx-gcal-event-credentials.json".text = '' file."${config.xdg.dataHome}/nx-gcal-event-credentials.json".text = ''
{ {
@@ -26,7 +23,7 @@ lib.mkIf (user != "tv")
# (pkgs.python311.withPackages (python-pkgs: [ # (pkgs.python311.withPackages (python-pkgs: [
# python-pkgs.google # python-pkgs.google
# ])) # ]))
(writeScriptBin "nx_gcal_event" '' (writeScriptBin "nx_gcal_event" /* python */ ''
#!${pkgs.python3}/bin/python3 #!${pkgs.python3}/bin/python3
import datetime import datetime
import os 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, ... }: { config, pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
libreoffice 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") lib.mkIf (host != "NxACE")
{ {
home.packages = [ home.packages = [
@@ -22,9 +22,9 @@ lib.mkIf (host != "NxACE")
".vpn/ljk-pnx-pass.txt".text = secrets.pnxVpn.pass; ".vpn/ljk-pnx-pass.txt".text = secrets.pnxVpn.pass;
# Remmina # 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-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 = ./pnx/pnx_rdp_srv-phoenix-3_192-168-1-108.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 = ./pnx/pnx_rdp_srv-phoenix2_192-168-1-101.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 = ./pnx/pnx_rdp_srv-remote_192-168-1-21.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 = { home = {
packages = with pkgs; [ packages = with pkgs; [
libclang glibc_multi
glibc glib
# clang-tools gcc
# pkgsi686Linux.glibc
clang-tools
]; ];
sessionVariables = { sessionVariables = with pkgs; {
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib:${pkgs.glibc.dev}/include"; LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib:${pkgs.glibc.dev}/include:${glibc_multi.dev}/include";
C_INCLUDE_PATH = "${pkgs.llvmPackages.libclang.lib}/lib:${pkgs.glibc.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; [ home.packages = with pkgs; [
gleam
erlang erlang
]; rebar3
] ++ (with pkgs-unstable; [
gleam
]);
} }

View File

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

View File

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

View File

@@ -1,112 +1,113 @@
{ config, pkgs, rice, lib, user, ... }: { pkgs, rice, ... }: {
let
trdr = "${rice.lib.float-to-drune rice.transparency}";
in
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [ home.packages = with pkgs; [
rofi-wayland rofi-wayland
]; ];
home.file.".config/rofi/config.rasi".text = '' home.file = let
configuration { trdr = "${rice.lib.float-to-drune rice.transparency}";
show-icons: false; in with rice.color; {
display-drun: ""; ".config/rofi/config.rasi".text = ''
disable-history: false; configuration {
drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>] [<span weight='light' size='small'><i>({exec})</i></span>]"; show-icons: false;
} display-drun: "";
disable-history: false;
drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>] [<span weight='light' size='small'><i>({exec})</i></span>]";
}
* { * {
font: "${rice.font.code.name2} 12"; font: "${rice.font.code.name2} 12";
foreground: ${rice.color.foreground}; foreground: ${foreground};
background-color: ${rice.color.background}${trdr}; background-color: ${background}${trdr};
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
spacing: 0px; spacing: 0px;
border-width: 0px; border-width: 0px;
} }
#window { #window {
background-color: ${rice.color.background}${trdr}; background-color: ${background}${trdr};
border: ${builtins.toString rice.border-width}px; border: ${builtins.toString rice.border-width}px;
border-radius: ${builtins.toString rice.rounding}; border-radius: ${builtins.toString rice.rounding};
border-color: ${rice.color.blue.base}; border-color: ${border};
} }
#mainbox { #mainbox {
border: 0; border: 0;
padding: 0; padding: 0;
} }
#message { #message {
border: 0px; border: 0px;
} }
#textbox { #textbox {
text-color: ${rice.color.foreground}; text-color: ${foreground};
} }
#listview { #listview {
fixed-height: 0; fixed-height: 0;
border: 0px; border: 0px;
spacing: 0px ; spacing: 0px ;
scrollbar: false; scrollbar: false;
padding: 0px; padding: 0px;
} }
#element { #element {
border: 0; 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.normal.normal { background-color: ${background}${trdr}; text-color: ${accent.base}; }
#element.selected.normal { background-color: ${rice.color.blue.base}${trdr}; text-color: ${rice.color.background}; } #element.selected.normal { background-color: ${tertiary.base}${trdr}; text-color: ${background}; }
#element.alternate.normal { background-color: ${rice.color.black.base}${trdr}; text-color: ${rice.color.foreground}; } #element.alternate.normal { background-color: ${background}${trdr}; text-color: ${secondary.base}; }
#scrollbar { #scrollbar {
width: ${builtins.toString rice.border-width}px ; width: ${builtins.toString rice.border-width}px ;
border: 0; border: 0;
handle-width: 8px ; handle-width: 8px ;
padding: 0; padding: 0;
} }
#sidebar { #sidebar {
border: ${builtins.toString rice.border-width}px dash; border: ${builtins.toString rice.border-width}px dash;
} }
#button.selected { #button.selected {
text-color: ${rice.color.foreground}; text-color: ${foreground};
} }
#inputbar { #inputbar {
spacing: 0; spacing: 0;
text-color: ${rice.color.background}; text-color: ${background};
background-color: ${rice.color.red.base}${trdr}; background-color: ${accent.base}${trdr};
padding: 0; padding: 0;
children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; margine-bottom: 2px;
} children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
#prompt { }
spacing: 0; #prompt {
background-color: transparent; spacing: 0;
text-color: ${rice.color.foreground}; background-color: transparent;
} text-color: ${foreground};
#textbox-prompt-colon { }
expand: false; #textbox-prompt-colon {
str: ">"; expand: false;
margin: 0px 0.3em 0em 0em ; str: ">";
text-color: ${rice.color.background}; margin: 0px 0.3em 0em 0em ;
background-color: transparent; text-color: ${background};
} background-color: transparent;
#case-indicator { }
spacing: 0; #case-indicator {
text-color: ${rice.color.foreground}; spacing: 0;
background-color: transparent; text-color: ${foreground};
} background-color: transparent;
#entry { }
spacing: 0; #entry {
text-color: ${rice.color.background}; spacing: 0;
background-color: transparent; text-color: ${background};
placeholder: ""; background-color: transparent;
} placeholder: "";
}
element-text, element-icon { element-text, element-icon {
background-color: inherit; background-color: inherit;
text-color: inherit; text-color: inherit;
} }
''; '';
};
} }

View File

@@ -1,4 +1,4 @@
{ pkgs, rice, user, ... }: { pkgs, rice, ... }:
let let
my-sent = pkgs.sent.override { my-sent = pkgs.sent.override {
patches = [ patches = [
@@ -11,25 +11,14 @@ in
{ {
home = { home = {
packages = [ packages = [
# pkgs.sent
my-sent my-sent
(pkgs.writeShellApplication {
name = "nxsent";
text = with rice.color; let
in /* bash */ ''
echo "$@" | sent -c "${accent.base}" -b "${background}"
'';
})
]; ];
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;
'';
}; };
} }

View File

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

View File

@@ -1,10 +1,5 @@
{ pkgs, lib, user, rice, ... }: { lib, rice, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = [
pkgs.starship
];
programs.starship = { programs.starship = {
enable = true; enable = true;
# enableBashIntegration = 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"; version = "2.8.0";
sha256 = "sha256-mT2P1lEdW66YkDRN6fi0rmmvvyBfXiJjAUHns8a8ipE="; sha256 = "sha256-mT2P1lEdW66YkDRN6fi0rmmvvyBfXiJjAUHns8a8ipE=";
} }
{
name = "dancehelix";
publisher = "silverquark";
version = "0.5.16";
sha256 = "sha256-oHwtlbB18ctEnfStDOpJ+2/Kq41JZog8FVhTa1/s7m0=";
}
# { # {
# name = "remote-ssh-edit"; # name = "remote-ssh-edit";
# publisher = "ms-vscode-remote"; # 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,9 +1,6 @@
{ config, lib, pkgs, pkgs-unstable, user, rice, ... }: { lib, pkgs, user, rice, ... }: let
let
sep = " "; sep = " ";
in in {
lib.mkIf (user != "tv")
{
home.packages = home.packages =
let let
waybar_mode_script = /*bash*/ '' waybar_mode_script = /*bash*/ ''
@@ -47,13 +44,13 @@ lib.mkIf (user != "tv")
''; '';
in in
with pkgs; [ with pkgs; [
(writeShellApplication "waybar_mode" waybar_mode_script) (writeShellApplication { name = "waybar_mode"; text = waybar_mode_script;})
(writeShellApplication "cclock" cclock_script) (writeShellApplication { name = "cclock"; text = cclock_script;})
] ++ [ pkgs-unstable.waybar ]; ];
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = pkgs-unstable.waybar; package = pkgs.waybar;
settings = { settings = {
bar = { bar = {
# height = 20; # height = 20;
@@ -100,10 +97,10 @@ lib.mkIf (user != "tv")
exec = "cclock"; exec = "cclock";
restart-interval = 60; restart-interval = 60;
}; };
"custom/ctimeremaining" = { # "custom/ctimeremaining" = {
exec = "nx_gcal_event lookup"; # exec = "nx_gcal_event lookup";
restart-interval = 60; # restart-interval = 60;
}; # };
"custom/mode" = { "custom/mode" = {
exec = "cat /tmp/waybar-mode"; exec = "cat /tmp/waybar-mode";
interval = "once"; interval = "once";
@@ -164,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-family: ${rice.font.code.name2};
font-size: 1em; font-size: 1em;
@@ -174,17 +171,16 @@ lib.mkIf (user != "tv")
} }
window#waybar { 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-duration: 5s;
transition-property: background-color; 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; */ /* margin: ${builtins.toString rice.gap-size}px; */
/* border-radius: ${builtins.toString rice.rounding}px; */ /* border-radius: ${builtins.toString rice.rounding}px; */
} }
#clock, #clock,
#custom-cclock, #custom-cclock,
#custom-ctimeremaining,
#custom-mode, #custom-mode,
#battery, #battery,
#cpu, #cpu,
@@ -199,54 +195,54 @@ lib.mkIf (user != "tv")
padding: 0px 3px; padding: 0px 3px;
margin-top: 0.3em; margin-top: 0.3em;
border-radius: ${builtins.toString rice.rounding}px; 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 { #workspaces button {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.white.dark}); color: rgb(${f accent.base});
padding-left: 15px; padding-left: 15px;
padding-right: 15px; padding-right: 15px;
border-radius: ${builtins.toString rice.rounding}px; border-radius: ${builtins.toString rice.rounding}px;
} }
#workspaces button.active { #workspaces button.active {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.background}); color: rgb(${f background});
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.accent.base},${builtins.toString rice.transparency}); background-color: rgba(${f accent.base},${builtins.toString rice.transparency});
} }
#workspaces button:hover { #workspaces button:hover {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.tertiary.bright}); color: rgb(${f tertiary.bright});
} }
#workspaces button.urgent { #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 { #custom-mode {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.base}); color: rgb(${f red.base});
} }
#window, #custom-ctimeremaining { #window, #custom-ctimeremaining {
font-family: ${rice.font.base.name}, ${rice.font.code.name2}; 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 { #wireplumber.muted {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.tertiary.bright}); color: rgb(${f tertiary.bright});
} }
#wireplumber { #wireplumber {
padding-left: 10px; padding-left: 10px;
} }
#battery.warning:not(.charging) { #battery.warning:not(.charging) {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green.base});; color: rgb(${f green.base});;
} }
#battery.critical { #battery.critical {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.dark});; color: rgb(${f red.dark});;
background: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.bright}); 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) { #battery.critical:not(.charging) {

View File

@@ -1,98 +1,85 @@
{ config, pkgs, lib, user, rice,... }: { pkgs, rice,... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home = {
wlogout packages = with pkgs; [ wlogout ];
]; file = {
".config/wlogout/style.css".text = /* css */ ''
* { all: unset; }
home.file.".config/wlogout/style.css".text = '' window {
* { all: unset; } font-family: ${rice.font.code.name}, monospace;
font-size: 12pt;
color: ${rice.color.foreground};
background-color: rgba(0, 0, 0, ${builtins.toString rice.transparency});
}
window { button {
font-family: ${rice.font.code.name}, monospace; transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
font-size: 12pt; text-shadow: none;
color: ${rice.color.foreground}; border: none;
background-color: rgba(0, 0, 0, ${builtins.toString rice.transparency}); color: ${rice.color.foreground};
} background-color: ${rice.color.background};
margin: 5px;
}
button { button:hover {
transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; color: ${rice.color.blue.base};
text-shadow: none; }
border: none;
color: ${rice.color.foreground};
background-color: ${rice.color.background};
margin: 5px;
}
button:hover { button:focus {
color: ${rice.color.blue.base} ; color: ${rice.color.blue.base};
} }
'';
button:focus { ".config/wlogout/layout".text = /* json */ ''
color: ${rice.color.blue.base} ; {
} "label": "lock",
''; "action": "hyprlock",
"text": "[L]ock",
home.file.".config/wlogout/layout".text = '' "height": 0,
{ "width": 0,
"label": "lock", "keybind": "l"
"action": "hyprlock", }
"text": "[L]ock", {
"height": 0, "label": "reboot",
"width": 0, "action": "systemctl reboot",
"keybind": "l" "text": "[R]eboot",
} "height": 0,
{ "width": 0,
"label": "reboot", "keybind": "r"
"action": "systemctl reboot", }
"text": "[R]eboot", {
"height": 0, "label": "shutdown",
"width": 0, "action": "systemctl poweroff",
"keybind": "r" "text": "[S]hutdown",
} "height": 0,
{ "width": 0,
"label": "shutdown", "keybind": "s"
"action": "systemctl poweroff", }
"text": "[S]hutdown", {
"height": 0, "label": "logout",
"width": 0, "action": "hyprctl dispatch exit 0",
"keybind": "s" "text": "Lo[g]out",
} "height": 0,
{ "width": 0,
"label": "logout", "keybind": "g"
"action": "hyprctl dispatch exit 0", }
"text": "Lo[g]out", {
"height": 0, "label": "suspend",
"width": 0, "action": "systemctl suspend",
"keybind": "g" "text": "S[u]spend",
} "height": 0,
{ "width": 0,
"label": "suspend", "keybind": "u"
"action": "systemctl suspend", }
"text": "S[u]spend", {
"height": 0, "label": "hibernate",
"width": 0, "action": "systemctl hibernate",
"keybind": "u" "text": "[H]ibernate",
} "height": 0,
{ "width": 0,
"label": "hibernate", "keybind": "h"
"action": "systemctl hibernate", }
"text": "[H]ibernate", '';
"height": 0, };
"width": 0, };
"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, ... }: { pkgs, system, rice, inputs, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
yazi # yazi
dragon dragon
unar unar
]; ];
programs.yazi = { programs.yazi = {
enable = true; enable = true;
# package = inputs.yazi.packages.${system}.default; package = inputs.yazi.packages.${system}.default;
enableFishIntegration = true; enableFishIntegration = true;
settings = { settings = {
manager = { manager = {
@@ -28,76 +27,180 @@ lib.mkIf (user != "tv")
]; ];
}; };
opener = { opener = {
edit = [ "edit" = [
{ run = ''hx "$@"''; desc = "helix"; block = true;} { run = ''hx "$@"''; desc = "helix"; block = true;}
{ run = ''codium "$@"''; orphan = true;} { run = ''codium "$@"''; orphan = true;}
{ run = ''nano "$@"''; desc = "nano"; block = true;} { run = ''nano "$@"''; desc = "nano"; block = true;}
]; ];
play = [ "play" = [
{ run = ''mpv "$@"''; } { run = ''mpv "$@"''; }
{ run = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; desc = "Show mediainfo";} { run = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; desc = "Show mediainfo";}
]; ];
archive = [ "archive" = [
{ run = ''unar "$1"''; desc = "Extract here"; } { 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 = ''imv "$@"''; desc = "imv";}
{ run = ''gimp "$@"''; desc = "gimp";} { 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 = ''fontpreview "$@"''; desc = "fontpreview"; }
{ run = ''fontforge "$@"''; desc = "fortforge"; }
]; ];
document = [ "document" = [
{ run = ''zathura "$@"''; desc = "zathura"; } { run = ''zathura "$@"''; desc = "zathura"; }
{ run = ''xournal "$@"''; desc = "xournal"; }
{ run = ''firefox "$@"''; desc = "firefox"; } { run = ''firefox "$@"''; desc = "firefox"; }
]; ];
browser = [ "browser" = [
{ run = ''firefox "$@"''; desc = "firefox"; } { 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 "$@"''; desc = "libreoffice"; }
{ run = ''libreoffice --view "$@"''; desc = "libreoffice read-only"; } { run = ''libreoffice --view "$@"''; desc = "libreoffice read-only"; }
]; ];
shell = [ "shell" = [
{ run = ''sh -c "$@"''; desc = "sh -c"; }
{ run = ''bash -c "$@"''; desc = "bash -c"; } { run = ''bash -c "$@"''; desc = "bash -c"; }
{ run = ''fish -c "$@"''; desc = "fish -c"; }
{ run = ''sh -c "$@"''; desc = "sh -c"; }
]; ];
python = [ "python" = [
{ run = ''python "$@"''; desc = "python"; } { run = ''python "$@"''; desc = "python"; }
]; ];
"directory" = [
{ run = ''lazygit "$@"''; desc = "python"; }
];
}; };
open.rules = [ open.rules = [
{ mime = "text/*"; use = "edit"; } { mime = "text/html"; use = ["edit" "browser"]; }
{ mime = "text/plain"; use = "edit"; } { mime = "text/htm"; use = ["edit" "browser"]; }
{ mime = "text/html"; use = ["edit" "browser"]; } { mime = "text/x-python"; use = "python"; }
{ mime = "text/htm"; use = ["edit" "browser"]; } { mime = "text/*"; use = "edit"; }
{ mime = "application/x-httpd-php"; use = ["edit" "browser"]; }
{ mime = "application/json"; use = "edit"; } { mine = "inode/x-empty"; use = "edit"; }
{ mime = "application/ld+json"; use = "edit"; } { mine = "inode/directory"; use = "edit"; }
{ mime = "image/*"; use = "image"; }
{ mime = "image/svg"; use = ["image" "edit"]; } { mime = "image/*"; use = "image"; }
{ mime = "application/pdf"; use = "document"; } { mime = "image/svg"; use = ["image" "edit"]; }
{ mime = "application/epub"; use = "document"; }
{ mime = "video/*"; use = "video"; } { mime = "video/*"; use = "video"; }
{ mime = "application/vnd.oasis.opendocument.*"; use = "office"; }
{ mime = "application/vnd.ms-powerpoint"; use = "office"; } { mime = "application/x-httpd-php"; use = ["edit" "browser"]; }
{ mime = "application/vnd.ms-excel"; use = "office"; } { mime = "application/json"; use = "edit"; }
{ mime = "application/ld+json"; use = "edit"; }
{ mime = "application/pdf"; use = "document"; }
{ mime = "application/epub"; use = "document"; }
{ mime = "application/vnd.oasis.opendocument.*"; use = "office"; }
{ mime = "application/vnd.ms-powerpoint"; use = "office"; }
{ mime = "application/vnd.ms-excel"; use = "office"; }
{ mime = "application/vnd.openxmlformats-officedocument.*"; use = ["office" "edit"]; } { mime = "application/vnd.openxmlformats-officedocument.*"; use = ["office" "edit"]; }
{ mime = "application/rtf"; use = "office"; } { mime = "application/rtf"; use = "office"; }
{ mime = "application/x-sh"; use = ["edit" "shell"]; } { mime = "application/x-sh"; use = ["edit" "shell"]; }
{ mime = "application/x-python-code"; use = "python"; } { mime = "application/x-python-code"; use = "python"; }
{ mime = "text/x-python"; use = "python"; } { mime = "application/xml"; use = "edit"; }
{ mime = "application/xml"; use = "edit"; } { mime = "application/xul"; use = "edit"; }
{ mime = "application/xul"; use = "edit"; } { mime = "application/x-bzip"; use = "archive"; }
{ mime = "application/x-bzip"; use = "archive"; } { mime = "application/x-bzip2"; use = "archive"; }
{ mime = "application/x-bzip2"; use = "archive"; } { mime = "application/gzip"; use = "archive"; }
{ mime = "application/gzip"; use = "archive"; } { mime = "application/vnd.rar"; use = "archive"; }
{ mime = "application/vnd.rar"; use = "archive"; } { mime = "application/x-tar"; use = "archive"; }
{ mime = "application/x-tar"; use = "archive"; } { mime = "application/zip"; use = "archive"; }
{ mime = "application/zip"; use = "archive"; } { mime = "application/x-7z-compressed"; use = "archive"; }
{ 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, ... }: { pkgs, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = [ home.packages = [
pkgs.zoxide pkgs.zoxide

133
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 = [ imports = [
./home-modules/vscode.nix ./home-modules/auto-mount.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/bash.nix ./home-modules/bash.nix
./home-modules/starship.nix ./home-modules/bitwarden.nix
# ./home-modules/nvim.nix ./home-modules/chatterino.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/color-pallete.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.username = user;
home.homeDirectory = "/home/${user}"; home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05"; home.stateVersion = "24.05";
nixpkgs.config = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) allowed.unfree-packages;
permittedInsecurePackages = allowed.inecure-packages;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
chromium chromium
zathura # zathura
xfce.thunar xfce.thunar
spotify # spotify
spicetify-cli spicetify-cli
swww playerctl swww playerctl
imv mpv mediainfo exiftool ffmpeg imv mpv mediainfo exiftool ffmpeg
pavucontrol fontpreview gtk2fontsel pavucontrol
lynx bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow fontpreview gtk2fontsel
lynx w3m browsh
bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow
brightnessctl wev brightnessctl wev
piper-tts piper-tts
sssnake pipes sssnake pipes
dig dig
screen
reflex
gnumake gnumake
cmake cmake
@@ -91,17 +92,21 @@
wl-clipboard wl-clipboard
xclip xclip
xournal xournal
ghostscript
inputs.zen-browser.packages."${system}".default
] ++ (with pkgs-unstable; [ ] ++ (with pkgs-unstable; [
obsidian
firefox firefox
spotify
]) ++ (if host != "NxACE" then (with pkgs; [ ]) ++ (if host != "NxACE" then (with pkgs; [
signal-desktop signal-desktop
obsidian
element-desktop
zoom-us zoom-us
gimp gimp
inkscape inkscape
]) else (with pkgs; [ ]) else (with pkgs-unstable; [
])); ]));
xdg = { xdg = {

View File

@@ -1,4 +1,4 @@
{ lib, ... }: lib:
let let
# takes in "ff0044" (no hash!) and returns { r = "ff", g = "00", b = "44" } # 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; }; 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 let
grub-theme-ascii-diana = (pkgs.fetchFromGitea { grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.nx2.site"; domain = "git.${domain}";
owner = "nx2"; owner = "nx2";
repo = "grub-theme-ascii-diana"; repo = "grub-theme-ascii-diana";
rev = "0.5.0"; rev = "0.5.0";
@@ -17,13 +17,66 @@ in
environment.systemPackages = with pkgs; [ sbctl ]; environment.systemPackages = with pkgs; [ sbctl ];
boot = { boot = {
lanzaboote = { lanzaboote =
let
windows-efi-shell-fs-alias = "HD0a65535a2";
in
{
enable = true; enable = true;
pkiBundle = "/etc/secureboot"; pkiBundle = "/etc/secureboot";
}; package = lib.mkForce (pkgs.writeShellApplication {
loader.systemd-boot.enable = false; # let lanzaboote install systemd-boot 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 ]; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "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 Cam" exclusive_caps=1'';
@@ -52,9 +105,10 @@ in
''; '';
}; };
}; };
kernelPackages = pkgs-unstable.linuxPackages_6_10;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "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 } else { # NxACE
boot = { boot = {

View File

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

View File

@@ -1,42 +1,24 @@
{ pkgs, user, host, lib, ... }: { pkgs, user, ... }:
if (host != "NxACE") then
{ {
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = rec { settings = rec {
hyprland = { 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; user = user;
}; };
default_session = hyprland; default_session = hyprland;
vt = 2; vt = 2;
}; };
}; };
} systemd.services.greetd.serviceConfig = {
else Type = "idle";
{ StandardInput = "tty";
environment.systemPackages = with pkgs; [ StandardOutput = "tty";
sddm Standarderror = "journal"; # Without this errors will spam on screen
# where-is-my-sddm-theme # Without these bootlogs will spam on screen
]; TTYReset = true;
services.xserver = { TTYVHangup = true;
displayManager = { TTYVTDisallocate = true;
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";
};
};
}; };
} }

View File

@@ -15,6 +15,7 @@
users.users."${user}".extraGroups = [ "docker" ]; users.users."${user}".extraGroups = [ "docker" ];
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80
443
8384 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, ...}: { config, pkgs, ...}:
{ {
environment.systemPackages = with pkgs; [ environment = {
jmtpfs 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") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
environment.systemPackages = if host == "NxNORTH" then with pkgs; [ environment.systemPackages = with pkgs; [
ntfs3g 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.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
# boot.initrd.kernelModules = [ ]; # boot.initrd.kernelModules = [ ];
@@ -19,7 +16,7 @@
fileSystems = if host != "NxACE" then { fileSystems = if host != "NxACE" then {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; }; "/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 { } else {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; }; "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };

View File

@@ -1,24 +1,30 @@
{ pkgs, lib, host, secrets, ... }: { pkgs, lib, host, secrets, ... }:
lib.mkIf (host != "NxACE")
{ {
environment.systemPackages = [ environment.systemPackages = with pkgs; [
pkgs.strongswanNM strongswanNM
]; ];
environment.etc = { environment.etc = {
# Easyroam # # Easyroam
"ssl/certs/easyroam_client_cert.pem".source = ../secrets/easyroam-hsmw/easyroam_client_cert.pem; # "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_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; # "ssl/certs/easyroam_client_key.pem".source = ../secrets/easyroam-hsmw/easyroam_client_key.pem;
"NetworkManager/system-connections/eduroam.nmconnection" = { # "NetworkManager/system-connections/eduroam.nmconnection" = {
text = secrets.easyroamHSMW.nmconfig; # text = secrets.easyroamHSMW.nmconfig;
mode = "0600"; # mode = "0600";
}; # };
"ipsec.d/hsmw.secrets".text = ''${secrets.email.hsmw.mail} : EAP "${secrets.email.hsmw.password}"''; # "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-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/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; networking.networkmanager.enableStrongSwan = true;
@@ -31,19 +37,19 @@ lib.mkIf (host != "NxACE")
}; };
connections = { connections = {
hsmw = { hsmw = {
keyexchange = "ikev2"; keyexchange = "ikev2";
left = "%defaultroute"; left = "%defaultroute";
leftid = "%any"; leftid = "%any";
leftauth = "eap"; leftauth = "eap";
eap_identity = secrets.email.hsmw.mail; eap_identity = "${secrets.email.hsmw.un}@hs-mittweida.de";
leftsourceip = "%config"; leftsourceip = "%config";
leftdns = "%config4"; leftdns = "%config4"; # Ensure that DNS resolution works as expected
leftfirewall = "no"; leftfirewall = "no"; # Keep firewall disabled, but manually check rules
right = "141.55.128.84"; right = "141.55.128.84";
rightid = "@vpn4.hs-mittweida.de"; 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"; rightauth = "pubkey";
auto = "add"; auto = "add";
}; };
}; };
managePlugins = true; managePlugins = true;
@@ -73,7 +79,7 @@ lib.mkIf (host != "NxACE")
"openssl" "openssl"
"resolve" "resolve"
]; ];
secrets = [ "/etc/ipsec.d/hsmw.secrets" ]; secrets = [ "/etc/ipsec.d/hsmw.secret" ];
ca = { ca = {
hsmw = { hsmw = {
auto = "add"; 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, ... }: { pkgs, lib, host, ... }:
lib.mkIf (host == "NxACE") lib.mkIf (host == "NxACE")
{ {}
services.xserver.desktopManager.kodi = { # {
enable = true; # services.xserver.desktopManager.kodi = {
}; # enable = true;
services.cage = { # };
user = "kodi"; # services.cage = {
program = "${pkgs.kodi-wayland}/bin/kodi-standalone"; # user = "kodi";
enable = true; # program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
}; # enable = true;
} # };
# }

View File

@@ -1,14 +1,32 @@
{ pkgs, lib, host, secrets, ... }:
{ config, pkgs, host, ... }:
let
in
{ {
# sops.secrets = {
# "wireless-networking.env" = {};
# };
networking.hostName = host; networking = {
nameservers = [
networking.networkmanager = { "1.1.1.1"
enable = true; "8.8.8.8"
];
hostName = host;
networkmanager = {
enable = 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";
};
}; };
networking.enableIPv6 = true;
} }

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,72 +1,67 @@
{ config, pkgs, pkgs-unstable, lib, nvidia, ... }: { config, pkgs, lib, nvidia, ... }:
let lib.mkIf nvidia.enable
in
{ {
config = lib.mkIf nvidia.enable { environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [ lshw
lshw glxinfo
nvtop (pkgs.writeShellScriptBin "nvidia-offload" ''
glxinfo export __NV_PRIME_RENDER_OFFLOAD=1
(pkgs.writeShellScriptBin "nvidia-offload" '' export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __NV_PRIME_RENDER_OFFLOAD=1 export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 export __VK_LAYER_NV_optimus=NVIDIA_only
export __GLX_VENDOR_LIBRARY_NAME=nvidia exec "$@"
export __VK_LAYER_NV_optimus=NVIDIA_only '')
exec "$@" # ] ++ [
'') # pkgs-unstable.nvtopPackages.intel
] ++ [ # pkgs-unstable.nvtopPackages.nvidia
# pkgs-unstable.nvtopPackages.intel ];
# pkgs-unstable.nvtopPackages.nvidia
];
# Load nvidia driver for Xorg and Wayland # Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware = { hardware = {
nvidia = { nvidia = {
prime = lib.mkIf nvidia.prime { prime = lib.mkIf nvidia.prime {
intelBusId = "PCI:0:2:0"; intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0"; nvidiaBusId = "PCI:1:0:0";
offload = { offload = {
enable = true; enable = true;
enableOffloadCmd = true; enableOffloadCmd = true;
};
}; };
modesetting.enable = true;
# Modesetting is required.
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = true;
# 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;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
}; };
modesetting.enable = true;
# Modesetting is required.
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = true;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = nvidia.prime;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.beta; };
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
}; };
}; };
} }

View File

@@ -1,55 +1,186 @@
{ pkgs, lib, user, host, ... }: { config, pkgs, domain, secrets, ... }:
lib.mkIf (host == "NxACE")
{ {
sops.secrets = {
"nx2site/namecheap.pw" = { };
# "nx2site/cloudflare/api-token-dns-edit" = { };
"nx2site/cloudflare/global-api-key" = { };
};
systemd = { systemd = {
timers."namecheap-dynamic-dns" = { timers."dynamic-dns" = {
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnBootSec = "2m"; OnBootSec = "2m";
OnUnitActiveSec = "10m"; OnUnitActiveSec = "10m";
Unit = "namecheap-dynamic-dns.service"; Unit = "dynamic-dns.service";
}; };
}; };
services."namecheap-dynamic-dns" = services."dynamic-dns" = let
let u = let
u = pkgs.writeScriptBin "update_namecheap" '' account_id = secrets.email.gmail-online.mail;
my_ip=$(${pkgs.curl}/bin/curl -s https://ipinfo.io/ip) zone_id = "33fecab36e060f49d492127345ea95a0";
dns_ip=$(${pkgs.dig}/bin/nslookup nx2.site | grep -E "Address: [0-9]" | cut -c 10-) record_id = {
fdc="/home/nx2/nx2site/domain/count.txt" 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
force_update=false 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()
while getopts "f" opt; do def main():
case $opt in my_ip = get_public_ip()
f) my_ip6 = get_public_ip(ipv6=True)
force_update=true
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
if [ "$force_update" == true ] || [ "$my_ip" != "$dns_ip" ]; then with open("${count-file-path}", "r") as f:
count=$(<$fdc) content = f.read()
echo [ $count times ] $(date) from $dns_ip to $my_ip >> /home/nx2/nx2site/domain/updates.log if content == "": count = 0
pw=$(cat /home/nx2/nx2site/domain/pw.txt) else: count = int(content)
${pkgs.curl}/bin/curl -s "https://dynamicdns.park-your-domain.com/update?host=@&domain=nx2.site&password=$pw&ip=$my_ip" count += 1
${pkgs.curl}/bin/curl -s "https://dynamicdns.park-your-domain.com/update?host=*&domain=nx2.site&password=$pw&ip=$my_ip" with open("${count-file-path}", "w") as f:
echo 0 > $fdc f.write(str(count))
fi
# 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 in {
{
script = '' script = ''
set -eu set -eu
${u}/bin/update_namecheap ${u}/bin/dyn_dns
''; '';
serviceConfig = { serviceConfig = {
Type = "oneshot"; 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, ... }: { pkgs, pkgs-unstable, pkgs-latest, lib, host, nvidia, ... }:
let
{ p = pkgs-latest.ollama;
environment.systemPackages = with pkgs; [ # p = pkgs-unstable.ollama.overrideAttrs (oldAttrs: rec {
ollama # 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 ];
# services.ollama.environmentVariables = {
# OLLAMA_ORIGINS = "*";
# };
# 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 = { services.ollama = {
package = p;
enable = true; enable = true;
acceleration = lib.mkIf nvidia.enable "cuda"; acceleration = lib.mkIf nvidia.enable "cuda";
listenAddress = if host == "NxACE" then "0.0.0.0:11434" else "127.0.0.1:11434"; 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 = { services.pipewire = {
@@ -9,4 +9,4 @@
# If you want to use JACK applications, uncomment this # If you want to use JACK applications, uncomment this
jack.enable = true; jack.enable = true;
}; };
} }

View File

@@ -1,5 +1,10 @@
{ config, lib, user, host, secrets, ...}: {
let config,
lib,
user,
host,
secrets,
... }: let
# helper funcitons # helper funcitons
conv = _: device: with device; { "${name}" = {id = id;};}; conv = _: device: with device; { "${name}" = {id = id;};};
justname = devices: (builtins.map (device: device.name)) devices; justname = devices: (builtins.map (device: device.name)) devices;
@@ -17,17 +22,18 @@ let
}; };
dirs = { dirs = {
default = { name = "sync"; path = "/home/${user}/sync"; }; 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 in {
lib.mkIf (user != "tv")
{
sops.secrets = { sops.secrets = {
"syncthing/${host}/cert.pem" = { owner = user; }; "syncthing/${host}/cert.pem" = { owner = user; };
"syncthing/${host}/key.pem" = { owner = user; }; "syncthing/${host}/key.pem" = { owner = user; };
}; };
services.syncthing = with (builtins.mapAttrs conv devices); { services.syncthing = with (builtins.mapAttrs conv devices); {
enable = true; enable = true;
user = "${user}"; user = "${user}";
@@ -45,8 +51,7 @@ lib.mkIf (user != "tv")
) else if (host == "NxNORTH") then ( ) else if (host == "NxNORTH") then (
xps // ace // s21u xps // ace // s21u
) else ( ) else (
# north // xps // s21u // diane // daniel // tessa // georg north // xps // s21u // diane // daniel // tessa // georg
north // xps // s21u
); );
folders = with dirs; if (host == "NxXPS") then { folders = with dirs; if (host == "NxXPS") then {
"${default.name}" = { "${default.name}" = {
@@ -58,11 +63,31 @@ lib.mkIf (user != "tv")
path = default.path; path = default.path;
devices = with devices; (justname [ xps ace s21u ]); devices = with devices; (justname [ xps ace s21u ]);
}; };
} else { } else { # NxACE
"${default.name}" = { "${default.name}" = {
path = default.path; path = default.path;
devices = with devices; (justname [ xps north s21u ]); 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 = { gui = {
theme = "black"; 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.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
users.users."${user}" = { users.users."${user}" = {
isNormalUser = true; 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; useDefaultShell = true;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key "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 = { programs = {
bash = { bash = {

View File

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