Compare commits

...
316 Commits
Author SHA1 Message Date
Jan-Bulthuis 68c241f31a Changed location of some persistence files 2025-05-29 18:32:08 +02:00
Jan-Bulthuis 81c37abadd Fixed impermanence not mounting persist 2025-05-29 17:05:15 +02:00
Jan-Bulthuis 85c962fd6d Updated REAME.md 2025-05-29 17:04:58 +02:00
Jan-Bulthuis b0a8874a93 Set up impermanence 2025-05-29 16:34:24 +02:00
Jan-Bulthuis 01021d179d Fixed hold command 2025-05-29 15:49:24 +02:00
Jan-Bulthuis b8a607c3d0 Fixed hold command 2025-05-29 15:31:46 +02:00
Jan-Bulthuis 793015646d Updated base vm config 2025-05-29 15:10:10 +02:00
Jan-Bulthuis 43f472fe88 Fixed reference to incorrect zfs pool 2025-05-29 14:36:07 +02:00
Jan-Bulthuis 51ab89cd98 Better disko setup 2025-05-29 14:19:19 +02:00
Jan-Bulthuis f0d56df191 Addid disko config for zfs 2025-05-29 13:06:13 +02:00
Jan-Bulthuis 9a97168950 Moved profiles to dedicated directory 2025-05-29 12:16:38 +02:00
Jan-Bulthuis cdffa07675 Reenable timeout 2025-05-29 09:59:09 +02:00
Jan-Bulthuis 13fbcea361 Disabled https 2025-05-28 19:26:11 +02:00
Jan-Bulthuis 36c2c907d5 Fixed tls private key file name 2025-05-28 16:46:25 +02:00
Jan-Bulthuis 11bc7221e3 Added batch flag 2025-05-28 16:39:52 +02:00
Jan-Bulthuis 3a6122784b Generate self-signed tls for wstunnel 2025-05-28 16:35:59 +02:00
Jan-Bulthuis d4338f1861 Added local to the minecraft group 2025-05-28 16:15:38 +02:00
Jan-Bulthuis ea290d9158 Install tmux 2025-05-28 16:13:49 +02:00
Jan-Bulthuis 9cc07cdfaf Created a minecraft server vm 2025-05-28 15:59:22 +02:00
Jan-Bulthuis 33b9cee6a0 Installed wireshark 2025-05-28 15:59:13 +02:00
Jan-Bulthuis 47479f40d1 Installed wireshark 2025-05-28 15:58:52 +02:00
Jan-Bulthuis e1cc2342b2 Added certificates back in 2025-05-28 14:12:00 +02:00
Jan-Bulthuis 092b3551c1 Remove tls certificates 2025-05-28 14:06:31 +02:00
Jan-Bulthuis 9d50a66388 Set up admin user 2025-05-28 13:59:30 +02:00
Jan-Bulthuis 4a644607c6 Restructured glue 2025-05-28 13:39:00 +02:00
Jan e134b3db6e Merge pull request 'Restructuring' (#1) from blueprint into main
Reviewed-on: Jan/dotfiles#1
2025-05-28 10:41:38 +00:00
Jan-Bulthuis 4cd01f17a3 Remove unorganized 2025-05-28 12:37:29 +02:00
Jan-Bulthuis e872cf3788 Changed tunnel address 2025-05-28 12:36:12 +02:00
Jan-Bulthuis f4d938073c Update 2025-05-28 12:23:48 +02:00
Jan-Bulthuis 01374fe5b0 Added vpn vm with wstunnel server 2025-05-28 12:23:31 +02:00
Jan-Bulthuis a75b839bc1 Replaced evince with papers 2025-05-28 12:22:49 +02:00
Jan-Bulthuis 8c8b6b0206 Made vm-audio buildable 2025-05-28 12:22:34 +02:00
Jan-Bulthuis 1829531f25 Fixed build issue due to home-manager not working for root for some reason 2025-05-28 12:22:07 +02:00
Jan-Bulthuis daab746b40 Fixed printing 2025-05-28 12:21:45 +02:00
Jan-Bulthuis 6c452c6649 Refactor home manager profile 2025-05-25 11:55:51 +02:00
Jan-Bulthuis 63386512a8 System update 2025-05-23 15:11:06 +02:00
Jan-Bulthuis ad8d7c8c09 Reworked DE 2025-05-18 15:01:25 +02:00
Jan-Bulthuis c37238700d Added dconf-editor and bottles 2025-05-18 15:01:14 +02:00
Jan-Bulthuis 330f5e2a50 Enabled libvirtd 2025-05-18 15:01:05 +02:00
Jan-Bulthuis fbbe869550 Reworked glue input 2025-05-18 15:00:51 +02:00
Jan-Bulthuis 5e23488cae Progress 2025-05-13 14:26:22 +02:00
Jan-Bulthuis 760815da50 Reorganized 2025-05-09 15:27:44 +02:00
Jan-Bulthuis c3c61ce654 Updated personal config 2025-05-09 15:01:50 +02:00
Jan-Bulthuis 626d78f088 Added BvA user 2025-05-09 15:01:40 +02:00
Jan-Bulthuis bcd5606107 Restarted firewall 2025-05-09 15:01:25 +02:00
Jan-Bulthuis f8fbb52607 Small change 2025-05-09 15:01:14 +02:00
Jan-Bulthuis 2b0bdb0248 Enabled grdp correctly by adding GDM 2025-05-09 15:01:07 +02:00
Jan-Bulthuis f0403330e2 Fixed package 2025-05-09 15:00:51 +02:00
Jan-Bulthuis e10079e578 Updated some theming 2025-05-09 15:00:21 +02:00
Jan-Bulthuis 2a8fcf627b Fixed some packages 2025-05-09 14:59:38 +02:00
Jan-Bulthuis 3d54536168 Set up account or programming contests 2025-05-09 14:59:11 +02:00
Jan-Bulthuis 2c0ae15417 Set controller mode 2025-04-26 14:26:19 +02:00
Jan-Bulthuis 4ed934350d Enabled JustWorksRepairing 2025-04-26 13:49:33 +02:00
Jan-Bulthuis 989ee1f6e5 Set bluez5 role 2025-04-26 13:31:01 +02:00
Jan-Bulthuis 1c9f01034e Updated BT config 2025-04-26 13:04:51 +02:00
Jan-Bulthuis f62780826b Simplified settings 2025-04-26 01:06:22 +02:00
Jan-Bulthuis 83829303b5 Further bluetooth configuration 2025-04-26 00:50:43 +02:00
Jan-Bulthuis d46d321142 Enabled bluetooth 2025-04-26 00:30:17 +02:00
Jan-Bulthuis f6442c65dd Enabled graphics 2025-04-24 17:58:04 +02:00
Jan-Bulthuis e7aac4bef4 Reordered arguments 2025-04-24 16:50:31 +02:00
Jan-Bulthuis 8799c3c943 Fix typo 2025-04-24 15:29:36 +02:00
Jan-Bulthuis 3631918db2 Simplified carla-osc setup 2025-04-24 15:24:52 +02:00
Jan-Bulthuis 180d0b3b00 Fixed issue in carla_osc_bridge 2025-04-24 15:24:12 +02:00
Jan-Bulthuis b191a3ff94 More firewall expansion 2025-04-24 14:46:34 +02:00
Jan-Bulthuis 54d8f51fb5 Updated firewall 2025-04-24 14:38:30 +02:00
Jan-Bulthuis 9089f9d936 Added carla_osc_bridge for bidirectional osc commands 2025-04-24 14:08:51 +02:00
Jan-Bulthuis cdee5ca0e8 Enabled qt 2025-04-24 10:48:17 +02:00
Jan-Bulthuis ca9757fecb Simplified setup 2025-04-23 15:13:51 +02:00
Jan-Bulthuis d516be8e29 System update 2025-04-23 14:44:20 +02:00
Jan-Bulthuis bfe15b2409 Disabled modrinth 2025-04-23 14:44:08 +02:00
Jan-Bulthuis 466fff5753 Fixed stylix vscode profile name 2025-04-23 14:44:00 +02:00
Jan-Bulthuis b965351818 Disabled non-free emulators 2025-04-23 14:21:29 +02:00
Jan-Bulthuis 7d806c7548 Removed wprsd service 2025-04-23 14:21:17 +02:00
Jan-Bulthuis c28b56fc63 Set volume 2025-04-23 14:21:07 +02:00
Jan-Bulthuis e6374ca39b Made Xpra floating in River 2025-04-22 19:42:58 +02:00
Jan-Bulthuis cd9653561c Added wireshark 2025-04-22 19:42:47 +02:00
Jan-Bulthuis 6664cce060 Enabled spotifyd autoplay 2025-04-19 10:46:36 +02:00
Jan-Bulthuis 22853f0190 Set default osc target 2025-04-19 10:46:25 +02:00
Jan-Bulthuis bc5148e601 Opened port for open-stage-control 2025-04-18 21:50:14 +02:00
Jan-Bulthuis 6b99c0f771 Added a module for Xpra 2025-04-18 21:49:36 +02:00
Jan-Bulthuis 41867fb653 Added a service for open stage control 2025-04-18 21:49:10 +02:00
Jan-Bulthuis c063cf2dac Fixed an error 2025-04-18 17:41:01 +02:00
Jan-Bulthuis 755ce711fe Added xpra setup 2025-04-18 17:34:36 +02:00
Jan-Bulthuis a6190e3bb2 Install waypipe 2025-04-18 16:30:19 +02:00
Jan-Bulthuis 5c575254a1 Supplied project file to carla 2025-04-18 15:22:40 +02:00
Jan-Bulthuis f06855c2a2 Set up firewall for Carla 2025-04-18 15:19:27 +02:00
Jan-Bulthuis 435787f440 Added a carla service 2025-04-18 15:12:08 +02:00
Jan-Bulthuis b7c1710046 Fixed some sysctl values 2025-04-18 11:59:36 +02:00
Jan-Bulthuis aac0926608 Dedicated more memory to network hardware 2025-04-18 11:57:35 +02:00
Jan-Bulthuis 8393f03b2a wprs back to default build 2025-04-18 11:57:20 +02:00
Jan-Bulthuis 26a4cba43c Moved wprs to a debug version 2025-04-18 10:22:52 +02:00
Jan-Bulthuis 102433be68 Set up xdg icons 2025-04-18 10:02:16 +02:00
Jan-Bulthuis ba3d327a1b Setup qt 2025-04-18 09:58:54 +02:00
Jan-Bulthuis a518fab421 Added xserver 2025-04-18 09:49:49 +02:00
Jan-Bulthuis 268276ceb3 Removed display manager xpra 2025-04-17 23:58:45 +02:00
Jan-Bulthuis 31f47d22d7 Enabled xserver 2025-04-17 22:31:56 +02:00
Jan-Bulthuis e6a8899c1f Added xpra 2025-04-17 22:21:05 +02:00
Jan-Bulthuis 55dc78ed46 Set spotifyd pulseaudio device name 2025-04-17 22:07:52 +02:00
Jan-Bulthuis 11245c49ce Back to new version 2025-04-17 21:52:49 +02:00
Jan-Bulthuis 6034a44d61 Went bang to older wprs version 2025-04-17 21:28:30 +02:00
Jan-Bulthuis 27dde8e40a Added some null sinks 2025-04-17 19:44:46 +02:00
Jan-Bulthuis af3984498c Made mixer user linger 2025-04-17 18:46:20 +02:00
Jan-Bulthuis 65605dbf57 Moved spotifyd to user service 2025-04-17 18:44:52 +02:00
Jan-Bulthuis d3798b201a Changed backend to pulseaudio 2025-04-17 18:40:12 +02:00
Jan-Bulthuis 74f62b34cf Changed spotifyd user to mixer, disabled mpris 2025-04-17 18:32:25 +02:00
Jan-Bulthuis 78077638fc Added spotifyd 2025-04-17 18:19:48 +02:00
Jan-Bulthuis baca029fcc Revert 2025-04-17 16:55:05 +02:00
Jan-Bulthuis ce620d3eb2 Fixed missing field 2025-04-17 16:50:36 +02:00
Jan-Bulthuis 0786e3b13c Reenabled roc with jack rule to prevent self connections 2025-04-17 16:49:03 +02:00
Jan-Bulthuis 281dbd7779 Removed roc again 2025-04-17 16:15:28 +02:00
Jan-Bulthuis 05c2c9dc30 Reverted adding latency target 2025-04-17 16:14:14 +02:00
Jan-Bulthuis 11496e21e2 Set target latency for roc 2025-04-17 16:11:40 +02:00
Jan-Bulthuis af7181e705 Reenable roc source 2025-04-17 15:30:00 +02:00
Jan-Bulthuis 7311a0f94f Cleanup 2025-04-17 15:20:50 +02:00
Jan-Bulthuis 9b0bcc56d6 Disabled roc source 2025-04-17 15:03:01 +02:00
Jan-Bulthuis 2321832fbf Updated roc configuration 2025-04-17 14:48:22 +02:00
Jan-Bulthuis dd23e88fc1 Added roc source and sink 2025-04-17 14:42:54 +02:00
Jan-Bulthuis b77bc17058 Added distrho-ports plugins 2025-04-17 13:30:03 +02:00
Jan-Bulthuis 14a8061913 Cleanup 2025-04-17 05:11:13 +02:00
Jan-Bulthuis 4168ac91d9 Added pugl to dependencies 2025-04-17 05:07:39 +02:00
Jan-Bulthuis 31360d7963 Changed some packages around 2025-04-17 04:44:03 +02:00
Jan-Bulthuis 512c7206b4 Added more plugins 2025-04-17 04:27:10 +02:00
Jan-Bulthuis cab19bedb7 Installed lsp-plugins systemwide 2025-04-17 03:52:48 +02:00
Jan-Bulthuis a580b69c40 Added dependency on lsp-plugins 2025-04-17 03:47:30 +02:00
Jan-Bulthuis d1ed464438 Added fontconfig and libx11 dependency 2025-04-17 03:36:17 +02:00
Jan-Bulthuis e16c0072a7 Fixed conflicting definition 2025-04-17 03:10:32 +02:00
Jan-Bulthuis 712c81af12 Added dependencies to path 2025-04-17 03:04:54 +02:00
Jan-Bulthuis 51e102bb39 Added some plugins to vm-audio 2025-04-17 02:17:47 +02:00
Jan-Bulthuis 13b66648fd Added wprs desktop entries 2025-04-17 02:17:38 +02:00
Jan-Bulthuis a43d2bf6b5 Added users to the audio group 2025-04-16 21:35:26 +02:00
Jan-Bulthuis 31188f0438 Removed older kernel 2025-04-16 21:16:00 +02:00
Jan-Bulthuis 0fff6a7d7d Even older kernel version 2025-04-16 20:31:29 +02:00
Jan-Bulthuis 5a97cd69e2 Changed kernel version 2025-04-16 20:28:38 +02:00
Jan-Bulthuis 18db7c616d Added rtkit for pipewire 2025-04-16 20:01:02 +02:00
Jan-Bulthuis 7c37e5d216 Moved to login shell 2025-04-16 18:33:26 +02:00
Jan-Bulthuis a7a4294195 Added path echo 2025-04-16 17:59:33 +02:00
Jan-Bulthuis a3a2616cf8 Added dependencies to path 2025-04-16 17:55:38 +02:00
Jan-Bulthuis ea95dfa0d3 Added xwayland 2025-04-16 17:50:28 +02:00
Jan-Bulthuis 5e8d66d34e Added wprs 2025-04-16 17:16:18 +02:00
Jan-Bulthuis 65b480a007 Added Carla and enable audio 2025-04-16 17:15:33 +02:00
Jan-Bulthuis d72ecc6b27 Added ssh key for mixer 2025-04-16 17:04:16 +02:00
Jan-Bulthuis db2d29131c Added path to xwayland-xdg-shell 2025-04-16 16:51:01 +02:00
Jan-Bulthuis ce9f10504a Added xwayland 2025-04-16 16:42:48 +02:00
Jan-Bulthuis f1bb1df177 Add full logs 2025-04-16 16:37:47 +02:00
Jan-Bulthuis 780cd0dfab Updated wprs 2025-04-16 16:26:49 +02:00
Jan-Bulthuis 1ddc3eae29 Added wprs for dependencies 2025-04-16 16:02:03 +02:00
Jan-Bulthuis 44878527f5 Added mixer to journal group 2025-04-16 15:58:48 +02:00
Jan-Bulthuis 21c7272015 Update wprsd service 2025-04-16 15:47:59 +02:00
Jan-Bulthuis 26c5ce5cf3 Moved wprsd to proper user service 2025-04-16 15:43:58 +02:00
Jan-Bulthuis 12c56eaac5 Fixed UID 2025-04-16 15:38:54 +02:00
Jan-Bulthuis 137b380b73 Added XDG_RUNTIME_DIR to wprsd service 2025-04-16 15:35:45 +02:00
Jan-Bulthuis 8629061724 Added group for mixer user 2025-04-16 15:24:55 +02:00
Jan-Bulthuis 16b781f11d Added wprsd service 2025-04-16 15:23:22 +02:00
Jan-Bulthuis 2e36274256 Disable some color theme settings without desktop enabled 2025-04-16 14:35:23 +02:00
Jan-Bulthuis ccdbfd81ac Added qemu guestagent 2025-04-16 14:33:15 +02:00
Jan-Bulthuis 59a16df0a3 Removed some programs 2025-04-16 14:22:09 +02:00
Jan-Bulthuis fa2413f272 Split up code to support server configuration 2025-04-16 13:54:14 +02:00
Jan-Bulthuis 6364d8afa0 Updated CSD logic 2025-04-16 13:06:16 +02:00
Jan-Bulthuis c894f00eb0 Added flatpak options 2025-04-16 13:06:09 +02:00
Jan-Bulthuis 1300acd7ce Remove wpa_supplicant_gui 2025-04-16 13:05:40 +02:00
Jan-Bulthuis 5b1022a52b Update 2025-04-16 13:05:20 +02:00
Jan-Bulthuis b9c7a4c4c7 Fixed firefox searchengine name 2025-04-16 13:05:10 +02:00
Jan-Bulthuis cdedce8d5b Renamed wpaperd 2025-04-16 13:04:20 +02:00
Jan-Bulthuis 3f6fcdc283 Fixed wireguard issue with firewall 2025-04-16 13:04:00 +02:00
Jan-Bulthuis 8738fa3066 Fixed vscode customization 2025-04-16 13:03:45 +02:00
Jan-Bulthuis 9c9fe6b18a Added gnome environment back in, fixed es-de 2025-04-16 13:02:27 +02:00
Jan-Bulthuis 885940fd69 Removed unneeded hash 2025-04-16 13:01:24 +02:00
Jan-Bulthuis f41cd9c922 Added battery state to GNOME 2025-04-16 13:01:15 +02:00
Jan-Bulthuis 2f069029e9 Moved to beta nvidia driver 2025-04-16 13:00:52 +02:00
Jan-Bulthuis bebe6eaeeb Enabled grdp and printing 2025-04-16 13:00:40 +02:00
Jan-Bulthuis 7b92e0d364 Added Jack support to pipewire 2025-04-16 13:00:30 +02:00
Jan-Bulthuis 24519ceea7 Added printing and grdp modules 2025-04-16 13:00:18 +02:00
Jan-Bulthuis a0cb0d1f44 Set default background 2025-02-27 11:18:09 +01:00
Jan-Bulthuis 4fed3712b0 Added background module for themed backgrounds 2025-02-27 11:13:47 +01:00
Jan-Bulthuis 2aa2a5ecba Fixed the system keyring 2025-02-27 11:13:33 +01:00
Jan-Bulthuis c4326f1aba Removed the use for dbus-run-session 2025-02-27 11:13:03 +01:00
Jan-Bulthuis 8b70bcb229 Removed i3 module 2025-02-27 11:12:42 +01:00
Jan-Bulthuis d2fa73f887 Modified specialisation generation slightly 2025-02-27 11:12:24 +01:00
Jan-Bulthuis 3619713bf2 Updated nixgreety 2025-02-27 11:12:01 +01:00
Jan-Bulthuis a61d63ff2c Fixed systemwide config 2025-02-27 11:11:52 +01:00
Jan-Bulthuis 8ca41a3a46 Enabled rtkit 2025-02-27 11:10:45 +01:00
Jan-Bulthuis 00ce18733e Removed wpa_supplicant line from laptop config 2025-02-27 11:10:14 +01:00
Jan-Bulthuis b5b5063065 Set up desktop environments 2025-02-23 14:53:11 +01:00
Jan-Bulthuis 1d5233512b Added cosmic desktop flake 2025-02-23 14:53:00 +01:00
Jan-Bulthuis 8858b2967c Pinned es-de reference to nixpkgs-stable 2025-02-23 14:52:46 +01:00
Jan-Bulthuis 8f2708d137 Removed unnecessary imports 2025-02-23 14:52:28 +01:00
Jan-Bulthuis f224a5efa7 Set default terminal 2025-02-23 14:52:07 +01:00
Jan-Bulthuis 63093d8a87 Progress on desktop system, added integration with nixgreety 2025-02-23 14:51:56 +01:00
Jan-Bulthuis 86b8a5571b Switched to nixgreety for greeter 2025-02-23 14:51:07 +01:00
Jan-Bulthuis 4775dac377 Added nixgreety module 2025-02-23 14:50:51 +01:00
Jan-Bulthuis 839df21c46 Added nixgreety package 2025-02-23 14:50:14 +01:00
Jan-Bulthuis 539b63cc1c Removed debug info from dina-psfu 2025-02-23 14:49:55 +01:00
Jan-Bulthuis b62640e1df Moved pipewire to base 2025-02-23 14:49:36 +01:00
Jan-Bulthuis ef385b01e8 Updated systemwide to look into specialisations 2025-02-23 14:48:54 +01:00
Jan-Bulthuis f7ea0d0c11 Added swap file 2025-02-23 14:48:32 +01:00
Jan-Bulthuis 77fc328c84 Moved desktop config 2025-02-17 15:38:32 +01:00
Jan-Bulthuis a68f032fee Moved theming modules 2025-02-17 15:06:20 +01:00
Jan-Bulthuis c6cd3018db Implement quick and dirty es-de fix 2025-02-17 14:53:20 +01:00
Jan-Bulthuis 3b6a8104bf Pass system as specialArg 2025-02-17 14:52:57 +01:00
Jan-Bulthuis ae96717720 System update 2025-02-17 13:05:27 +01:00
Jan-Bulthuis 036f619673 Rewrote systemwide system, fixed broken build 2025-02-17 12:53:45 +01:00
Jan-Bulthuis 42040403b1 Removed i3 and glpaper from personal config 2025-02-17 12:52:16 +01:00
Jan-Bulthuis 07c056b0cd Fixed package import name 2025-02-17 12:51:56 +01:00
Jan-Bulthuis d35276baeb Renamed dina-psf to dina-psfu 2025-02-17 12:51:43 +01:00
Jan-Bulthuis 07bad003ba Removed insecure package exceptions 2025-02-17 12:49:33 +01:00
Jan-Bulthuis 9a5bd2177c Reorganized desktop, simplified systemwide setup 2025-02-16 18:15:44 +01:00
Jan-Bulthuis 627c29ba9f Moved from nixos-unstable to nixpkgs-unstable 2025-02-15 16:30:07 +01:00
Jan-Bulthuis a7c8793fdd Added some more settings to vscode 2025-02-15 16:29:53 +01:00
Jan-Bulthuis 5193284380 Updated cpp module 2025-02-15 16:28:59 +01:00
Jan-Bulthuis 187b23fd64 Added mkenv script 2025-02-15 16:28:38 +01:00
Jan-Bulthuis 7080ae11af Revert "System update"
This reverts commit f98b995b80.
2025-02-12 11:56:37 +01:00
Jan-Bulthuis 0981168012 Disabled Mathematica 2025-02-12 04:09:08 +01:00
Jan-Bulthuis 135a4b76a7 Undid some work because it was not pure and hence not possible 2025-02-12 04:08:29 +01:00
Jan-Bulthuis 596494e41b Added mathematica installer 2025-02-12 04:06:53 +01:00
Jan-Bulthuis f98b995b80 System update 2025-02-12 03:37:45 +01:00
Jan-Bulthuis c44bffaeb0 Made quit action repeating 2025-02-12 03:35:09 +01:00
Jan-Bulthuis 4f4e2087b0 Updated river configuration 2025-02-12 03:32:53 +01:00
Jan-Bulthuis a04f791e06 Ly implementation 2025-02-12 03:23:49 +01:00
Jan-Bulthuis fa95171f28 Code cleanup 2025-02-12 02:18:58 +01:00
Jan-Bulthuis 4c04d14d8f Fixed dina-psf 2025-02-12 02:17:20 +01:00
Jan-Bulthuis 86f4a23831 Corrected filename 2025-02-12 00:57:09 +01:00
Jan-Bulthuis e3877111b5 Added sfm file 2025-02-12 00:54:56 +01:00
Jan-Bulthuis 2374c19a0f Added custom fontset 2025-02-12 00:40:12 +01:00
Jan-Bulthuis 5995d1ea37 Progress on dina-psf 2025-02-11 23:01:54 +01:00
Jan-Bulthuis fc5429a981 Added ly dependencies 2025-02-11 22:33:14 +01:00
Jan-Bulthuis b453a32d70 Added overlay package for ly 2025-02-11 22:28:25 +01:00
Jan-Bulthuis f94242e4b5 Removed dina-vector 2025-02-11 22:27:40 +01:00
Jan-Bulthuis 7a1dca2a96 Added ly as displaymanager 2025-02-11 22:21:52 +01:00
Jan-Bulthuis f9bf846c72 Modified font 2025-02-11 19:31:06 +01:00
Jan-Bulthuis 4400dc070f Fixed font 2025-02-11 19:30:26 +01:00
Jan-Bulthuis 555c48dc3b Removed console 2025-02-11 19:30:20 +01:00
Jan-Bulthuis 2c533f6f57 Added derivation for ttf2psf 2025-02-11 18:45:13 +01:00
Jan-Bulthuis 7bd321e3f6 Added config file for console 2025-02-11 18:15:04 +01:00
Jan-Bulthuis 1e8b56f03b Moved from overrides to overlay for custom packages 2025-02-11 16:09:01 +01:00
Jan-Bulthuis fc5a748fa5 Created dina-psf package 2025-02-11 15:48:55 +01:00
Jan-Bulthuis 1b35d92f6b Adding dina as console font 2025-02-11 13:27:35 +01:00
Jan-Bulthuis 750ca2f3a8 Added GDM 2025-02-11 12:24:10 +01:00
Jan-Bulthuis 3ae7a5e8d4 Rewrote if statement around defining LD_LIBRARY_PATH 2025-02-10 00:33:28 +01:00
Jan-Bulthuis e1d061ffbf Added libPackages 2025-02-10 00:31:08 +01:00
Jan-Bulthuis 299813134e Added clippy and rustfmt 2025-02-10 00:10:55 +01:00
Jan-Bulthuis 9287815cd2 Fixed packages 2025-02-09 23:57:47 +01:00
Jan-Bulthuis b850b164f5 Removed language installation from rust module 2025-02-09 23:53:52 +01:00
Jan-Bulthuis fcbbb03060 Added rust to devShell 2025-02-09 23:53:27 +01:00
Jan-Bulthuis f32764b652 Updated python 2025-02-09 23:45:15 +01:00
Jan-Bulthuis ba6aec06a3 Removed pkgs import 2025-02-09 02:37:50 +01:00
Jan-Bulthuis 97f69bb208 Added jupyter to devShell 2025-02-09 02:19:49 +01:00
Jan-Bulthuis e2abde8b28 Changes 2025-02-09 01:11:07 +01:00
Jan-Bulthuis f1f4255d7d Moved env to shell 2025-02-08 23:25:05 +01:00
Jan-Bulthuis 944d74060e Added env helper 2025-02-08 23:16:50 +01:00
Jan-Bulthuis ffc4e6a90b Fixed typo 2025-02-08 23:07:08 +01:00
Jan-Bulthuis 47c7b69afa Added python skeleton 2025-02-08 23:06:32 +01:00
Jan-Bulthuis 74ddbc24bb Start work on devshell configuration 2025-02-08 21:52:42 +01:00
Jan-Bulthuis 512c6066fa Added ente auth 2025-02-08 21:52:28 +01:00
Jan-Bulthuis 798d468706 Modified xfce environment 2025-02-08 21:52:04 +01:00
Jan-Bulthuis dec735c9d6 Added unfree retroarch emulators 2025-02-08 21:51:46 +01:00
Jan-Bulthuis 7776f845cc Added i3 systemwide config 2025-02-02 14:23:37 +01:00
Jan-Bulthuis 6072b9fdd2 Added i3 2025-02-02 14:09:09 +01:00
Jan-Bulthuis c832f5ff72 Allowed mathematica as unfree package 2025-01-30 19:06:49 +01:00
Jan-Bulthuis 030c41f7a0 Added mathematica 2025-01-30 19:05:44 +01:00
Jan-Bulthuis 02e5532cb3 removed folder 2025-01-29 16:50:17 +01:00
Jan-Bulthuis a760c0251e Moved steam desktop entries to its own subfolder 2025-01-29 16:49:11 +01:00
Jan-Bulthuis dad0cdb169 Added retroarch 2025-01-29 00:07:45 +01:00
Jan-Bulthuis ceff5dac07 Changes 2025-01-28 10:42:20 +01:00
Jan-Bulthuis 9d73b0d728 Removed some imports 2025-01-28 09:21:01 +01:00
Jan-Bulthuis 115a27d1c6 Added networkmanager 2025-01-28 09:20:50 +01:00
Jan-Bulthuis 66c619883b Removed some old packages 2025-01-28 09:14:33 +01:00
Jan-Bulthuis 3bb401859d Added eduvpn 2025-01-28 09:03:45 +01:00
Jan-Bulthuis cb35b1afd9 Back to ES-DE 2025-01-26 15:11:52 +01:00
Jan-Bulthuis b3298359b4 Moved to pegasus 2025-01-26 13:53:54 +01:00
Jan-Bulthuis 99928ddb16 Added exception for insecure dependency 2025-01-26 13:31:23 +01:00
Jan-Bulthuis 1a2d9b6490 Added ES-DE 2025-01-26 13:28:36 +01:00
Jan-Bulthuis 8e0e511335 Reorganization 2025-01-26 13:16:06 +01:00
Jan-Bulthuis 592f5dc0ef Set env variable to make matlab render 2025-01-26 13:01:54 +01:00
Jan-Bulthuis 0c670125c3 Added matlab 2025-01-26 12:57:38 +01:00
Jan-Bulthuis 76bc756b3e Opened some firewall ports 2025-01-25 20:34:23 +01:00
Jan-Bulthuis 1e7db857a6 'Fixed' feishin 2025-01-24 03:05:34 +01:00
Jan-Bulthuis aae291b1d5 Fixed rofi padding 2025-01-24 02:58:33 +01:00
Jan-Bulthuis a65c4914b7 Moved user configuration to flake from machine 2025-01-24 02:38:09 +01:00
Jan-Bulthuis f341226d0b Fixed some font issues 2025-01-24 02:26:24 +01:00
Jan-Bulthuis 3f11f64135 Updated Readme 2025-01-24 02:05:00 +01:00
Jan-Bulthuis 73c4756de6 Completed migration to flakes 2025-01-24 01:22:01 +01:00
Jan-Bulthuis 0932432e11 Moved user modules 2025-01-24 00:50:13 +01:00
Jan-Bulthuis 9352fa2649 Added flake lock 2025-01-24 00:29:06 +01:00
Jan-Bulthuis b4ad26555f Changes 2025-01-24 00:28:22 +01:00
Jan-Bulthuis eab7a2b5ad Added Nord theme 2024-12-03 16:23:29 +01:00
Jan-Bulthuis 03be992cb8 Added python formatter to VSCode 2024-12-03 13:46:59 +01:00
Jan-Bulthuis 727c0802a7 Fixed nerd font import 2024-12-03 13:46:43 +01:00
Jan-Bulthuis b9af43bec2 Fixed waybar startup after rebuild 2024-12-02 11:20:59 +01:00
Jan-Bulthuis 22089bd396 Properly pinned versions 2024-12-02 11:18:22 +01:00
Jan-Bulthuis f80ae292ba Updated readme 2024-12-02 01:03:01 +01:00
Jan-Bulthuis 73f957e81d Update personal setup 2024-12-02 00:58:01 +01:00
Jan-Bulthuis 7e790a58e5 Updated module imports 2024-12-02 00:57:48 +01:00
Jan-Bulthuis d40cab3aba Added package for Jellyfin-tui, attempt to fix qutebrowser, attempt at working quickgui 2024-12-02 00:57:31 +01:00
Jan-Bulthuis f8ba5af5ac Set Zathura settings 2024-12-02 00:56:31 +01:00
Jan-Bulthuis b2c15706c0 Update VSCode settings and extensions 2024-12-02 00:56:19 +01:00
Jan-Bulthuis bb3deb5f31 Removed stylix import from theming module 2024-12-02 00:55:42 +01:00
Jan-Bulthuis ac628036a9 Added steam 2024-12-02 00:54:51 +01:00
Jan-Bulthuis 28eb24c658 Added spotify 2024-12-02 00:54:38 +01:00
Jan-Bulthuis 891fa64466 Added shell alias configuration 2024-12-02 00:54:05 +01:00
Jan-Bulthuis 3b071a8118 Enabled web-devicons in neovim 2024-12-02 00:53:41 +01:00
Jan-Bulthuis d5c9303003 Added LaTeX language support 2024-12-02 00:53:29 +01:00
Jan-Bulthuis 5db7d1f93f Added Jupyter Notebook support 2024-12-02 00:53:17 +01:00
Jan-Bulthuis 78766dfaa8 Added bacon to rust 2024-12-02 00:53:05 +01:00
Jan-Bulthuis 3374b35053 Added Python language support 2024-12-02 00:52:55 +01:00
Jan-Bulthuis 34bba528b3 Added JS language support 2024-12-02 00:52:41 +01:00
Jan-Bulthuis a91fb54e24 Added C++ language 2024-12-02 00:52:31 +01:00
Jan-Bulthuis e24066e577 Added module for git 2024-12-02 00:52:22 +01:00
Jan-Bulthuis 52c7212155 Fix fontconfig 2024-12-02 00:52:10 +01:00
Jan-Bulthuis dc77d948e6 Update river background color after rebuild 2024-12-02 00:52:01 +01:00
Jan-Bulthuis 5f6f793979 Restart waybar after rebuild 2024-12-02 00:51:45 +01:00
Jan-Bulthuis 74e5398ccf Added base DE utilities, added reload script to run after rebuild 2024-12-02 00:51:19 +01:00
Jan-Bulthuis 208eec466e Added btop 2024-12-02 00:50:43 +01:00
Jan-Bulthuis 964dff4d8c Removed pykeepass fix, set qutebrowser max history size 2024-12-02 00:50:34 +01:00
Jan-Bulthuis 48cb8e42e9 Fixed NUR version 2024-12-02 00:49:55 +01:00
Jan-Bulthuis ba7c0b1d2a Fixed nixvim, stylix version, add sudo users to the docker group 2024-12-02 00:49:41 +01:00
Jan-Bulthuis afcf41fbb5 Added some base utilities, fixed DNS 2024-12-02 00:49:06 +01:00
136 changed files with 2598 additions and 3681 deletions

No files matched your search

+8
View File
@@ -1,3 +1,11 @@
# Dotfiles # Dotfiles
My NixOS configuration. My NixOS configuration.
## Installation
For disk configuration we use disko, this means that installing the system from the configuration is just a single command:
```
sudo nix --experimental-features "nix-command flakes" run "github:nix-community/disko/latest#disko-install" -- --flake git+https://git.bulthuis.dev/Jan/dotfiles#<hostname> --disk main /dev/sda
```
-11
View File
@@ -1,11 +0,0 @@
{ ... }:
{
imports = [
# Import modules
./modules/default.nix
# Import custom packages
./pkgs/default.nix
];
}
Generated
+178
View File
@@ -0,0 +1,178 @@
{
"nodes": {
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1748225455,
"narHash": "sha256-AzlJCKaM4wbEyEpV3I/PUq5mHnib2ryEy32c+qfj6xk=",
"owner": "nix-community",
"repo": "disko",
"rev": "a894f2811e1ee8d10c50560551e50d6ab3c392ba",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "disko",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1748134483,
"narHash": "sha256-5PBK1nV8X39K3qUj8B477Aa2RdbLq3m7wRxUKRtggX4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c1e671036224089937e111e32ea899f59181c383",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1737831083,
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nix-minecraft": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747581338,
"narHash": "sha256-/+H9qce+NPsEcAC31s3pbD64nB6GKC3+3ZNLV1+tffk=",
"owner": "Jan-Bulthuis",
"repo": "nix-minecraft",
"rev": "44b6b40d7a3e0a114567b38a203029a5bc67e838",
"type": "github"
},
"original": {
"owner": "Jan-Bulthuis",
"repo": "nix-minecraft",
"type": "github"
}
},
"nix-modpack": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747559249,
"narHash": "sha256-+ygKEGMVcXNklO4RDYSd5XzydDmQOZWcOcxYZf/PH1U=",
"owner": "Jan-Bulthuis",
"repo": "nix-modpack",
"rev": "a093625c2847afc3ef257513161c7fe318c6be1c",
"type": "github"
},
"original": {
"owner": "Jan-Bulthuis",
"repo": "nix-modpack",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1747958103,
"narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
"home-manager": "home-manager",
"impermanence": "impermanence",
"nix-minecraft": "nix-minecraft",
"nix-modpack": "nix-modpack",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
+21
View File
@@ -0,0 +1,21 @@
{
description = "System configuration for NixOS";
inputs = {
# General inputs
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence";
# For Minecraft VM
nix-minecraft.url = "github:Jan-Bulthuis/nix-minecraft";
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
nix-modpack.url = "github:Jan-Bulthuis/nix-modpack";
nix-modpack.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs: import ./glue inputs;
}
+170
View File
@@ -0,0 +1,170 @@
inputs:
let
flake = inputs.self;
nixpkgs = inputs.nixpkgs;
lib = nixpkgs.lib;
importDir =
path: fn:
let
entries = builtins.readDir path;
# Get paths to directories
dirs = lib.filterAttrs (_: type: type == "directory") entries;
dirPaths = lib.mapAttrs (name: type: {
path = "${path}/${name}";
type = type;
}) dirs;
# Get paths to nix files
nixName = name: builtins.match "(.*)\\.nix" name;
files = lib.filterAttrs (name: type: (type != "directory") && ((nixName name) != null)) entries;
filePaths = lib.mapAttrs' (name: type: {
name = builtins.head (nixName name);
value = {
path = "${path}/${name}";
type = type;
};
}) files;
combined = dirPaths // filePaths;
in
fn (lib.optionalAttrs (builtins.pathExists path) combined);
# Split out into getNixFiles, getNixFilesRecursive, getDirs
importDirRecursive =
path: fn:
let
entries = importDir path lib.id;
# Dig down recursively
dirs = lib.filterAttrs (_: entry: entry.type == "directory") entries;
recursedEntries = lib.mapAttrs (name: entry: (importDirRecursive entry.path lib.id)) dirs;
in
fn (entries // recursedEntries);
eachSystem = fn: lib.genAttrs lib.systems.flakeExposed fn;
systemArgs = eachSystem (system: {
pkgs = (
import inputs.nixpkgs {
inherit system;
}
);
});
allPackages = importDir "${flake}/packages" (
attrs:
lib.mapAttrs (
name: entry: (if entry.type == "directory" then "${entry.path}/default.nix" else entry.path)
) attrs
);
packages =
let
# TODO: Filter out packages that are not supported on the platform?
mkPackages =
system:
let
args = systemArgs."${system}";
pkgs = args.pkgs;
in
lib.mapAttrs (name: package: pkgs.callPackage package { }) allPackages;
in
eachSystem mkPackages;
overlay = final: prev: (lib.mapAttrs (name: package: prev.callPackage package { }) allPackages);
collectEntries =
attrs:
lib.attrsets.collect (
entry: (lib.isAttrs entry) && (lib.hasAttr "path" entry) && (lib.hasAttr "type" entry)
) attrs;
collectModules =
path:
importDirRecursive path (
attrs:
map (entry: if entry.type == "directory" then entry.path + "/default.nix" else entry.path) (
collectEntries attrs
)
);
nixosModules = collectModules "${flake}/modules/nixos";
nixosProfiles = collectModules "${flake}/profiles/nixos";
inputNixosModules = lib.map (flake: flake.outputs.nixosModules.default) (
lib.filter (flake: lib.hasAttrByPath [ "outputs" "nixosModules" "default" ] flake) (
lib.attrValues inputs
)
);
homeModules = collectModules "${flake}/modules/home";
homeProfiles = collectModules "${flake}/profiles/home";
inputHomeModules = lib.map (flake: flake.outputs.homeManagerModules.default) (
lib.filter (flake: lib.hasAttrByPath [ "outputs" "homeManagerModules" "default" ] flake) (
lib.attrValues inputs
)
);
inputOverlays = lib.map (flake: flake.outputs.overlays.default) (
lib.filter (flake: lib.hasAttrByPath [ "outputs" "overlays" "default" ] flake) (
lib.attrValues inputs
)
);
overlayModule =
{ ... }:
{
nixpkgs.overlays = [ overlay ] ++ inputOverlays;
};
nixosConfigurations = importDir "${flake}/hosts" (
attrs:
lib.mapAttrs (
name: entry:
lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules =
let
systemPath = "${entry.path}/configuration.nix";
userEntries = importDir "${entry.path}/users" lib.id;
usersConfiguration = lib.mapAttrs (name: entry: {
isNormalUser = true;
group = name;
}) userEntries;
groupsConfiguration = lib.mapAttrs (name: entry: {
}) userEntries;
homesConfiguration = lib.mapAttrs (name: entry: entry.path) userEntries;
usersModule =
{ ... }:
{
home-manager.sharedModules = homeModules ++ homeProfiles ++ inputHomeModules;
home-manager.useUserPackages = false; # TODO: See if this should be changed to true?
home-manager.useGlobalPkgs = true;
home-manager.users = homesConfiguration;
users.users = usersConfiguration;
users.groups = groupsConfiguration;
};
in
[
systemPath
overlayModule
usersModule
]
++ nixosModules
++ nixosProfiles
++ inputNixosModules;
}
) (lib.attrsets.filterAttrs (name: entry: entry.type == "directory") attrs)
);
in
{
inherit packages nixosConfigurations overlay;
overlays.default = overlay;
}
+45
View File
@@ -0,0 +1,45 @@
{ flake, ... }:
{
# State version
system.stateVersion = "24.05";
# Machine hostname
networking.hostName = "20212060";
# Admin users
users.users.jan.extraGroups = [
"wheel"
"wireshark"
];
# Enable virtualisation for VMs
virtualisation.libvirtd.enable = true;
# Enable wireshark
programs.wireshark = {
enable = true;
dumpcap.enable = true;
usbmon.enable = true;
};
# Set up wstunnel client
services.wstunnel = {
enable = true;
clients.wg-tunnel = {
connectTo = "wss://tunnel.bulthuis.dev:443";
localToRemote = [
"udp://51820:10.10.40.100:51820"
];
};
};
# Module setup
modules = {
profiles.laptop.enable = true;
};
imports = [
./hardware-configuration.nix
];
}
+43
View File
@@ -0,0 +1,43 @@
{ ... }:
{
# Machine platform
nixpkgs.hostPlatform = "x86_64-linux";
# Hardware configuration
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
fileSystems."/" = {
device = "/dev/disk/by-uuid/3b91eaeb-ea95-4bea-8dc1-f55af7502d23";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/46BF-DE2C";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
# Swapfile
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
}
+9
View File
@@ -0,0 +1,9 @@
{
...
}:
{
home.stateVersion = "24.11";
modules.profiles.jan.enable = true;
}
+241
View File
@@ -0,0 +1,241 @@
{
lib,
pkgs,
config,
...
}:
{
# State version
system.stateVersion = "24.11";
# Machine hostname
networking.hostName = "vm-audio";
# Enabled modules
modules = {
profiles.vm.enable = true;
sound.enable = true;
# spotifyd.enable = true; # TODO: Add this as a local module
};
# Install system packages
environment.systemPackages = with pkgs; [
carla
xpra
alsa-utils
pulsemixer
adwaita-icon-theme
open-stage-control
carla_osc_bridge
# Add LV2 plugins
lsp-plugins
airwindows-lv2
distrho-ports
cardinal
calf
];
# Setup firewall
networking.firewall = {
allowedTCPPorts = [
8080
10402
15151
22752
];
allowedUDPPorts = [
8080
10402
15151
22752
];
};
# Setup dependencies
environment.variables.LD_LIBRARY_PATH = lib.mkForce "${lib.makeLibraryPath (
with pkgs;
[
cairo
pipewire.jack
]
)}";
qt = {
enable = true;
style = "adwaita";
};
xdg.icons = {
enable = true;
fallbackCursorThemes = [ "Adwaita" ];
};
hardware.graphics.enable = true;
# User for audio mixing
users.users.mixer = {
isNormalUser = true;
group = "mixer";
extraGroups = [ "systemd-journal" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKxoQSxfYqf9ITN8Fhckk8WbY4dwtBAXOhC9jxihJvq jan@bulthuis.dev"
];
};
users.groups.mixer = { };
users.groups.audio = {
members = [
"mixer"
];
};
users.groups.bluetooth = {
members = [
"mixer"
];
};
# Xpra service
systemd.user.services.xpra = {
description = "Xpra Service";
wantedBy = [ "default.target" ];
after = [
"network.target"
];
unitConfig = {
ConditionUser = "mixer";
};
serviceConfig = {
ExecStart = "${pkgs.xpra}/bin/xpra start :7 --bind-tcp=0.0.0.0:15151 --daemon=no";
Restart = "always";
RestartSec = 5;
};
};
# Carla service
systemd.user.services.carla = {
description = "Carla Service";
wantedBy = [ "default.target" ];
after = [
"network.target"
"sound.target"
];
requires = [
"xpra.service"
];
unitConfig = {
ConditionUser = "mixer";
};
serviceConfig = {
ExecStart = "${pkgs.carla}/bin/carla /home/mixer/Default.carxp -platform xcb";
Environment = "\"DISPLAY=:7\"";
Restart = "always";
RestartSec = 5;
};
};
# Carla service
systemd.user.services.carla-bridge = {
description = "Carla OSC Bridge";
wantedBy = [ "default.target" ];
after = [
"network.target"
"sound.target"
];
requires = [
"carla.service"
];
unitConfig = {
ConditionUser = "mixer";
};
serviceConfig = {
ExecStart = "${pkgs.carla_osc_bridge}/bin/carla_osc_bridge --clients \"127.0.0.1:8080\"";
Restart = "always";
RestartSec = 5;
};
};
# Open stage control service
systemd.user.services.osc = {
description = "OSC Service";
wantedBy = [ "default.target" ];
after = [
"network.target"
];
requires = [
"carla.service"
];
unitConfig = {
ConditionUser = "mixer";
};
serviceConfig = {
ExecStart = "${pkgs.open-stage-control}/bin/open-stage-control --no-gui --send 127.0.0.1:10402 --load /home/mixer/open-stage-control/session.json --theme /home/mixer/open-stage-control/theme.css";
Environment = "\"ELECTRON_RUN_AS_NODE=1\"";
Restart = "always";
RestartSec = 5;
};
};
# Create bluetooth A2DP source
hardware.bluetooth = {
enable = true;
disabledPlugins = [ "hostname" ];
settings.General = {
Name = "Linox";
Class = "0x240414";
DiscoverableTimeout = 0;
AlwaysPairable = true;
PairableTimeout = 0;
FastConnectable = true;
JustWorksRepairing = "always";
};
};
services.pipewire.wireplumber.extraConfig."50-bluetooth-a2dp" = {
"monitor.bluez.properties" = {
"bluez5.roles" = [ "a2dp_source" ];
};
};
# Create null sinks
services.pipewire.extraConfig.pipewire."91-null-sinks" = {
"context.objects" = [
{
factory = "adapter";
args = {
"factory.name" = "support.null-audio-sink";
"node.name" = "Speaker-Proxy";
"node.description" = "Proxy for Speaker Output";
"media.class" = "Audio/Sink";
"audio.position" = "L,R";
};
}
{
factory = "adapter";
args = {
"factory.name" = "support.null-audio-sink";
"node.name" = "Headphone-Proxy";
"node.description" = "Proxy for Headphone Output";
"media.class" = "Audio/Sink";
"audio.position" = "L,R";
};
}
{
factory = "adapter";
args = {
"factory.name" = "support.null-audio-sink";
"node.name" = "SpotifyD-Proxy";
"node.description" = "Proxy for SpotifyD";
"media.class" = "Audio/Sink";
"audio.position" = "L,R";
};
}
{
factory = "adapter";
args = {
"factory.name" = "support.null-audio-sink";
"node.name" = "AnalogIn-Proxy";
"node.description" = "Proxy for the analog input";
"media.class" = "Audio/Source/Virtual";
"audio.position" = "L,R";
};
}
];
};
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
home.stateVersion = "24.11";
modules.profiles.base.enable = true;
}
+45
View File
@@ -0,0 +1,45 @@
{
lib,
pkgs,
config,
inputs,
...
}:
{
# State version
system.stateVersion = "24.11";
# Import the nix-minecraft modules
imports = [
inputs.nix-minecraft.nixosModules.minecraft-servers
];
# Machine hostname
networking.hostName = "vm-minecraft";
# Enabled modules
modules = {
profiles.vm.enable = true;
};
# Set up minecraft servers
users.users.local.extraGroups = [ "minecraft" ];
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true;
servers = {
modpack = {
enable = true;
autoStart = true;
serverProperties = { };
package = inputs.nix-modpack.packages.${pkgs.system}.mkModpackServer {
packUrl = "https://raw.githubusercontent.com/Jan-Bulthuis/Modpack/refs/heads/master/pack.toml";
server = inputs.nix-minecraft.legacyPackages.${pkgs.system}.neoForgeServers.neoforge-20_1_106;
};
jvmOpts = "-Xms6144M -Xmx8192M";
};
};
};
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
home.stateVersion = "24.11";
modules.profiles.base.enable = true;
}
+40
View File
@@ -0,0 +1,40 @@
{
lib,
pkgs,
config,
...
}:
{
# State version
system.stateVersion = "24.11";
# Machine hostname
networking.hostName = "vm-vpn";
# Enabled modules
modules = {
profiles.vm.enable = true;
};
# Setup wstunnel server
services.wstunnel = {
enable = true;
servers.wg-tunnel = {
enableHTTPS = false;
listen = {
host = "0.0.0.0";
port = 8080;
};
restrictTo = [
{
host = "10.10.40.100";
port = 51820;
}
];
};
};
networking.firewall = {
allowedTCPPorts = [ 8080 ];
};
}
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
home.stateVersion = "24.11";
modules.profiles.base.enable = true;
}
-31
View File
@@ -1,31 +0,0 @@
{ ... }:
{
imports = [
# Import environment
../default.nix
];
config = {
# State version
system.stateVersion = "24.05";
# Machine hostname
networking.hostName = "20212060";
# Enabled modules
modules = {
base.enable = true;
bluetooth.enable = true;
power-saving.enable = false;
pipewire.enable = true;
wpa_supplicant.enable = true;
};
# User accounts
machine.users.jan = {
sudo = true;
configuration = ../users/jan.nix;
};
};
}
-50
View File
@@ -1,50 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.base;
in
{
options.modules.base = {
enable = mkEnableOption "base";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
# Add base linux utilities
git
wget
curl
dig
procps
];
modules = {
# Enable base modules
clean-tmp.enable = true;
fontconfig.enable = true;
neovim.enable = true;
systemd-boot.enable = true;
tuigreet.enable = true;
tailscale.enable = true;
};
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
networking.nameservers = [
"9.9.9.9"
"149.112.112.112"
];
programs.dconf.enable = true;
services.libinput.enable = true;
modules.unfree.enable = true;
modules.unfree.allowedPackages = [
"nvidia-x11"
"nvidia-settings"
];
};
}
-23
View File
@@ -1,23 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.bluetooth;
in
{
options.modules.bluetooth = {
enable = mkEnableOption "bluetooth";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ bluez ];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
};
}
-18
View File
@@ -1,18 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.clean-tmp;
in
{
options.modules.clean-tmp = {
enable = mkEnableOption "clean-tmp";
};
config = mkIf cfg.enable { boot.tmp.cleanOnBoot = true; };
}
-37
View File
@@ -1,37 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.silent-boot;
in
{
options.modules.silent-boot = {
enable = mkEnableOption "silent-boot";
};
config = mkIf cfg.enable {
boot = {
loader.timeout = 0;
consoleLogLevel = 0;
initrd.verbose = false;
initrd.checkJournalingFS = false;
kernelParams = [
"quiet"
"boot.shell_on_fail"
"loglevel=3"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
"video=efifb:nobgrt"
"bgrt_disable"
];
};
};
}
-18
View File
@@ -1,18 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.brightnessctl;
in
{
options.modules.brightnessctl = {
enable = mkEnableOption "brightnessctl";
};
config = mkIf cfg.enable { environment.systemPackages = [ pkgs.brightnessctl ]; };
}
-31
View File
@@ -1,31 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
{
imports = [
# Import modules
./base/default.nix
./bluetooth/default.nix
./boot/clean-tmp.nix
./boot/silent-boot.nix
./boot/systemd-boot.nix
./brightnessctl/default.nix
./fontconfig/default.nix
./graphics/default.nix
./greeter/greetd/default.nix
./greeter/greetd/tuigreet.nix
./locale/default.nix
./neovim/default.nix
./power-saving/default.nix
./sound/pipewire.nix
./users/default.nix
./unfree/default.nix
./vpn/tailscale.nix
./wifi/wpa_supplicant.nix
];
}
-27
View File
@@ -1,27 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.fontconfig;
in
{
options.modules.fontconfig = {
enable = mkEnableOption "fontconfig";
};
config = {
fonts.fontconfig.enable = cfg.enable;
fonts.enableDefaultPackages = false;
fonts.fontconfig.defaultFonts = {
serif = mkDefault [ ];
sansSerif = mkDefault [ ];
monospace = mkDefault [ ];
emoji = mkDefault [ ];
};
};
}
-32
View File
@@ -1,32 +0,0 @@
{
lib,
config,
pkgs,
...
}:
{
config = {
# TODO: Modularize further, especially modesetting should be its own module.
# Set up graphics
hardware.graphics.enable32Bit = true;
hardware.graphics.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
};
}
-31
View File
@@ -1,31 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.greetd;
in
{
options.modules.greetd = {
enable = mkEnableOption "greetd";
command = mkOption {
type = types.str;
default = "";
description = "Command to run to show greeter.";
};
};
config = mkIf cfg.enable {
services.greetd = {
enable = true;
settings.default_session = {
command = cfg.command;
user = "greeter";
};
};
};
}
-37
View File
@@ -1,37 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.tuigreet;
in
{
options.modules.tuigreet = {
enable = mkEnableOption "tuigreet";
greeting = mkOption {
type = types.str;
default = "Hewwo! >_< :3";
description = "Greeting message to show.";
};
command = mkOption {
type = types.str;
default = "~/.initrc";
description = "Command to run after logging in.";
};
};
config = mkIf cfg.enable {
# Enable greetd
modules.greetd = {
enable = true;
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --greeting \"${cfg.greeting}\" --time --cmd \"${cfg.command}\" --asterisks";
};
# Enable silent boot to prevent late log messages from messing up tuigreet
modules.silent-boot.enable = true;
};
}
+81
View File
@@ -0,0 +1,81 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.desktop.gnome;
in
{
options.modules.desktop.gnome = {
enable = mkEnableOption "gnome";
};
config = mkIf cfg.enable {
# TODO: Enable extensions with dconf
home.pointerCursor = {
name = "capitaine-cursors";
size = 24;
package = pkgs.capitaine-cursors;
gtk.enable = true;
x11.enable = true;
};
home.packages =
with pkgs;
[
gnome-session
gnome-shell
gnome-tweaks
gnome-calculator
snapshot
gnome-characters
gnome-connections
blackbox-terminal
baobab
gnome-disk-utility
papers
nautilus
gnome-font-viewer
loupe
gnome-maps
gnome-music
gnome-control-center
gnome-text-editor
showtime
file-roller
mission-center
dconf-editor
# For theming gtk3
adw-gtk3
]
++ (with pkgs.gnomeExtensions; [
gsconnect
disable-workspace-animation
wallpaper-slideshow
media-progress
# luminus-desktop
]);
# Enable and set the gtk themes
gtk = {
enable = true;
gtk3.extraConfig = {
gtk-theme-name = "adw-gtk3";
};
gtk4.extraConfig = {
gtk-theme-name = "Adwaita";
};
};
# Set the theme with dconf
dconf.settings."org/gnome/desktop/interface" = {
gtk-theme = "adw-gtk3";
};
};
}
+53
View File
@@ -0,0 +1,53 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.git;
in
{
options.modules.git = {
enable = mkEnableOption "git";
user = mkOption {
type = types.str;
description = "Default user name to use.";
};
email = mkOption {
type = types.str;
description = "Default user email to use.";
};
ignores = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Paths to globally ignore";
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
git
lazygit
];
programs.git = {
enable = true;
extraConfig = {
pull = {
rebase = false;
};
};
userName = cfg.user;
userEmail = cfg.email;
ignores = cfg.ignores;
};
};
}
@@ -0,0 +1,50 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.cpp;
in
{
options.modules.cpp = {
enable = mkEnableOption "cpp";
};
config = mkIf cfg.enable {
# Gitignore additions
modules.git.ignores = [
".ccls-cache"
];
# Development packages
home.packages = with pkgs; [
gnumake
gcc
];
# VSCode configuration
programs.vscode = {
profiles.default = {
extensions = with pkgs.vscode-extensions; [
ms-vscode.cpptools
ms-vscode.cmake-tools
ms-vscode.cpptools-extension-pack
];
userSettings = {
# TODO: Add setting to set the compiler, it currently needs to be set for each workspace individually
# "C_Cpp.clang_format_fallbackStyle" = "{ BasedOnStyle: Google, IndentWidth: 4 }";
};
};
};
# Neovim configuration
# programs.nixvim = {
# plugins.lsp.servers.ccls.enable = true;
# };
};
}
@@ -23,18 +23,20 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ profiles.default = {
haskell.haskell extensions = with pkgs.vscode-extensions; [
justusadam.language-haskell haskell.haskell
]; justusadam.language-haskell
];
userSettings = { userSettings = {
"[haskell]" = { }; "[haskell]" = { };
# "haskell.formattingProvider" = "fourmolu"; # "haskell.formattingProvider" = "fourmolu";
};
}; };
}; };
# Neovim configuration # Neovim configuration
programs.nixvim = { }; # programs.nixvim = { };
}; };
} }
+38
View File
@@ -0,0 +1,38 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.js;
in
{
options.modules.js = {
enable = mkEnableOption "js";
};
config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [
nodejs
tailwindcss
];
# VSCode configuration
programs.vscode = {
profiles.default = {
extensions = with pkgs.vscode-extensions; [
bradlc.vscode-tailwindcss
];
userSettings = { };
};
};
# Neovim configuration
# programs.nixvim = { };
};
}
@@ -0,0 +1,44 @@
{
lib,
config,
pkgs,
...
}:
# TODO: Move to a module for notebooks in general
with lib;
let
cfg = config.modules.jupyter;
in
{
options.modules.jupyter = {
enable = mkEnableOption "jupyter";
};
config = mkIf cfg.enable {
# Development packages
# home.packages = with pkgs; [
# evcxr
# ];
# modules.python.extraPythonPackages = p: [
# p.jupyter
# p.notebook
# ];
# VSCode configuration
programs.vscode = {
profiles.default = {
extensions = with pkgs.vscode-extensions; [
ms-toolsai.jupyter
ms-toolsai.jupyter-renderers
];
userSettings = { };
};
};
# Neovim configuration
# programs.nixvim = { };
};
}
@@ -32,18 +32,20 @@ in
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ]; profiles.default = {
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ];
userSettings = { userSettings = {
"[nix]" = { "[nix]" = {
"editor.tabSize" = 2; "editor.tabSize" = 2;
}; };
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd"; "nix.serverPath" = "nixd";
"nix.serverSettings" = { "nix.serverSettings" = {
nixd = { nixd = {
formatting = { formatting = {
command = [ "nixfmt" ]; command = [ "nixfmt" ];
};
}; };
}; };
}; };
@@ -51,8 +53,8 @@ in
}; };
# Neovim configuration # Neovim configuration
programs.nixvim = { # programs.nixvim = {
}; # };
}; };
} }
@@ -0,0 +1,52 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.python;
in
{
options.modules.python = {
enable = mkEnableOption "python";
extraPythonPackages = mkOption {
type = types.functionTo (types.listOf types.package) // {
merge =
loc: defs: p:
lib.concatMap (def: (def.value p)) defs;
};
default = p: [ ];
description = "Extra Python packages to install";
};
};
config = mkIf cfg.enable {
# Development packages
home.packages = [ ];
# VSCode configuration
programs.vscode = {
profiles.default = {
extensions = with pkgs.vscode-extensions; [
ms-python.python
ms-python.debugpy
ms-python.vscode-pylance
ms-python.black-formatter
];
userSettings = {
"python.defaultInterpreterPath" = "\${env:PYTHONINTERPRETER}";
"[python]" = {
"editor.defaultFormatter" = "ms-python.black-formatter";
};
};
};
};
# Neovim configuration
# programs.nixvim = { };
};
}
@@ -0,0 +1,59 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.rust;
in
{
options.modules.rust = {
enable = mkEnableOption "rust";
};
config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [
# rustup
# rustc
# cargo
# gcc
# lldb
# bacon
# rust-analyzer
# rustfmt
# clippy
# evcxr
];
# VSCode configuration
programs.vscode = {
profiles.default = {
extensions = with pkgs.vscode-extensions; [
rust-lang.rust-analyzer
vadimcn.vscode-lldb
tamasfe.even-better-toml
serayuzgur.crates
];
userSettings = {
"[rust]" = {
"editor.inlayHints.enabled" = "off";
};
"rust-analyzer.check.command" = "clippy";
"rust-analyzer.showUnlinkedFileNotification" = false;
};
};
};
# Neovim configuration
# programs.nixvim = {
# plugins.rustaceanvim = {
# enable = true;
# };
# };
};
}
@@ -0,0 +1,69 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.tex;
in
{
options.modules.tex = {
enable = mkEnableOption "tex";
};
config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [
(texlive.combine {
inherit (texlive) scheme-full;
})
];
# Pygments for minted
modules.python.extraPythonPackages = p: [
p.pygments
];
# VSCode configuration
programs.vscode = {
profiles.default = {
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ];
userSettings = {
"[tex]" = { };
};
};
};
# Neovim configuration
# programs.nixvim = {
# extraConfigVim = ''
# " Enforce latexmk
# let g:vimtex_compiler_method = 'latexmk'
# " Set latexmk compilation settings
# let g:vimtex_compiler_latexmk = {
# \ 'options': [
# \ '-shell-escape',
# \ '-verbose',
# \ '-file-line-error',
# \ '-synctex=1',
# \ '-interaction=nonstopmode',
# \ ],
# \}
# '';
# # Vimtex plugin
# plugins.vimtex = {
# enable = true;
# texlivePackage = null;
# settings = {
# view_method = "zathura";
# };
# };
# };
};
}
+27
View File
@@ -0,0 +1,27 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.mathematica;
my-mathematica = pkgs.mathematica.override {
# TODO: Just use a generic name for the installer?
# source = ./Wolfram_14.2.1_LIN_Bndl.sh;
};
in
{
options.modules.mathematica = {
enable = mkEnableOption "mathematica";
};
config = mkIf cfg.enable {
home.packages = [
my-mathematica
];
};
}
+190
View File
@@ -0,0 +1,190 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.neovim;
# theme = config.desktop.theming;
# colors = theme.colors;
in
{
options.modules.neovim = {
enable = mkEnableOption "neovim";
};
config = mkIf cfg.enable {
# programs.nixvim = {
# enable = true;
# defaultEditor = true;
# viAlias = true;
# vimAlias = true;
# # extraPackages = with pkgs; [ ];
# opts = {
# number = true;
# relativenumber = true;
# signcolumn = "yes";
# ignorecase = true;
# smartcase = true;
# tabstop = 4;
# shiftwidth = 4;
# softtabstop = 0;
# expandtab = true;
# smarttab = true;
# list = true;
# listchars = "tab:»┈«,trail:·,extends:→,precedes:←,nbsp:␣";
# };
# diagnostic.settings = {
# enable = true;
# signs = true;
# underline = true;
# update_in_insert = true;
# };
# extraConfigLua = ''
# vim.fn.sign_define("DiagnosticSignError",
# {text = "", texthl = "DiagnosticSignError"})
# vim.fn.sign_define("DiagnosticSignWarn",
# {text = "", texthl = "DiagnosticSignWarn"})
# vim.fn.sign_define("DiagnosticSignInfo",
# {text = "", texthl = "DiagnosticSignInfo"})
# vim.fn.sign_define("DiagnosticSignHint",
# {text = "💡", texthl = "DiagnosticSignHint"})
# '';
# keymaps = [
# # Save shortcut
# {
# action = ":update<CR>";
# key = "<C-s>";
# mode = "n";
# }
# {
# action = "<C-o>:update<CR>";
# key = "<C-s>";
# mode = "i";
# }
# # Neo tree
# {
# action = ":Neotree action=focus reveal toggle<CR>";
# key = "<leader>n";
# mode = "n";
# options.silent = true;
# }
# ];
# autoCmd = [
# {
# desc = "Automatic formatting";
# event = "BufWritePre";
# callback = {
# __raw = ''
# function()
# vim.lsp.buf.format {
# async = false,
# }
# end
# '';
# };
# }
# ];
# # highlight = {
# # Comment = {
# # italic = true;
# # fg = theme.schemeColors.withHashtag.base03; # TODO: Come up with a good name colors.muted maybe?
# # };
# # };
# plugins.lsp = {
# enable = true;
# };
# #plugins.treesitter = {
# # enable = true;
# #};
# plugins.cmp = {
# enable = true;
# settings = {
# mapping = {
# "<C-Space>" = "cmp.mapping.complete()";
# "<C-d>" = "cmp.mapping.scroll_docs(-4)";
# "<C-e>" = "cmp.mapping.close()";
# "<C-f>" = "cmp.mapping.scroll_docs(4)";
# "<CR>" = "cmp.mapping.confirm({ select = true })";
# "<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
# "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
# };
# sources = [
# { name = "path"; }
# { name = "nvim_lsp"; }
# ];
# };
# };
# plugins.web-devicons = {
# enable = true;
# };
# plugins.neo-tree = {
# enable = true;
# closeIfLastWindow = true;
# window = {
# width = 30;
# autoExpandWidth = true;
# };
# extraOptions = {
# default_component_configs.git_status.symbols = {
# # Change type
# added = "+";
# deleted = "✕";
# modified = "✦";
# renamed = "→";
# # Status type
# untracked = "?";
# ignored = "▫";
# unstaged = "□";
# staged = "■";
# conflict = "‼";
# };
# };
# };
# #plugins.cmp-nvim-lsp.enable = true;
# plugins.gitsigns = {
# enable = true;
# settings.current_line_blame = true;
# };
# #plugins.copilot-vim = {
# # enable = true;
# #};
# # plugins.vimtex = {
# # enable = true;
# # texlivePackage = null;
# # settings = {
# # view_method = "zathura";
# # };
# # };
# };
# programs.neovim.defaultEditor = true;
};
}
+99
View File
@@ -0,0 +1,99 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.vscode;
# theme = config.desktop.theming;
in
{
options.modules.vscode = {
enable = mkEnableOption "vscode";
# codeFont = mkOption {
# type = types.anything;
# default = theme.fonts.pkgs."Fira Code";
# };
# fallbackFont = mkOption {
# type = types.anything;
# default = theme.fonts.pkgs."Symbols Nerd Font Mono";
# };
};
config = mkIf cfg.enable {
# TODO: Fix theming
# desktop.theming.fonts.extraFonts = [ cfg.codeFont ];
programs.vscode = {
enable = true;
mutableExtensionsDir = false;
profiles.default = {
extensions = with pkgs.vscode-extensions; [
eamodio.gitlens
ms-vscode.hexeditor
mkhl.direnv
usernamehw.errorlens
gruntfuggly.todo-tree
github.copilot
github.copilot-chat
tomoki1207.pdf
ms-vsliveshare.vsliveshare
ms-vscode-remote.remote-ssh
];
userSettings =
let
# font-family = mkForce "'${cfg.codeFont.name}', '${cfg.fallbackFont.name}'";
# TODO: Move the conversion factor to theme settings
# font-size = mkForce cfg.codeFont.recommendedSize; # Convert pt to px
in
{
# Font setup
# "editor.fontFamily" = font-family;
# "editor.inlayHints.fontFamily" = font-family;
# "editor.inlineSuggest.fontFamily" = font-family;
# "editor.fontSize" = font-size;
# "editor.fontLigatures" = true;
# "terminal.integrated.fontFamily" = font-family;
# "terminal.integrated.fontSize" = font-size;
# "chat.editor.fontFamily" = font-family; # TODO: Change this font to the standard UI font
# "chat.editor.fontSize" = font-size;
# "debug.console.fontFamily" = font-family;
# "debug.console.fontSize" = font-size;
# "scm.inputFontFamily" = font-family; # TODO: Change this font to the standard UI font
# "scm.inputFontSize" = font-size;
# "markdown.preview.fontFamily" = mkForce theme.fonts.sansSerif.name; # TODO: Change this font to the standard UI font
# "markdown.preview.fontSize" = mkForce theme.fonts.sansSerif.recommendedSize;
# Formatting
"editor.formatOnSave" = true;
"editor.tabSize" = 4;
# Layout
"window.menuBarVisibility" = "hidden";
# Git settings
"git.autofetch" = true;
"git.enableSmartCommit" = false;
"git.suggestSmartCommit" = false;
# Disable update notifications
"update.mode" = "none";
# Set themes
"window.autoDetectColorScheme" = true;
# TODO: Move to direnv module
# Ignore direnv folder
"files.exclude" = {
".direnv" = true;
};
};
};
};
};
}
+27
View File
@@ -0,0 +1,27 @@
{
lib,
config,
...
}:
with lib;
let
cfg = config.modules.bash;
in
{
options.modules.bash = {
enable = mkEnableOption "bash";
aliases = mkOption {
type = types.attrsOf types.str;
default = {
"..." = "cd ../..";
};
description = "Shell aliases";
};
};
config.programs.bash = {
enable = cfg.enable;
shellAliases = cfg.aliases;
};
}
+26
View File
@@ -0,0 +1,26 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.direnv;
in
{
options.modules.direnv = {
enable = mkEnableOption "direnv";
};
config = mkIf cfg.enable {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
modules.git.ignores = [
".direnv"
];
};
}
@@ -12,12 +12,6 @@ in
{ {
options.modules.fish = { options.modules.fish = {
enable = mkEnableOption "fish"; enable = mkEnableOption "fish";
plugins = {
done = mkEnableOption "done";
fzf = mkEnableOption "fzf";
grc = mkEnableOption "grc";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@@ -36,26 +30,28 @@ in
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAliases = config.modules.bash.aliases;
plugins = [ plugins = [
(mkIf cfg.plugins.done { {
name = "done"; name = "done";
src = pkgs.fishPlugins.done.src; src = pkgs.fishPlugins.done.src;
}) }
(mkIf cfg.plugins.fzf { {
name = "fzf"; name = "fzf";
src = pkgs.fishPlugins.fzf-fish.src; src = pkgs.fishPlugins.fzf-fish.src;
}) }
(mkIf cfg.plugins.grc { {
name = "grc"; name = "grc";
src = pkgs.fishPlugins.grc.src; src = pkgs.fishPlugins.grc.src;
}) }
]; ];
}; };
# Fish plugin dependencies # Fish plugin dependencies
home.packages = with pkgs; [ home.packages = with pkgs; [
(mkIf cfg.plugins.fzf fzf) fzf
(mkIf cfg.plugins.grc grc) grc
]; ];
}; };
} }
+35
View File
@@ -0,0 +1,35 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.impermanence;
in
{
options.modules.impermanence = {
enable = mkEnableOption "Impermanence";
directories = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
Directories that should be stored in persistent storage.
'';
};
files = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
Files that should be stored in persistent storage.
'';
};
};
config = mkIf cfg.enable {
home.persistence."/persist/home/${config.home.username}" = {
enable = true;
hideMounts = true;
allowOther = true;
directories = cfg.directories;
files = cfg.files;
};
};
}
+63
View File
@@ -0,0 +1,63 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.xpra;
in
{
options.modules.xpra = {
enable = mkEnableOption "Enable xpra";
hosts = mkOption {
type = types.listOf types.str;
default = { };
description = "xpra hosts";
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
xpra
];
xdg.desktopEntries = (
listToAttrs (
map
(entry: {
name = "xpra${
builtins.substring 0 12 (builtins.hashString "sha256" "${entry.name} (${entry.comment})")
}";
value = entry // {
type = "Application";
terminal = false;
genericName = entry.comment;
};
})
(
concatMap (
host:
let
uri = "tcp://${host}:15151/7";
in
[
{
name = "Xpra - Attach";
comment = host;
exec = "xpra attach --min-quality=100 --min-speed=100 --encoding=png --speaker=off ${uri}";
}
{
name = "Xpra - Detach";
comment = host;
exec = "xpra detach ${uri}";
}
]
) cfg.hosts
)
)
);
};
}
-14
View File
@@ -1,14 +0,0 @@
{
lib,
config,
pkgs,
...
}:
{
config = {
time.timeZone = "Europe/Amsterdam";
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
};
}
-23
View File
@@ -1,23 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.neovim;
in
{
options.modules.neovim = {
enable = mkEnableOption "neovim";
};
config = mkIf cfg.enable {
programs.neovim = {
enable = true;
defaultEditor = true;
};
};
}
+18
View File
@@ -0,0 +1,18 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.bluetooth;
in
{
options.modules.bluetooth = {
enable = mkEnableOption "bluetooth";
};
config = mkIf cfg.enable {
# Enable bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
};
}
@@ -1,21 +1,17 @@
{ { lib, config, ... }:
lib,
config,
pkgs,
...
}:
with lib; with lib;
let let
cfg = config.modules.systemd-boot; cfg = config.modules.bootloader;
in in
{ {
options.modules.systemd-boot = { options.modules.bootloader = {
enable = mkEnableOption "systemd-boot"; enable = mkEnableOption "bootloader";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Bootloader
boot.loader = { boot.loader = {
timeout = 0;
systemd-boot.enable = true; systemd-boot.enable = true;
systemd-boot.editor = false; systemd-boot.editor = false;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
+24
View File
@@ -0,0 +1,24 @@
{
lib,
config,
inputs,
...
}:
with lib;
let
cfg = config.modules.disko;
profile = import "${inputs.self}/profiles/disko/${cfg.profile}.nix";
in
{
options.modules.disko = {
enable = mkEnableOption "Disko module";
profile = mkOption {
type = types.str;
default = null;
description = "The profile to use for the disko module.";
};
};
config = mkIf cfg.enable { disko.devices = profile.disko.devices; };
}
+35
View File
@@ -0,0 +1,35 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.fonts;
in
{
options.modules.fonts = {
enable = mkEnableOption "fonts";
};
config = mkIf cfg.enable {
console.packages = [
pkgs.dina-psfu
];
console.font = "dina";
console.earlySetup = true;
# TODO: Disable default fonts, fonts should be managed per user
# fonts.enableDefaultPackages = false;
# fonts.fontconfig = {
# enable = true;
# defaultFonts = {
# serif = mkDefault [ ];
# sansSerif = mkDefault [ ];
# monospace = mkDefault [ ];
# emoji = mkDefault [ ];
# };
# };
};
}
+79
View File
@@ -0,0 +1,79 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.gnome;
in
{
options.modules.gnome = {
enable = mkEnableOption "gnome";
# TODO: Add RDP toggle
};
config = mkIf cfg.enable {
# Enable GDM and Gnome
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.gnome.core-utilities.enable = false;
services.gnome.games.enable = false;
services.gnome.core-developer-tools.enable = false;
environment.gnome.excludePackages = with pkgs; [
adwaita-icon-theme
(derivation { name = "nixos-background-info"; })
gnome-backgrounds
gnome-bluetooth
gnome-color-manager
gnome-control-center
gnome-shell-extensions
gnome-tour
gnome-user-docs
glib
gnome-menus
gtk3.out
xdg-user-dirs
xdg-user-dirs-gtk
];
# Enable Gnome Remote Desktop
services.gnome.gnome-remote-desktop.enable = true;
systemd.services."gnome-remote-desktop".wantedBy = [ "graphical.target" ];
networking.firewall = {
allowedTCPPorts = [
3389
3390
];
allowedUDPPorts = [
3389
3390
];
};
# For GSConnect/KDE Connect
# TODO: Move to host config?
networking.firewall = {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
}
];
};
# Enable dependencies
modules = {
networkmanager.enable = true;
};
};
}
+22
View File
@@ -0,0 +1,22 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.graphics;
in
{
options.modules.graphics = {
enable = mkEnableOption "graphics";
# TODO: Add toggle for hybrid graphics
};
config = mkIf cfg.enable {
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
services.xserver.videoDrivers = [ "nvidia" ];
# TODO: Add nvidia settings back in
# TODO: Move to nvidia module
hardware.nvidia = {
open = true;
};
};
}
+46
View File
@@ -0,0 +1,46 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.impermanence;
in
{
options.modules.impermanence = {
enable = mkEnableOption "Impermanence";
directories = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
Directories that should be stored in persistent storage.
'';
};
files = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
Files that should be stored in persistent storage.
'';
};
resetScript = mkOption {
type = types.lines;
description = ''
Script to run on boot that resets the root partition.
'';
};
};
config = mkIf cfg.enable {
fileSystems."/persist".neededForBoot = true;
boot.initrd.postResumeCommands = mkAfter cfg.resetScript;
# For home-manager persistence
programs.fuse.userAllowOther = true;
environment.persistence."/persist/system" = {
enable = true;
hideMounts = true;
directories = cfg.directories;
files = cfg.files;
};
};
}
+15
View File
@@ -0,0 +1,15 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.networkmanager;
in
{
options.modules.networkmanager = {
enable = mkEnableOption "networkmanager";
};
config = mkIf cfg.enable {
# TODO: Add sudo users to the networkmanager group?
networking.networkmanager.enable = true;
};
}
+20
View File
@@ -0,0 +1,20 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.power-saving;
in
{
options.modules.power-saving = {
enable = mkEnableOption "power saving";
};
config = mkIf cfg.enable {
# Setup power management
powerManagement.enable = true;
services.thermald.enable = true;
services.power-profiles-daemon.enable = true;
# Enable wifi power saving
networking.networkmanager.wifi.powersave = true;
};
}
+25
View File
@@ -0,0 +1,25 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.printing;
in
{
options.modules.printing = {
enable = mkEnableOption "printing";
};
config = mkIf cfg.enable {
# Enable CUPS
services.printing.enable = true;
# Enable Avahi to auto-detect network printers
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
# For SMB network printers
services.samba.enable = true;
};
}
+24
View File
@@ -0,0 +1,24 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.sound;
in
{
options.modules.sound = {
enable = mkEnableOption "sound";
};
config = mkIf cfg.enable {
# Enable pipewire
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# Recommended by wiki, allows user processes to use realtime kernel
security.rtkit.enable = true;
};
}
+15
View File
@@ -0,0 +1,15 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.ssh;
in
{
options.modules.ssh = {
enable = mkEnableOption "ssh";
};
config = mkIf cfg.enable {
services.openssh.enable = true;
# TODO: Is this default configuration secure?
};
}
-37
View File
@@ -1,37 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.power-saving;
in
{
options.modules.power-saving = {
enable = mkEnableOption "power-saving";
};
config = mkIf cfg.enable {
powerManagement.enable = true;
services.thermald.enable = true;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
};
};
};
}
-24
View File
@@ -1,24 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.pipewire;
in
{
options.modules.pipewire = {
enable = mkEnableOption "pipewire";
};
config = mkIf cfg.enable {
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
};
}
-24
View File
@@ -1,24 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.unfree;
in
{
options.modules.unfree = {
enable = mkEnableOption "unfree";
allowedPackages = mkOption {
type = types.listOf types.str;
default = [ ];
};
};
config = mkIf cfg.enable {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (getName pkg) cfg.allowedPackages;
};
}
-96
View File
@@ -1,96 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
# Nixvim
nixvim = import (
builtins.fetchGit {
url = "https://github.com/nix-community/nixvim";
# ref = "nixos-24.05";
}
);
# Stylix
stylix = import (
pkgs.fetchFromGitHub {
owner = "danth";
repo = "stylix";
rev = "1ff9d37d27377bfe8994c24a8d6c6c1734ffa116";
sha256 = "0dz8h1ga8lnfvvmvsf6iqvnbvxrvx3qxi0y8s8b72066mqgvy8y5";
}
);
# User configuration
userModule = types.submodule {
options = {
sudo = mkOption {
type = types.bool;
default = false;
example = true;
description = "Whether the user is allowed sudo access.";
};
configuration = mkOption {
type = types.path;
default = ./users/base.nix;
description = "What home manager configuration to use for this user.";
};
desktopInit = mkOption {
type = types.lines;
default = "";
description = "Bash script to execute after initial log in.";
};
};
};
in
{
imports = [
# Import home manager
<home-manager/nixos>
# Import system wide configuration required for user modules
./modules/systemwide/default.nix
];
options = {
machine.users = mkOption {
type = types.attrsOf userModule;
default = { };
description = "Users configured on this system.";
};
};
config = {
# Add required home manager modules
home-manager.sharedModules = [
# Stylix for theming
stylix.homeManagerModules.stylix
# Nixvim for neovim
nixvim.homeManagerModules.nixvim
# Modules
./modules/default.nix
# Custom packages
../../pkgs/default.nix
];
# Create users
users.users = attrsets.concatMapAttrs (name: value: {
${name} = {
isNormalUser = true;
extraGroups = mkIf value.sudo [ "wheel" ];
};
}) config.machine.users;
# Create home manager configuration for users
home-manager.users = attrsets.concatMapAttrs (name: value: {
${name} = value.configuration;
}) config.machine.users;
};
}
@@ -1,28 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.bluetuith;
in
{
options.modules.bluetuith = {
enable = mkEnableOption "bluetuith";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ bluetuith ];
# Add nix tree
xdg.desktopEntries.bluetuith = {
exec = "${pkgs.bluetuith}/bin/bluetuith";
name = "Bluetuith";
terminal = true;
type = "Application";
};
};
}
-34
View File
@@ -1,34 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
{
imports = [
./firefox/default.nix
./qutebrowser/default.nix
];
options.default.browser = mkOption {
type = types.str;
default = "";
description = "Default browser";
};
config = {
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "${config.default.browser}";
"x-scheme-handler/http" = "${config.default.browser}";
"x-scheme-handler/https" = "${config.default.browser}";
"x-scheme-handler/about" = "${config.default.browser}";
"x-scheme-handler/unknown" = "${config.default.browser}";
};
};
};
}
@@ -1,86 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.firefox;
in
{
options.modules.firefox = {
enable = lib.mkEnableOption "firefox";
default = lib.mkEnableOption "default";
};
config = lib.mkIf cfg.enable {
default.browser = mkIf cfg.default "firefox.desktop";
# Enable NUR
nixpkgs.config.packageOverrides = pkgs: {
# TODO: Pin the version
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
};
programs.firefox = {
enable = true;
policies = {
AppAutoUpdate = false;
# BlockAboutAddons = true;
# BlockAboutConfig = true;
# BlockAboutProfiles = true;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableMasterPasswordCreation = true;
DisablePocket = true;
DisableProfileImport = true;
DisableProfileRefresh = true;
DisableSetDesktopBackground = true;
DisableTelemetry = true;
DisplayBookmarksToolbar = "never";
DisplayMenuBar = "never";
DNSOverHTTPS = {
Enabled = false;
};
DontCheckDefaultBrowser = true;
PasswordManagerEnabled = false;
TranslateEnabled = true;
UseSystemPrintDialog = true;
};
profiles.nixos = {
search.default = "DuckDuckGo";
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
# firefox-color
ublock-origin
];
# Theming
userChrome = readFile (
pkgs.substituteAll {
src = ./userChrome.css;
colors = config.theming.colorsCSS;
}
);
settings = {
"browser.tabs.inTitlebar" = 0;
"extensions.autoDisableScopes" = 0;
"devtools.chrome.enabled" = true;
"devtools.debugger.remote-enabled" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
# Force overwriting configuration file
search.force = true;
containersForce = true;
};
};
};
}
@@ -1,73 +0,0 @@
/* Import theme colors */
@colors@
/* Configure titlebar */
#titlebar {
/* Add consistent margins to tab bar */
padding: 0 2px !important;
/* Add emphasized color to background of tab bar */
background-color: var(--nix-color-bg-status) !important;
/* Set correct text color */
color: var(--nix-color-fg) !important;
}
.tab-background:is([selected], [multiselected]) {
/* Set correct background color */
background-color: var(--nix-color-bg) !important;
}
.tab-content {
/* Set correct text color */
color: var(--nix-color-fg) !important;
}
/* Configure navigation bar */
#nav-bar {
/* Set correct background color */
background-color: var(--nix-color-bg) !important;
/* Set correct text color */
color: var(--nix-color-fg) !important;
}
#urlbar {
/* Set correct text color */
color: var(--nix-color-fg) !important;
}
#urlbar[open]>#urlbar-background {
/* Set correct background color when opened */
background-color: var(--nix-color-bg) !important;
/* Use same box-shadow as tabs when opened */
border: none !important;
box-shadow: 0 0 4px rgba(0, 0, 0, .4) !important;
}
#urlbar[focused]:not([suppress-focus-border])>#urlbar-background {
/* Set better outline for focused urlbar */
outline-color: var(--nix-color-border-focused) !important;
outline-width: 1px !important;
outline-offset: 0 !important;
}
#urlbar-background {
/* Set the correct background color */
background-color: var(--nix-color-bg-status) !important;
}
/* Configure popups */
panelview {
/* Set correct background color for popups */
background-color: var(--nix-color-bg) !important;
/* Set correct text color */
color: var(--nix-color-fg) !important;
}
menupopup {
/* Set correct background color for context menus */
--panel-background: var(--nix-color-bg) !important;
}
Whitespace-only changes.
@@ -1,50 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.qutebrowser;
theme = config.theming;
in
{
options.modules.qutebrowser = {
enable = mkEnableOption "qutebrowser";
default = mkEnableOption "default";
};
config = mkIf cfg.enable {
default.browser = mkIf cfg.default "org.qutebrowser.qutebrowser.desktop";
# TODO: Remove once nixpkgs updates
nixpkgs.config.packageOverrides = pkgs: {
python3 = pkgs.python3.override {
packageOverrides = self: super: {
pykeepass = super.pykeepass.overrideAttrs (attrs: {
version = "4.1.0.post1";
src = pkgs.fetchFromGitHub {
owner = "libkeepass";
repo = "pykeepass";
rev = "refs/tags/v4.1.0.post1";
hash = "sha256-64is/XoRF/kojqd4jQIAQi1od8TRhiv9uR+WNIGvP2A=";
};
});
};
};
};
programs.qutebrowser = {
enable = true;
extraConfig = ''
config.set("colors.webpage.darkmode.enabled", False)
config.set("colors.webpage.preferred_color_scheme", "${if theme.darkMode then "dark" else "light"}")
config.set("fonts.default_family", "${theme.fonts.monospace.name}")
config.set("fonts.default_size", "${toString theme.fonts.monospace.recommendedSize}pt")
'';
};
};
}
-39
View File
@@ -1,39 +0,0 @@
{
input,
pkgs,
config,
...
}:
{
imports = [
# Import all modules
./bluetuith/default.nix
./browser/default.nix
./desktop/default.nix
./discord/default.nix
./feishin/default.nix
./fontconfig/default.nix
./language/haskell.nix
./language/nix.nix
./language/rust.nix
./mako/default.nix
./neovim/default.nix
./obsidian/default.nix
./rofi/default.nix
./rofi/rofi-rbw.nix
./shell/bash.nix
./shell/fish.nix
./steam/default.nix
./terminal/default.nix
./terminal/foot/default.nix
./theming/default.nix
./vscode/default.nix
./whatsapp/default.nix
./winbox/default.nix
./zathura/default.nix
# Import unfree helper
../../unfree/default.nix
];
}
@@ -1,23 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.glpaper;
in
{
options.modules.glpaper = {
enable = mkEnableOption "glpaper";
shader = mkOption {
type = types.path;
default = ./shaders/waves.glsl;
description = "Shader to use for the background";
};
};
config = mkIf cfg.enable { home.packages = [ pkgs.glpaper ]; };
}
@@ -1,169 +0,0 @@
#define zoom 0.900
#define tile 0.850
#define speed2 0.0
#ifdef GL_ES
precision highp float;
#endif
uniform float time;
uniform vec2 resolution;
#define time3 (time * 0.01)
#define mouse vec2(sin(time3)/48., cos(time3)/48.)
#define iterations 14
#define formuparam2 0.79
#define volsteps 5
#define stepsize 0.390
#define brightness 0.003
#define darkmatter 0.400
#define distfading 0.560
#define saturation 0.800
#define transverseSpeed zoom*2.0
#define cloud 0.11
float triangle(float x, float a) {
float output2 = 2.0 * abs(2.0 * ((x/a) - floor((x/a) + 0.5))) - 1.0;
return output2;
}
float field(in vec3 p) {
float strength = 7. + .03 * log(1.e-6 + fract(sin(time3) * 4373.11));
float accum = 0.;
float prev = 0.;
float tw = 0.;
// Replace or uncomment the for-loop as intended in your logic
float mag = dot(p, p);
p = abs(p) / mag + vec3(-.5, -.8 + 0.1*sin(time3*0.7 + 2.0), -1.1+0.3*cos(time3*0.3));
float w = exp(-float(0) / 7.);
accum += w * exp(-strength * pow(abs(mag - prev), 2.3));
tw += w;
prev = mag;
return max(0., 5. * accum / tw - .7);
}
void main() {
vec2 uv2 = 2. * gl_FragCoord.xy / vec2(512) - 1.;
vec2 uvs = uv2 * vec2(512) / 512.;
float time2 = time3;
float speed = speed2;
speed = .01 * cos(time2*0.02 + 3.1415926/4.0);
float formuparam = formuparam2;
vec2 uv = uvs;
float a_xz = 0.9;
float a_yz = -.6;
float a_xy = 0.9 + time3*0.08;
mat2 rot_xz = mat2(cos(a_xz),sin(a_xz),-sin(a_xz),cos(a_xz));
mat2 rot_yz = mat2(cos(a_yz),sin(a_yz),-sin(a_yz),cos(a_yz));
mat2 rot_xy = mat2(cos(a_xy),sin(a_xy),-sin(a_xy),cos(a_xy));
float v2 =1.0;
vec3 dir=vec3(uv*zoom,1.);
vec3 from=vec3(0.0, 0.0,0.0);
from.x -= 5.0*(mouse.x-0.5);
from.y -= 5.0*(mouse.y-0.5);
vec3 forward = vec3(0.,0.,1.);
from.x += transverseSpeed*(1.0)*cos(0.01*time3) + 0.001*time3;
from.y += transverseSpeed*(1.0)*sin(0.01*time3) +0.001*time3;
from.z += 0.003*time3;
dir.xy*=rot_xy;
forward.xy *= rot_xy;
dir.xz*=rot_xz;
forward.xz *= rot_xz;
dir.yz*= rot_yz;
forward.yz *= rot_yz;
from.xy*=-rot_xy;
from.xz*=rot_xz;
from.yz*= rot_yz;
float zooom = (time2-3311.)*speed;
from += forward* zooom;
float sampleShift = mod( zooom, stepsize );
float zoffset = -sampleShift;
sampleShift /= stepsize;
float s=0.24;
float s3 = s + stepsize/2.0;
vec3 v=vec3(0.);
float t3 = 0.0;
vec3 backCol2 = vec3(0.);
for (int r=0; r<volsteps; r++) {
vec3 p2=from+(s+zoffset)*dir;
vec3 p3=from+(s3+zoffset)*dir;
p2 = abs(vec3(tile)-mod(p2,vec3(tile*2.)));
p3 = abs(vec3(tile)-mod(p3,vec3(tile*2.)));
#ifdef cloud
t3 = field(p3);
#endif
float pa,a=pa=0.;
for (int i=0; i<iterations; i++) {
p2=abs(p2)/dot(p2,p2)-formuparam;
float D = abs(length(p2)-pa);
a += i > 7 ? min( 12., D) : D;
pa=length(p2);
}
a*=a*a;
float s1 = s+zoffset;
float fade = pow(distfading,max(0.,float(r)-sampleShift));
v+=fade;
if( r == 0 )
fade *= (1. - (sampleShift));
if( r == volsteps-1 )
fade *= sampleShift;
v+=vec3(s1,s1*s1,s1*s1*s1*s1)*a*brightness*fade;
backCol2 += mix(.11, 1., v2) * vec3(1.8 * t3 * t3 * t3, 1.4 * t3 * t3, t3) * fade;
s+=stepsize;
s3 += stepsize;
}
v=mix(vec3(length(v)),v,saturation);
vec4 forCol2 = vec4(v*.01,1.);
#ifdef cloud
backCol2 *= cloud;
#endif
backCol2.b *= 1.8;
backCol2.r *= 0.05;
backCol2.b = 0.5*mix(backCol2.g, backCol2.b, 0.8);
backCol2.g = 0.0;
backCol2.bg = mix(backCol2.gb, backCol2.bg, 0.5*(cos(time3*0.01) + 1.0));
gl_FragColor = forCol2 + vec4(backCol2, 1.0);
}
@@ -1,118 +0,0 @@
#ifdef GL_ES
precision mediump float;
#endif
// glslsandbox uniforms
uniform float time;
uniform vec2 resolution;
// shadertoy emulation
#define iTime time * 0.01 + 10.0
#define iResolution resolution
#define fragCoord gl_FragCoord
#define fragColor gl_FragColor
float colormap_red(float x) {
if (x < 0.0) {
return 54.0 / 255.0;
} else if (x < 20049.0 / 82979.0) {
return (829.79 * x + 54.51) / 255.0;
} else {
return 1.0;
}
}
float colormap_green(float x) {
if (x < 20049.0 / 82979.0) {
return 0.0;
} else if (x < 327013.0 / 810990.0) {
return (8546482679670.0 / 10875673217.0 * x - 2064961390770.0 / 10875673217.0) / 255.0;
} else if (x <= 1.0) {
return (103806720.0 / 483977.0 * x + 19607415.0 / 483977.0) / 255.0;
} else {
return 1.0;
}
}
float colormap_blue(float x) {
if (x < 0.0) {
return 54.0 / 255.0;
} else if (x < 7249.0 / 82979.0) {
return (829.79 * x + 54.51) / 255.0;
} else if (x < 20049.0 / 82979.0) {
return 127.0 / 255.0;
} else if (x < 327013.0 / 810990.0) {
return (792.02249341361393720147485376583 * x - 64.364790735602331034989206222672) / 255.0;
} else {
return 1.0;
}
}
vec4 colormap(float x) {
return vec4(colormap_red(x), colormap_green(x), colormap_blue(x), 1.0);
}
// https://iquilezles.org/articles/warp
/*float noise( in vec2 x )
{
vec2 p = floor(x);
vec2 f = fract(x);
f = f*f*(3.0-2.0*f);
float a = textureLod(iChannel0,(p+vec2(0.5,0.5))/256.0,0.0).x;
float b = textureLod(iChannel0,(p+vec2(1.5,0.5))/256.0,0.0).x;
float c = textureLod(iChannel0,(p+vec2(0.5,1.5))/256.0,0.0).x;
float d = textureLod(iChannel0,(p+vec2(1.5,1.5))/256.0,0.0).x;
return mix(mix( a, b,f.x), mix( c, d,f.x),f.y);
}*/
float rand(vec2 n) {
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
}
float noise(vec2 p){
vec2 ip = floor(p);
vec2 u = fract(p);
u = u*u*(3.0-2.0*u);
float res = mix(
mix(rand(ip),rand(ip+vec2(1.0,0.0)),u.x),
mix(rand(ip+vec2(0.0,1.0)),rand(ip+vec2(1.0,1.0)),u.x),u.y);
return res*res;
}
const mat2 mtx = mat2( 0.80, 0.60, -0.60, 0.80 );
float fbm( vec2 p )
{
float f = 0.0;
f += 0.500000*noise( p + iTime ); p = mtx*p*2.02;
f += 0.031250*noise( p ); p = mtx*p*2.01;
f += 0.250000*noise( p ); p = mtx*p*2.03;
f += 0.125000*noise( p ); p = mtx*p*2.01;
f += 0.062500*noise( p ); p = mtx*p*2.04;
f += 0.015625*noise( p + sin(iTime) );
return f/0.96875;
}
float pattern( in vec2 p )
{
return fbm( p + fbm( p + fbm( p ) ) );
}
void main()
{
vec2 uv = fragCoord.xy/iResolution.x;
float shade = pattern(uv);
fragColor = vec4(colormap(shade).rgb, shade);
}
/** SHADERDATA
{
"title": "Base warp fBM",
"description": "Noise but Pink",
"model": "person"
}
*/
@@ -1,13 +0,0 @@
#ifdef GL_ES
precision mediump float;
#endif
// glslsandbox uniforms
uniform float time;
uniform vec2 resolution;
// shadertoy emulation
#define iTime time
#define iResolution resolution
#define fragCoord gl_FragCoord
#define fragColor gl_FragColor
@@ -1,208 +0,0 @@
#ifdef GL_ES
precision highp float;
#endif
uniform float time;
uniform vec2 resolution;
#define CHAR_SIZE vec2(6, 7)
#define CHAR_SPACING vec2(6, 9)
vec2 start_pos = vec2(0);
vec2 print_pos = vec2(0);
vec2 print_pos_pre_move = vec2(0);
vec3 text_color = vec3(1);
/*
Top left pixel is the most significant bit.
Bottom right pixel is the least significant bit.
███ |
█ █ |
█ █ |
█ █ |
█████ |
█ █ |
█ █ |
000000
100010
100010
100010
111110
100010
100010
011100 (upper 21 bits)
100010 -> 011100 100010 100010 100 -> 935188
100010
100
010 (lower 21 bits)
111110 -> 010 111110 100010 100010 -> 780450
100010
100010
vec2(935188.0,780450.0)
*/
//Text coloring
#define HEX(i) text_color = mod(vec3(i / 65536,i / 256,i),vec3(256.0))/255.0;
#define RGB(r,g,b) text_color = vec3(r,g,b);
#define STRWIDTH(c) (c * CHAR_SPACING.x)
#define STRHEIGHT(c) (c * CHAR_SPACING.y)
#define BEGIN_TEXT(x,y) print_pos = floor(vec2(x,y)); start_pos = floor(vec2(x,y));
//Automatically generated from the sprite sheet here: http://uzebox.org/wiki/index.php?title=File:Font6x8.png
#define _ col+=char(vec2(0.0,0.0),uv);
#define _spc col+=char(vec2(0.0,0.0),uv)*text_color;
#define _exc col+=char(vec2(276705.0,32776.0),uv)*text_color;
#define _quo col+=char(vec2(1797408.0,0.0),uv)*text_color;
#define _hsh col+=char(vec2(10738.0,1134484.0),uv)*text_color;
#define _dol col+=char(vec2(538883.0,19976.0),uv)*text_color;
#define _pct col+=char(vec2(1664033.0,68006.0),uv)*text_color;
#define _amp col+=char(vec2(545090.0,174362.0),uv)*text_color;
#define _apo col+=char(vec2(798848.0,0.0),uv)*text_color;
#define _lbr col+=char(vec2(270466.0,66568.0),uv)*text_color;
#define _rbr col+=char(vec2(528449.0,33296.0),uv)*text_color;
#define _ast col+=char(vec2(10471.0,1688832.0),uv)*text_color;
#define _crs col+=char(vec2(4167.0,1606144.0),uv)*text_color;
#define _per col+=char(vec2(0.0,1560.0),uv)*text_color;
#define _dsh col+=char(vec2(7.0,1572864.0),uv)*text_color;
#define _com col+=char(vec2(0.0,1544.0),uv)*text_color;
#define _lsl col+=char(vec2(1057.0,67584.0),uv)*text_color;
#define _0 col+=char(vec2(935221.0,731292.0),uv)*text_color;
#define _1 col+=char(vec2(274497.0,33308.0),uv)*text_color;
#define _2 col+=char(vec2(934929.0,1116222.0),uv)*text_color;
#define _3 col+=char(vec2(934931.0,1058972.0),uv)*text_color;
#define _4 col+=char(vec2(137380.0,1302788.0),uv)*text_color;
#define _5 col+=char(vec2(2048263.0,1058972.0),uv)*text_color;
#define _6 col+=char(vec2(401671.0,1190044.0),uv)*text_color;
#define _7 col+=char(vec2(2032673.0,66576.0),uv)*text_color;
#define _8 col+=char(vec2(935187.0,1190044.0),uv)*text_color;
#define _9 col+=char(vec2(935187.0,1581336.0),uv)*text_color;
#define _col col+=char(vec2(195.0,1560.0),uv)*text_color;
#define _scl col+=char(vec2(195.0,1544.0),uv)*text_color;
#define _les col+=char(vec2(135300.0,66052.0),uv)*text_color;
#define _equ col+=char(vec2(496.0,3968.0),uv)*text_color;
#define _grt col+=char(vec2(528416.0,541200.0),uv)*text_color;
#define _que col+=char(vec2(934929.0,1081352.0),uv)*text_color;
#define _ats col+=char(vec2(935285.0,714780.0),uv)*text_color;
#define _A col+=char(vec2(935188.0,780450.0),uv)*text_color;
#define _B col+=char(vec2(1983767.0,1190076.0),uv)*text_color;
#define _C col+=char(vec2(935172.0,133276.0),uv)*text_color;
#define _D col+=char(vec2(1983764.0,665788.0),uv)*text_color;
#define _E col+=char(vec2(2048263.0,1181758.0),uv)*text_color;
#define _F col+=char(vec2(2048263.0,1181728.0),uv)*text_color;
#define _G col+=char(vec2(935173.0,1714334.0),uv)*text_color;
#define _H col+=char(vec2(1131799.0,1714338.0),uv)*text_color;
#define _I col+=char(vec2(921665.0,33308.0),uv)*text_color;
#define _J col+=char(vec2(66576.0,665756.0),uv)*text_color;
#define _K col+=char(vec2(1132870.0,166178.0),uv)*text_color;
#define _L col+=char(vec2(1065220.0,133182.0),uv)*text_color;
#define _M col+=char(vec2(1142100.0,665762.0),uv)*text_color;
#define _N col+=char(vec2(1140052.0,1714338.0),uv)*text_color;
#define _O col+=char(vec2(935188.0,665756.0),uv)*text_color;
#define _P col+=char(vec2(1983767.0,1181728.0),uv)*text_color;
#define _Q col+=char(vec2(935188.0,698650.0),uv)*text_color;
#define _R col+=char(vec2(1983767.0,1198242.0),uv)*text_color;
#define _S col+=char(vec2(935171.0,1058972.0),uv)*text_color;
#define _T col+=char(vec2(2035777.0,33288.0),uv)*text_color;
#define _U col+=char(vec2(1131796.0,665756.0),uv)*text_color;
#define _V col+=char(vec2(1131796.0,664840.0),uv)*text_color;
#define _W col+=char(vec2(1131861.0,699028.0),uv)*text_color;
#define _X col+=char(vec2(1131681.0,84130.0),uv)*text_color;
#define _Y col+=char(vec2(1131794.0,1081864.0),uv)*text_color;
#define _Z col+=char(vec2(1968194.0,133180.0),uv)*text_color;
#define _lsb col+=char(vec2(925826.0,66588.0),uv)*text_color;
#define _rsl col+=char(vec2(16513.0,16512.0),uv)*text_color;
#define _rsb col+=char(vec2(919584.0,1065244.0),uv)*text_color;
#define _pow col+=char(vec2(272656.0,0.0),uv)*text_color;
#define _usc col+=char(vec2(0.0,62.0),uv)*text_color;
#define _a col+=char(vec2(224.0,649374.0),uv)*text_color;
#define _b col+=char(vec2(1065444.0,665788.0),uv)*text_color;
#define _c col+=char(vec2(228.0,657564.0),uv)*text_color;
#define _d col+=char(vec2(66804.0,665758.0),uv)*text_color;
#define _e col+=char(vec2(228.0,772124.0),uv)*text_color;
#define _f col+=char(vec2(401543.0,1115152.0),uv)*text_color;
#define _g col+=char(vec2(244.0,665474.0),uv)*text_color;
#define _h col+=char(vec2(1065444.0,665762.0),uv)*text_color;
#define _i col+=char(vec2(262209.0,33292.0),uv)*text_color;
#define _j col+=char(vec2(131168.0,1066252.0),uv)*text_color;
#define _k col+=char(vec2(1065253.0,199204.0),uv)*text_color;
#define _l col+=char(vec2(266305.0,33292.0),uv)*text_color;
#define _m col+=char(vec2(421.0,698530.0),uv)*text_color;
#define _n col+=char(vec2(452.0,1198372.0),uv)*text_color;
#define _o col+=char(vec2(228.0,665756.0),uv)*text_color;
#define _p col+=char(vec2(484.0,667424.0),uv)*text_color;
#define _q col+=char(vec2(244.0,665474.0),uv)*text_color;
#define _r col+=char(vec2(354.0,590904.0),uv)*text_color;
#define _s col+=char(vec2(228.0,114844.0),uv)*text_color;
#define _t col+=char(vec2(8674.0,66824.0),uv)*text_color;
#define _u col+=char(vec2(292.0,1198868.0),uv)*text_color;
#define _v col+=char(vec2(276.0,664840.0),uv)*text_color;
#define _w col+=char(vec2(276.0,700308.0),uv)*text_color;
#define _x col+=char(vec2(292.0,1149220.0),uv)*text_color;
#define _y col+=char(vec2(292.0,1163824.0),uv)*text_color;
#define _z col+=char(vec2(480.0,1148988.0),uv)*text_color;
#define _lpa col+=char(vec2(401542.0,66572.0),uv)*text_color;
#define _bar col+=char(vec2(266304.0,33288.0),uv)*text_color;
#define _rpa col+=char(vec2(788512.0,1589528.0),uv)*text_color;
#define _tid col+=char(vec2(675840.0,0.0),uv)*text_color;
#define _lar col+=char(vec2(8387.0,1147904.0),uv)*text_color;
#define _nl print_pos = start_pos - vec2(0,CHAR_SPACING.y);
//Extracts bit b from the given number.
float extract_bit(float n, float b)
{
b = clamp(b,-1.0,22.0);
return floor(mod(floor(n / pow(2.0,floor(b))),2.0));
}
//Returns the pixel at uv in the given bit-packed sprite.
float sprite(vec2 spr, vec2 size, vec2 uv)
{
uv = floor(uv);
float bit = (size.x-uv.x-1.0) + uv.y * size.x;
bool bounds = all(greaterThanEqual(uv,vec2(0)))&& all(lessThan(uv,size));
return bounds ? extract_bit(spr.x, bit - 21.0) + extract_bit(spr.y, bit) : 0.0;
}
//Prints a character and moves the print position forward by 1 character width.
vec3 char(vec2 ch, vec2 uv)
{
float px = sprite(ch, CHAR_SIZE, uv - print_pos);
print_pos.x += CHAR_SPACING.x;
print_pos.y += sin(4.*print_pos.x-time*10.);
return vec3(px);
}
vec3 Text(vec2 uv)
{
vec3 col = vec3(0.0);
vec2 center_pos = vec2(resolution.x/2.0 - STRWIDTH(20.0)/2.0,resolution.y/2.0 - STRHEIGHT(1.0)/2.0);
BEGIN_TEXT(center_pos.x,center_pos.y)
HEX(0x00ffFF) _ _ _w _a _t _e _r _ _;
BEGIN_TEXT(resolution.x/2.0-STRWIDTH(11.0)/2.0,resolution.y/2.0)
print_pos += vec2(cos(time)*96.,sin(time)*96.);
// RGB(1,0,0) _M RGB(1,.5,0)_o RGB(1,1,0)_v RGB(0,1,0)_i RGB(0,.5,1)_n RGB(0.5,0,1)_g _ RGB(1,0,0)_T RGB(1,.5,0)_e RGB(1,1,0)_x RGB(0,1,0)_t
return col;
}
void main( void )
{
vec2 uv = gl_FragCoord.xy;
vec2 duv = floor(gl_FragCoord.xy);
vec3 pixel = Text(duv);
vec3 col = pixel*0.9+0.1;
col *= (1.-distance(mod(uv,vec2(1.0)),vec2(0.65)))*1.2;
gl_FragColor = vec4(vec3(col), 1.0);
}
@@ -1,108 +0,0 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform float time;
uniform vec2 resolution;
#define iTime time * 0.05 + 50.0
#define iResolution resolution
#define fragCoord gl_FragCoord
#define fragColor gl_FragColor
float colormap_red(float x) {
if (x < 0.0) {
return 54.0 / 255.0;
} else if (x < 20049.0 / 82979.0) {
return (829.79 * x + 54.51) / 255.0;
} else {
return 1.0;
}
}
float colormap_green(float x) {
if (x < 20049.0 / 82979.0) {
return 0.0;
} else if (x < 327013.0 / 810990.0) {
return (8546482679670.0 / 10875673217.0 * x - 2064961390770.0 / 10875673217.0) / 255.0;
} else if (x <= 1.0) {
return (103806720.0 / 483977.0 * x + 19607415.0 / 483977.0) / 255.0;
} else {
return 1.0;
}
}
float colormap_blue(float x) {
if (x < 0.0) {
return 54.0 / 255.0;
} else if (x < 7249.0 / 82979.0) {
return (829.79 * x + 54.51) / 255.0;
} else if (x < 20049.0 / 82979.0) {
return 127.0 / 255.0;
} else if (x < 327013.0 / 810990.0) {
return (792.02249341361393720147485376583 * x - 64.364790735602331034989206222672) / 255.0;
} else {
return 1.0;
}
}
vec4 colormap(float x) {
return vec4(colormap_red(x), colormap_green(x), colormap_blue(x), 1.0);
}
// https://iquilezles.org/articles/warp
/*float noise( in vec2 x )
{
vec2 p = floor(x);
vec2 f = fract(x);
f = f*f*(3.0-2.0*f);
float a = textureLod(iChannel0,(p+vec2(0.5,0.5))/256.0,0.0).x;
float b = textureLod(iChannel0,(p+vec2(1.5,0.5))/256.0,0.0).x;
float c = textureLod(iChannel0,(p+vec2(0.5,1.5))/256.0,0.0).x;
float d = textureLod(iChannel0,(p+vec2(1.5,1.5))/256.0,0.0).x;
return mix(mix( a, b,f.x), mix( c, d,f.x),f.y);
}*/
float rand(vec2 n) {
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
}
float noise(vec2 p){
vec2 ip = floor(p);
vec2 u = fract(p);
u = u*u*(3.0-2.0*u);
float res = mix(
mix(rand(ip),rand(ip+vec2(1.0,0.0)),u.x),
mix(rand(ip+vec2(0.0,1.0)),rand(ip+vec2(1.0,1.0)),u.x),u.y);
return res*res;
}
const mat2 mtx = mat2( 0.80, 0.60, -0.60, 0.80 );
float fbm( vec2 p )
{
float f = 0.0;
f += 0.500000*noise( p + iTime ); p = mtx*p*2.02;
f += 0.031250*noise( p ); p = mtx*p*2.01;
f += 0.250000*noise( p ); p = mtx*p*2.03;
f += 0.125000*noise( p ); p = mtx*p*2.01;
f += 0.062500*noise( p ); p = mtx*p*2.04;
f += 0.015625*noise( p + sin(iTime) );
return f/0.96875;
}
float pattern( in vec2 p )
{
return fbm( p + fbm( p + fbm( p ) ) );
}
void main()
{
vec2 uv = fragCoord.xy/iResolution.x;
float shade = pattern(uv);
fragColor = vec4(colormap(shade).rgb, shade);
}
@@ -1,155 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.waybar;
theme = config.theming;
colors = theme.colors;
in
{
options.modules.waybar = {
enable = mkEnableOption "waybar";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
pulsemixer
playerctl
wpa_supplicant_gui # TODO: Move
];
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
spacing = 16;
modules-left = [ "river/tags" ];
modules-center = [
#"river/window"
"mpris"
];
modules-right = [
"bluetooth"
"network"
"pulseaudio"
"battery"
"clock"
];
"river/window" = {
max-length = 50;
};
"river/tags" = {
tag-labels = [
"一"
"二"
"三"
"四"
"五"
"六"
"七"
"八"
"九"
];
disable-click = false;
};
network = {
tooltip = false;
on-click = "wpa_gui";
format-wifi = "直 {essid}"; # Spacing achieved using "Thin Space"
format-ethernet = "TODO";
format-disconnected = "睊";
};
pulseaudio = {
tooltip = false;
format = "{icon}   {volume}%"; # Spacing achieved using "Thin Space"
#format-muted = "";
format-muted = "{icon}  --%"; # Spacing achieved using "Thin Space"
format-icons = {
#headphone = "";
#default = [ "" "" ];
headphone = "";
headphone-muted = "";
default = [
""
""
""
];
};
};
battery = {
format = "{icon} {capacity}%"; # Spacing achieved using "Thin Space"
format-charging = " {capacity}%"; # Spacing achieved using "Thin Space"
#format-icons = [ "󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
format-icons = [
""
""
""
""
""
""
""
""
""
""
""
];
interval = 1;
};
clock = {
#format = "󰅐 {:%H:%M}";
#format = "   {:%H:%M}"; # Spacing achieved using "Thin Space"
format = "{:%H:%M}";
};
mpris = {
format = "{dynamic}";
tooltip-format = "";
interval = 1;
};
bluetooth = {
tooltip = false;
format = "  {status}"; # Spacing achieved using "Thin Space"
format-connected = "  {device_alias}"; # Spacing achieved using "Thin Space"
};
};
};
# TODO: Replace base03 color with named color
style = ''
window#waybar {
color: #${colors.fg};
background-color: #${colors.bg};
border-style: none none solid none;
border-width: ${toString theme.layout.borderSize}px;
border-color: #${colors.border-unfocused};
font-size: 12px;
font-family: "${theme.fonts.monospace.name}";
}
.modules-right {
margin: 0 8px 0 0;
}
#tags button {
color: #${theme.schemeColors.base03};
padding: 0 5px 1px 5px;
border-radius: 0;
font-size: 16px;
font-family: "wenquanyi bitmap song";
}
#tags button.occupied {
color: #${colors.fg};
}
#tags button.focused {
color: #${colors.accent};
}
'';
};
};
}
-55
View File
@@ -1,55 +0,0 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.modules.desktop;
in
{
imports = [
# Import desktop environment modules
./background/glpaper/default.nix
./bar/waybar.nix
./lock-screen/waylock.nix
./window-manager/river.nix
];
options.modules.desktop = {
wayland = mkEnableOption "wayland";
initScript = mkOption {
type = types.lines;
default = "${pkgs.bash}/bin/bash";
description = "Bash script to execute after logging in.";
};
};
config = {
# Ensure desktop related systemd services (xdg) have access to session variables.
systemd.user.sessionVariables = config.home.sessionVariables;
home.packages = optionals cfg.wayland (
with pkgs;
[
pkgs.wl-clipboard
pkgs.wtype
pkgs.grim
pkgs.slurp
]
);
home.file.".initrc" = {
enable = true;
executable = true;
text =
''
#!${pkgs.bash}/bin/bash
''
+ cfg.initScript;
};
};
}
@@ -1,20 +0,0 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.modules.waylock;
in
{
options.modules.waylock = {
enable = mkEnableOption "waylock";
};
config = {
home.packages = mkIf cfg.enable (with pkgs; [ waylock ]);
};
}
@@ -1,247 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.river;
in
{
options.modules.river.enable = lib.mkEnableOption "river";
# osConfig = lib.mkIf cfg.enable {
# programs.river.enable = true;
# };
config = lib.mkIf cfg.enable {
# Set desktop type to wayland
modules.desktop.wayland = true;
# TODO: Move elsewhere and make keybindings more configurable
modules.rofi.enable = true;
# TODO: Move elsewhere
home.packages = with pkgs; [
brightnessctl
river-filtile
# owm
];
# Change desktop to execute river
modules.desktop.initScript = ''
river
'';
# Update background after rebuild
# home.activation = {
# river = lib.hm.dag.entryBetween [ "reloadSystemd" ] [ "installPackages" ] ''
# # Close waybar
# PATH="${pkgs.procps}/bin:$PATH" $DRY_RUN_CMD pkill waybar
# # Kill rivertile
# PATH="${pkgs.procps}/bin:$PATH" $DRY_RUN_CMD pkill rivertile
# # Kill glpaper
# PATH="${pkgs.procps}/bin:$PATH" $DRY_RUN_CMD pkill glpaper
# # Restart river
# PATH="${pkgs.river}/bin:${pkgs.systemd}/bin:${pkgs.waybar}/bin:$PATH" $DRY_RUN_CMD ~/.config/river/init
# '';
# };
# River setup
wayland.windowManager.river = {
enable = true;
xwayland.enable = true;
settings =
let
layout = "filtile";
layoutOptions = "-outer-padding ${toString config.theming.layout.windowPadding} -view-padding ${toString config.theming.layout.windowPadding}";
modes = [
"normal"
"locked"
];
tags = [
1
2
3
4
5
6
7
8
9
];
waylockOptions = "-init-color 0x${colors.bg} -input-color 0x${colors.border-focused} -fail-color 0x${colors.bg}";
colors = config.theming.colors;
# Quick pow function
pow2 = power: if power != 0 then 2 * (pow2 (power - 1)) else 1;
# Modifiers
main = "Super";
ssm = "Super+Shift";
sas = "Super+Alt+Shift";
sam = "Super+Alt";
scm = "Super+Control";
scam = "Super+Control+Alt";
ssc = "Super+Shift+Control";
in
{
default-layout = "${layout}";
set-repeat = "50 300";
xcursor-theme = "BreezeX-RosePine-Linux 24";
keyboard-layout = "-options \"caps:escape\" us";
border-width = toString config.theming.layout.borderSize;
background-color = "0x${colors.bg}";
border-color-focused = "0x${colors.fg}";
border-color-unfocused = "0x${colors.border-unfocused}"; # TODO: Change to use named color;
border-color-urgent = "0x${colors.fg}";
spawn = [
"\"${layout} ${layoutOptions}\""
"waybar"
"\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\""
];
map = (
lib.attrsets.recursiveUpdate
{
normal =
{
"${main} Q" = "close";
"${ssm} E" = "exit";
# Basic utilities
"${main} X " = "spawn \"waylock -fork-on-lock ${waylockOptions}\"";
"${ssm} Return" = "spawn foot";
"${main} P" = "spawn \"rofi -show drun\"";
"${ssm} P" = "spawn rofi-rbw";
"${main} S" = "spawn \"grim -g \\\"\\\$(slurp)\\\" ~/Images/Screenshots/\\\$(date +'%s_grim.png')\"";
# Window focus
"${main} J" = "focus-view next";
"${main} K" = "focus-view previous";
# Swap windows
"${ssm} J" = "swap next";
"${ssm} K" = "swap previous";
"${main} Return" = "zoom";
# Main ratio
"${main} H" = "send-layout-cmd ${layout} 'main-ratio -0.05'";
"${main} L" = "send-layout-cmd ${layout} 'main-ratio +0.05'";
# Main count
"${ssm} H" = "send-layout-cmd ${layout} 'main-count +1'";
"${ssm} L" = "send-layout-cmd ${layout} 'main-count -1'";
# Tags
"${main} 0" = "set-focused-tags ${toString (pow2 32 - 1)}";
"${ssm} 0" = "set-view-tags ${toString (pow2 32 - 1)}";
# Orientation
"${main} Up" = "send-layout-cmd ${layout} \"main-location top\"";
"${main} Right" = "send-layout-cmd ${layout} \"main-location right\"";
"${main} Down" = "send-layout-cmd ${layout} \"main-location bottom\"";
"${main} Left" = "send-layout-cmd ${layout} \"main-location left\"";
# Move floating windows
"${sam} H" = "move left 100";
"${sam} J" = "move down 100";
"${sam} K" = "move up 100";
"${sam} L" = "move right 100";
# Snap floating windows
"${scam} H" = "snap left";
"${scam} J" = "snap down";
"${scam} K" = "snap up";
"${scam} L" = "snap right";
# Resize floating windows
"${sas} H" = "resize horizontal -100";
"${sas} J" = "resize vertical 100";
"${sas} K" = "resize vertical -100";
"${sas} L" = "resize horizontal 100";
# Toggle modes
"${main} Space" = "toggle-float";
"${main} F" = "toggle-fullscreen";
}
// builtins.listToAttrs (
builtins.concatLists (
map (tag: [
{
name = "${main} ${toString tag}";
value = "set-focused-tags ${toString (pow2 (tag - 1))}";
}
{
name = "${ssm} ${toString tag}";
value = "set-view-tags ${toString (pow2 (tag - 1))}";
}
{
name = "${scm} ${toString tag}";
value = "toggle-focused-tags ${toString (pow2 (tag - 1))}";
}
{
name = "${ssc} ${toString tag}";
value = "toggle-view-tags ${toString (pow2 (tag - 1))}";
}
]) tags
)
);
}
(
builtins.listToAttrs (
map (mode: {
name = "${mode}";
value = {
# Control volume
"None XF86AudioRaiseVolume" = "spawn \"pulsemixer --change-volume +5\"";
"None XF86AudioLowerVolume" = "spawn \"pulsemixer --change-volume -5\"";
"None XF86AudioMute" = "spawn \"pulsemixer --toggle-mute\"";
# Control brightness
"None XF86MonBrightnessUp" = "spawn \"brightnessctl set +5%\"";
"None XF86MonBrightnessDown" = "spawn \"brightnessctl set 5%-\"";
# Control music playback
"None XF86Messenger" = "spawn \"playerctl previous\"";
"None XF86Go" = "spawn \"playerctl play-pause\"";
"None Cancel" = "spawn \"playerctl next\"";
};
}) modes
)
)
);
map-pointer = {
normal = {
"${main} BTN_LEFT" = "move-view";
"${main} BTN_RIGHT" = "resize-view";
"${main} BTN_MIDDLE" = "toggle-float";
};
};
input = {
"'*'" = {
accel-profile = "adaptive";
pointer-accel = "0.5";
scroll-factor = "0.8";
};
"'*Synaptics*'" = {
natural-scroll = "enabled";
};
};
rule-add = {
"-app-id" = {
"'bar'" = "csd";
"'*'" = "ssd";
"'wpa_gui'" = "float";
};
};
};
};
};
}
-22
View File
@@ -1,22 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.discord;
in
{
options.modules.discord = {
enable = mkEnableOption "discord";
};
config = mkIf cfg.enable {
modules.unfree.allowedPackages = [ "discord" ];
home.packages = with pkgs; [ discord ];
};
}
-16
View File
@@ -1,16 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.feishin;
in
{
options.modules.feishin.enable = mkEnableOption "feishin";
config = mkIf cfg.enable { home.packages = with pkgs; [ feishin ]; };
}
@@ -1,57 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.fontconfig;
aliasConfig = font: ''
<alias>
<family>${font.name}</family>
<prefer>
<family>${font.name}</family>
${concatStrings (map (font: " <family>${font}</family>\n") font.fallbackFonts)}
</prefer>
</alias>
'';
configContent = concatStrings (
map (font: aliasConfig config.theming.fonts.pkgs.${font}) config.theming.fonts.installed
);
in
{
options.modules.fontconfig = {
enable = mkEnableOption "fontconfig";
};
config = mkIf cfg.enable {
fonts.fontconfig = {
enable = true;
defaultFonts = {
serif = [ config.theming.fonts.serif.name ];
sansSerif = [ config.theming.fonts.sansSerif.name ];
monospace = [ config.theming.fonts.monospace.name ];
emoji = [ config.theming.fonts.emoji.name ];
};
};
home.file.".config/fontconfig/conf.d/20-family-fallbacks.conf" = {
enable = true;
text = ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
${configContent}
</fontconfig>
'';
};
};
}
-55
View File
@@ -1,55 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.rust;
in
{
options.modules.rust = {
enable = mkEnableOption "rust";
};
config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [
rustup
# rustc
# cargo
gcc
lldb
# rust-analyzer
# rustfmt
# clippy
];
# VSCode configuration
programs.vscode = {
extensions = with pkgs.vscode-extensions; [
rust-lang.rust-analyzer
vadimcn.vscode-lldb
tamasfe.even-better-toml
serayuzgur.crates
];
userSettings = {
"[rust]" = {
"editor.inlayHints.enabled" = "off";
};
"rust-analyzer.check.command" = "clippy";
"rust-analyzer.showUnlinkedFileNotification" = false;
};
};
# Neovim configuration
programs.nixvim = {
plugins.rust-tools = {
enable = true;
};
};
};
}
-31
View File
@@ -1,31 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.mako;
theme = config.theming;
colors = theme.colors;
in
{
options.modules.mako.enable = mkEnableOption "mako";
config = mkIf cfg.enable {
services.mako = {
enable = true;
anchor = "top-right";
defaultTimeout = 5000;
backgroundColor = "#${colors.bg}ff";
textColor = "#${colors.fg}ff";
borderColor = "#${colors.fg}ff";
progressColor = "#${colors.accent}ff";
borderRadius = 0;
borderSize = theme.layout.borderSize;
font = "${theme.fonts.monospace.name} ${toString theme.fonts.monospace.recommendedSize}";
};
};
}
-187
View File
@@ -1,187 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.neovim;
theme = config.theming;
colors = theme.colors;
in
{
options.modules.neovim = {
enable = mkEnableOption "neovim";
};
config = mkIf cfg.enable {
programs.nixvim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
extraPackages = with pkgs; [ ];
opts = {
number = true;
relativenumber = true;
signcolumn = "yes";
ignorecase = true;
smartcase = true;
tabstop = 4;
shiftwidth = 4;
softtabstop = 0;
expandtab = true;
smarttab = true;
list = true;
listchars = "tab:»┈«,trail:·,extends:→,precedes:←,nbsp:␣";
};
diagnostics = {
enable = true;
signs = true;
underline = true;
update_in_insert = true;
};
extraConfigLua = ''
vim.fn.sign_define("DiagnosticSignError",
{text = "", texthl = "DiagnosticSignError"})
vim.fn.sign_define("DiagnosticSignWarn",
{text = "", texthl = "DiagnosticSignWarn"})
vim.fn.sign_define("DiagnosticSignInfo",
{text = "", texthl = "DiagnosticSignInfo"})
vim.fn.sign_define("DiagnosticSignHint",
{text = "💡", texthl = "DiagnosticSignHint"})
'';
keymaps = [
# Save shortcut
{
action = ":update<CR>";
key = "<C-s>";
mode = "n";
}
{
action = "<C-o>:update<CR>";
key = "<C-s>";
mode = "i";
}
# Neo tree
{
action = ":Neotree action=focus reveal toggle<CR>";
key = "<leader>n";
mode = "n";
options.silent = true;
}
];
autoCmd = [
{
desc = "Automatic formatting";
event = "BufWritePre";
callback = {
__raw = ''
function()
vim.lsp.buf.format {
async = false,
}
end
'';
};
}
];
highlight = {
Comment = {
italic = true;
fg = theme.schemeColors.withHashtag.base03; # TODO: Come up with a good name colors.muted maybe?
};
};
plugins.lsp = {
enable = true;
};
#plugins.treesitter = {
# enable = true;
#};
plugins.cmp = {
enable = true;
settings = {
mapping = {
"<C-Space>" = "cmp.mapping.complete()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-e>" = "cmp.mapping.close()";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
};
sources = [
{ name = "path"; }
{ name = "nvim_lsp"; }
];
};
};
plugins.neo-tree = {
enable = true;
closeIfLastWindow = true;
window = {
width = 30;
autoExpandWidth = true;
};
extraOptions = {
default_component_configs.git_status.symbols = {
# Change type
added = "+";
deleted = "✕";
modified = "✦";
renamed = "→";
# Status type
untracked = "?";
ignored = "▫";
unstaged = "□";
staged = "■";
conflict = "‼";
};
};
};
#plugins.cmp-nvim-lsp.enable = true;
plugins.gitsigns = {
enable = true;
settings.current_line_blame = true;
};
#plugins.copilot-vim = {
# enable = true;
#};
plugins.vimtex = {
enable = true;
texlivePackage = null;
settings = {
view_method = "zathura";
};
};
};
programs.neovim.defaultEditor = true;
};
}
@@ -1,22 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.obsidian;
in
{
options.modules.obsidian = {
enable = mkEnableOption "obsidian";
};
config = mkIf cfg.enable {
modules.unfree.allowedPackages = [ "obsidian" ];
home.packages = with pkgs; [ obsidian ];
};
}
-62
View File
@@ -1,62 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.rofi;
theme = config.theming;
colors = theme.colors;
in
{
options.modules.rofi.enable = mkEnableOption "rofi";
config = mkIf cfg.enable {
programs.rofi = {
enable = true;
terminal = config.default.terminal;
package = pkgs.rofi-wayland;
font = "${theme.fonts.monospace.name} ${toString theme.fonts.monospace.recommendedSize}";
theme =
let
inherit (config.lib.formats.rasi) mkLiteral;
in
{
"*" = {
background-color = mkLiteral "rgba(0, 0, 0, 0%)";
border-color = mkLiteral "#${colors.fg}";
text-color = mkLiteral "#${colors.fg}";
};
mainbox = {
background-color = mkLiteral "#${colors.bg}";
border = mkLiteral "${toString theme.layout.borderSize}px";
};
element-text = {
highlight = mkLiteral "#${colors.fg-search}";
};
inputbar = {
children = mkLiteral "[textbox-search, entry]";
};
listview = {
padding = mkLiteral "2px 0px";
};
textbox-search = {
expand = false;
content = "> ";
};
"inputbar, message" = {
padding = mkLiteral "2px";
};
element = {
padding = mkLiteral "0px 2px";
};
"element selected" = {
background-color = mkLiteral "#${colors.border-unfocused}";
};
};
};
};
}
-30
View File
@@ -1,30 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.rofi-rbw;
in
{
options.modules.rofi-rbw.enable = mkEnableOption "rofi-rbw";
config = mkIf cfg.enable {
modules.rofi.enable = true;
home.packages = [ pkgs.rofi-rbw ];
# TODO: Move to separate module and make configurable
programs.rbw = {
enable = true;
settings = {
base_url = "https://keys.bulthuis.dev";
email = "jan@bulthuis.dev";
pinentry = pkgs.pinentry;
};
};
};
}
-18
View File
@@ -1,18 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.bash;
in
{
options.modules.bash = {
enable = mkEnableOption "bash";
};
config.programs.bash.enable = cfg.enable;
}
-13
View File
@@ -1,13 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
{
options.modules.steam = {
enable = mkEnableOption "steam";
};
}
@@ -1,10 +0,0 @@
{ ... }:
{
imports = [
# Import systemwide configuration files.
./river.nix
./steam.nix
./waylock.nix
];
}
@@ -1,14 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
enabled = any (user: user.modules.river.enable) (attrValues config.home-manager.users);
in
{
config = mkIf enabled { programs.river.enable = true; };
}
@@ -1,14 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
enabled = any (user: user.modules.steam.enable) (attrValues config.home-manager.users);
in
{
config = mkIf enabled { programs.steam.enable = true; };
}
@@ -1,14 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
enabled = any (user: user.modules.waylock.enable) (attrValues config.home-manager.users);
in
{
config = mkIf enabled { security.pam.services.waylock = { }; };
}
@@ -1,14 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
{
options.default.terminal = mkOption {
type = types.str;
description = "Default terminal application";
};
}
@@ -1,35 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.foot;
in
{
options.modules.foot.enable = mkEnableOption "foot";
config = mkIf cfg.enable {
default.terminal = mkDefault "${pkgs.foot}/bin/foot";
programs.foot = {
enable = true;
settings = {
main =
let
font = config.theming.fonts.monospace.name;
size = toString config.theming.fonts.monospace.recommendedSize;
in
{
font = mkForce "${font}:style=Regular:size=${size}";
font-bold = "${font}:style=Bold:size=${size}";
font-italic = "${font}:style=Italic:size=${size}";
font-bold-italic = "${font}:style=Bold Italic:size=${size}";
};
};
};
};
}
-371
View File
@@ -1,371 +0,0 @@
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.theming;
# Stylix
stylix = pkgs.fetchFromGitHub {
owner = "danth";
repo = "stylix";
rev = "1ff9d37d27377bfe8994c24a8d6c6c1734ffa116";
sha256 = "0dz8h1ga8lnfvvmvsf6iqvnbvxrvx3qxi0y8s8b72066mqgvy8y5";
};
# Font module type
fontModule = types.submodule {
options = {
name = mkOption {
type = types.str;
description = "Font family name.";
};
package = mkOption {
type = types.anything;
description = "Font package";
};
recommendedSize = mkOption {
type = types.nullOr types.int;
default = null;
description = "Recommended size for displaying this font.";
};
fallbackFonts = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Fallback fonts for specified font.";
};
};
};
fontModules = [
# Import all fonts
./fonts/cozette-vector.nix
./fonts/cozette.nix
./fonts/dejavu-sans.nix
./fonts/dejavu-serif.nix
./fonts/dina.nix
./fonts/fira-code.nix
./fonts/nerd-fonts-symbols.nix
./fonts/noto-color-emoji.nix
./fonts/wqy-bitmapsong.nix
./fonts/wqy-microhei-mono.nix
./fonts/wqy-microhei.nix
./fonts/wqy-zenhei-mono.nix
./fonts/wqy-zenhei-sharp.nix
./fonts/wqy-zenhei.nix
];
# Gather enabled fonts.
enabledFonts = [
cfg.fonts.serif.name
cfg.fonts.sansSerif.name
cfg.fonts.monospace.name
cfg.fonts.emoji.name
] ++ map (font: font.name) cfg.fonts.extraFonts;
# Flatten dependencies of fonts
fontPackages =
converge
(
fonts:
listToAttrs (
map
(font: {
name = font;
value = true;
})
(
flatten (map (font: [ font.name ] ++ cfg.fonts.pkgs.${font.name}.fallbackFonts) (attrsToList fonts))
)
)
)
(
listToAttrs (
map (font: {
name = font;
value = true;
}) enabledFonts
)
);
# Convert set of fonts to list of packages
fontNameList = map (font: font.name) (attrsToList fontPackages);
fontPackageList = map (font: cfg.fonts.pkgs.${font}.package) fontNameList;
in
{
imports = [
# Import all themes
./themes/catppuccin.nix
./themes/gruvbox.nix
./themes/oxocarbon.nix
./themes/papercolor.nix
./themes/sakura.nix
];
options.modules.theming.enable = mkEnableOption "theming";
options.theming =
let
colors = config.theming.schemeColors;
in
{
darkMode = mkOption {
type = types.bool;
default = false;
example = true;
description = "Whether the app should use dark mode.";
};
colorScheme = mkOption {
type = types.nullOr types.str;
default = null;
description = "Base 16 color scheme to use for styling. See stylix documentation for more information.";
};
clientSideDecorations = mkOption {
type = types.bool;
default = false;
description = "Whether to enable client side decorations for windows.";
};
schemeColors = mkOption {
type = types.attrsOf types.anything;
default = config.lib.stylix.colors;
description = "Generated colors from scheme";
};
colors = {
bg = mkOption {
type = types.str;
default = colors.base00;
};
fg = mkOption {
type = types.str;
default = colors.base05;
};
bg-status = mkOption {
type = types.str;
default = colors.base01;
};
fg-status = mkOption {
type = types.str;
default = colors.base04;
};
bg-selection = mkOption {
type = types.str;
default = colors.base02;
};
bg-highlight = mkOption {
type = types.str;
default = colors.base03;
};
fg-search = mkOption {
type = types.str;
default = colors.base0A;
};
accent = mkOption {
type = types.str;
default = colors.base0E;
};
border-focused = mkOption {
type = types.str;
default = cfg.colors.fg;
};
border-unfocused = mkOption {
type = types.str;
default = cfg.colors.bg-selection;
};
};
colorsCSS = mkOption {
type = types.lines;
default =
":root {\n"
+ concatStrings (
map (color: " --nix-color-${color.name}: #${color.value};\n") (attrsToList cfg.colors)
)
+ "}\n\n";
description = "Colors as css variables";
};
layout = {
borderRadius = mkOption {
type = types.int;
default = 0;
description = "Border radius of windows.";
};
borderSize = mkOption {
type = types.int;
default = 1;
description = "Size of borders used throughout UI.";
};
windowPadding = mkOption {
type = types.int;
default = 2;
description = "Margin of each window, actual space between windows will be twice this number.";
};
};
fonts = {
pkgs = mkOption {
type = types.attrsOf fontModule;
default = builtins.listToAttrs (
map (module: {
name = module.name;
value = module;
}) (map (module: (import module) { inherit lib config pkgs; }) fontModules)
);
description = "All available font modules.";
};
installed = mkOption {
type = types.listOf types.str;
default = fontNameList;
description = "List of installed fonts.";
};
serif = mkOption {
type = fontModule;
description = "Default serif font";
};
sansSerif = mkOption {
type = fontModule;
description = "Default sansSerif font.";
};
monospace = mkOption {
type = fontModule;
description = "Default monospace font.";
};
emoji = mkOption {
type = fontModule;
description = "Default emoji font.";
};
extraFonts = mkOption {
type = types.listOf fontModule;
default = [ ];
description = "Additional fonts to install.";
};
};
};
config = mkIf config.modules.theming.enable {
# Enable fontconfig
modules.fontconfig.enable = true;
# Install configured fonts
home.packages = fontPackageList;
# Configure gnome theme
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = if cfg.darkMode then "prefer-dark" else "prefer-light";
};
};
# Configure qt theme
qt = {
enable = true;
platformTheme.name = "adwaita";
style.name = if cfg.darkMode then "adwaita-dark" else "adwaita-light";
};
# Configure gtk theme
gtk =
let
disableCSD = ''
headerbar.default-decoration {
margin-bottom: 50px;
margin-top: -100px;
}
window.csd,
window.csd decoration {
box-shadow: none;
}
'';
in
{
enable = true;
theme = {
name = if cfg.darkMode then "Adwaita-dark" else "Adwaita-light";
package = pkgs.gnome-themes-extra;
};
gtk3.extraCss = mkIf (!cfg.clientSideDecorations) disableCSD;
gtk4.extraCss = mkIf (!cfg.clientSideDecorations) disableCSD;
};
# TODO: This should just straight up not be here
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
# TODO: Make cursors configurable using modules.
home.pointerCursor = {
gtk.enable = true;
name = lib.mkForce "BreezeX-RosePine-Linux";
package = lib.mkForce pkgs.rose-pine-cursor;
size = lib.mkForce 24;
x11 = {
defaultCursor = lib.mkForce "BreezeX-RosePine-Linux";
enable = true;
};
};
# Enable stylix
# TODO: Move to own module
stylix = {
enable = true;
autoEnable = false;
targets = {
foot.enable = true;
nixvim.enable = true;
qutebrowser.enable = true;
vscode.enable = true;
zathura.enable = true;
};
base16Scheme = cfg.colorScheme;
polarity = if cfg.darkMode then "dark" else "light";
fonts = {
serif = getAttrs [
"name"
"package"
] cfg.fonts.serif;
sansSerif = getAttrs [
"name"
"package"
] cfg.fonts.sansSerif;
monospace = getAttrs [
"name"
"package"
] cfg.fonts.monospace;
emoji = getAttrs [
"name"
"package"
] cfg.fonts.emoji;
sizes = {
applications = mkDefault cfg.fonts.serif.recommendedSize;
desktop = mkDefault cfg.fonts.monospace.recommendedSize; # TODO: See below
popups = mkDefault cfg.fonts.monospace.recommendedSize; # TODO: Add dedicated UI font
terminal = mkDefault cfg.fonts.monospace.recommendedSize;
};
};
};
};
}
@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
name = "Cozette Vector";
package = pkgs.cozette;
recommendedSize = 9;
fallbackFonts = [ ];
}
@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
name = "Cozette";
package = pkgs.cozette;
recommendedSize = 9;
fallbackFonts = [ "Cozette Vector" ];
}
@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
name = "DejaVu Sans";
package = pkgs.dejavu_fonts;
recommendedSize = 12;
fallbackFonts = [ ];
}
@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
name = "DejaVu Serif";
package = pkgs.dejavu_fonts;
recommendedSize = 12;
fallbackFonts = [ ];
}
Loaded 100 of 136 files, more files were not shown because too many files have changed in this diff. Show more