Compare commits

..
218 Commits
Author SHA1 Message Date
Jan-Bulthuis 9d2e52675e fix: replace nixfmt-rfc-style with nixfmt 2026-05-19 12:38:40 +02:00
Jan-Bulthuis 6c5c69945a fix: use git.settings instead of git.extraConfig 2026-05-19 12:38:26 +02:00
Jan-Bulthuis 9883f3d461 fix: set forceImportRoot to false as recommended 2026-05-19 12:38:07 +02:00
Jan-Bulthuis 6d86bb8368 fix: replace wasistlos with karere 2026-05-19 12:38:07 +02:00
Jan-Bulthuis 0dbc4792d4 chore: update flake 2026-05-19 12:38:07 +02:00
Jan-Bulthuis 753b763b6f fix: use thermald on laptop 2026-05-19 12:38:07 +02:00
Jan-Bulthuis 2a690681cb feat: set up nvidia prime 2026-05-19 12:38:07 +02:00
Jan-Bulthuis 82f4a2e1d4 feat: add caffeine gnome extension 2026-05-19 12:38:07 +02:00
Jan-Bulthuis eb18897355 feat: Configure helix, install software 2026-05-19 12:11:16 +02:00
Jan-Bulthuis 00679a2c04 chore: Update flake 2026-05-19 12:10:43 +02:00
Jan-Bulthuis 8e819e01ea feat: Persist K3s cluster 2026-04-04 12:17:55 +02:00
Jan-Bulthuis cf4c179fc4 chore: Update flake 2026-04-04 12:03:33 +02:00
Jan-Bulthuis c991768cc2 chore: Update 2026-02-07 17:12:07 +01:00
Jan-Bulthuis 268879ee01 fix: Add Downloads folder fix preference for workspaces 2026-02-07 17:02:56 +01:00
Jan-Bulthuis 7e9f617965 chore: Update impermanence 2026-02-07 17:02:17 +01:00
Jan-Bulthuis 7d6482587a feat: Move to Cilium 2026-01-28 15:28:47 +01:00
Jan-Bulthuis cf10e1e963 feat: Declarative K3S node 2025-12-31 02:00:35 +01:00
Jan-Bulthuis 02b2b9cf32 fix: Git settings setup 2025-12-23 12:17:38 +01:00
Jan-Bulthuis dfe6ec5518 feat: Add typst extension 2025-12-23 12:16:46 +01:00
Jan-Bulthuis 517d793c88 fix: Add additional impermanence directories 2025-12-23 12:16:09 +01:00
Jan-Bulthuis 657a65522f feat: Declarative GNOME setup 2025-12-23 12:15:48 +01:00
Jan-Bulthuis 7bc3ab64dd feat: Install some basic fonts 2025-12-23 12:15:17 +01:00
Jan-Bulthuis 2b5cfe0934 feat: Add some GNOME packages 2025-12-23 12:15:05 +01:00
Jan-Bulthuis cf345521e8 feat: Impermanence move to bind mounts for user impermanence 2025-12-23 12:14:46 +01:00
Jan-Bulthuis f43945d0d2 bug: Add very wide initial impermanence setup 2025-12-23 12:13:59 +01:00
Jan-Bulthuis 7874412a48 fix: NetworkManager impermanence 2025-12-23 12:13:28 +01:00
Jan-Bulthuis e33a6e181e chore: Remove Helix package 2025-12-23 12:12:35 +01:00
Jan-Bulthuis 928dc4a240 feat: Add Tinymist VSCode extension 2025-12-23 12:12:22 +01:00
Jan-Bulthuis 63d34640f7 feat: Impermanence and GRD 2025-12-23 12:10:40 +01:00
Jan-Bulthuis 921565fe12 fix: Add fish history to impermanence 2025-12-23 12:08:17 +01:00
Jan-Bulthuis 88792d86db chore: Remove old configuration 2025-12-23 12:00:01 +01:00
Jan-Bulthuis 49b4ade156 chore: Update 2025-12-23 11:59:10 +01:00
Jan-Bulthuis 34f179465d feat: Finished user setup 2025-11-30 16:19:03 +01:00
Jan-Bulthuis 588bea133c feat: Set up disk layout for ws-think 2025-11-30 12:42:41 +01:00
Jan-Bulthuis 61ec61e22e fix: Disable GNOME extension version validation 2025-11-30 12:29:31 +01:00
Jan-Bulthuis 10a3de42ac chore: Install software 2025-11-30 12:29:12 +01:00
Jan-Bulthuis 6f98d674b1 fix: Improve unfree consistency 2025-11-30 12:28:52 +01:00
Jan-Bulthuis 4278ceebc1 feat: Add new laptop configuration 2025-11-30 12:28:39 +01:00
Jan-Bulthuis 3358dd324e fix: Allow unfree consistently 2025-11-30 12:27:59 +01:00
Jan-Bulthuis c3014ec109 chore: Update 2025-11-30 12:27:42 +01:00
Jan-Bulthuis 08ca6a2846 fix: Fix mathematica 2025-11-14 14:32:52 +01:00
Jan-Bulthuis 2fbe36d497 featL Add helix and osc package 2025-11-14 14:32:38 +01:00
Jan-Bulthuis 9929cd297a feat: Helix configuration 2025-11-14 14:32:20 +01:00
Jan-Bulthuis 869a219ab7 feat: Add initial carla project 2025-11-14 14:31:09 +01:00
Jan-Bulthuis af1a275dd8 feat: Add NAT64 VM 2025-11-14 14:23:18 +01:00
Jan-Bulthuis 9d302345ac fix: Remove gtk3 theme 2025-11-14 14:22:50 +01:00
Jan-Bulthuis e0b3fe191c break: Add temporary laptop configuration 2025-11-14 14:22:33 +01:00
Jan-Bulthuis d3681fcd4f feat: Switch from tayga to jool 2025-11-07 22:04:13 +01:00
Jan-Bulthuis 5458f74c83 fix: Set correct subnet for tayga 2025-11-07 21:30:13 +01:00
Jan-Bulthuis 13302deaef chore: Update flake 2025-11-07 21:16:24 +01:00
Jan-Bulthuis 828face9d5 fix: Set tayga IPv6 address 2025-11-07 21:11:35 +01:00
Jan-Bulthuis e4402eaf19 fix: Update tayga address 2025-11-07 20:47:22 +01:00
Jan-Bulthuis 081084648f Add VM for NAT64 2025-11-03 13:45:59 +01:00
Jan-Bulthuis 9d629c4656 Change home-manager to use global packages 2025-11-03 13:45:34 +01:00
Jan-Bulthuis 4a65f64a20 Update nixpkgs 2025-11-03 13:45:14 +01:00
Jan-Bulthuis d3b3e9be1c Updated flake 2025-09-26 08:28:14 +02:00
Jan-Bulthuis 5224a6e4b6 Add carla_osc_bridge package 2025-09-26 08:17:59 +02:00
Jan-Bulthuis dd0778e5f0 Make omada controller logs non-persistent 2025-09-26 08:17:39 +02:00
Jan-Bulthuis 7247fc94ab Update audio vm 2025-09-26 08:17:21 +02:00
Jan-Bulthuis 655803bd1f Add MADD as flake input 2025-09-26 08:16:40 +02:00
Jan-Bulthuis 9992039edb Set up ssh client with GSSAPI auth 2025-07-30 16:06:17 +02:00
Jan-Bulthuis f31c0f92da Installed vlc and go 2025-07-30 16:05:56 +02:00
Jan-Bulthuis 307aac4ae0 Added initial workstation disko config 2025-07-30 16:05:46 +02:00
Jan-Bulthuis 160185ef20 Remove gnome control center from system-wide install 2025-07-30 16:05:27 +02:00
Jan-Bulthuis 42619807bc Enable gnome terminal 2025-07-30 16:04:53 +02:00
Jan-Bulthuis 86c853de20 Added module for go support 2025-07-30 16:03:56 +02:00
Jan-Bulthuis f52e880b4c Opened up firewall 2025-07-23 12:25:40 +02:00
Jan-Bulthuis e157071962 Add omada user and group 2025-07-23 12:15:41 +02:00
Jan-Bulthuis d324c957be Make logs persist 2025-07-23 12:09:30 +02:00
Jan-Bulthuis 1fa6092498 Fixed ulimit argument 2025-07-23 12:06:41 +02:00
Jan-Bulthuis e43a91fe31 Run as root 2025-07-23 12:01:41 +02:00
Jan-Bulthuis f06880d6d7 Added Omada software controller to vm-oddjob 2025-07-23 10:52:23 +02:00
Jan-Bulthuis fa17ce5b03 Switched mc server to fabric 2025-07-13 16:04:16 +02:00
Jan-Bulthuis cf42666c1f Reverted delay 2025-07-05 13:29:25 +02:00
Jan-Bulthuis df49791fb7 Added delay to adcli-join 2025-07-05 13:24:44 +02:00
Jan-Bulthuis cf4a324617 Set up ssh client, temporarily removed network home mount 2025-07-05 13:05:04 +02:00
Jan-Bulthuis 66b2662030 Updated vm-minecraft 2025-07-04 19:55:22 +02:00
Jan-Bulthuis 21045c3dd1 Installed kicad 2025-07-04 19:36:25 +02:00
Jan-Bulthuis 5f68b9b1e6 Updated vm-minecraft 2025-07-04 19:34:30 +02:00
Jan-Bulthuis bb6edfdefd Updated systemd credentials for backup job 2025-06-21 18:03:38 +02:00
Jan-Bulthuis afebac0d46 Updated backup script to unmount shares 2025-06-21 17:48:16 +02:00
Jan-Bulthuis 06eaf13ec0 Limit amount of open file handles for backup job 2025-06-20 00:27:04 +02:00
Jan-Bulthuis 0b5beaf63d Updated VM-Oddjob to generically update multiple shares 2025-06-19 21:36:26 +02:00
Jan-Bulthuis 03604f9352 Updated GNOME config 2025-06-19 21:36:06 +02:00
Jan-Bulthuis 5047f1ab24 Updated secrets 2025-06-19 21:35:51 +02:00
Jan-Bulthuis 22271d33d1 Make homedir for su users 2025-06-11 17:33:55 +02:00
Jan-Bulthuis c8bf78999a Added test VM 2025-06-11 17:21:19 +02:00
Jan-Bulthuis 0d25c1deff Fixed wireguard VPNs 2025-06-11 17:13:53 +02:00
Jan-Bulthuis 3603fe28a7 Removed authorizedKeys integration from sssd 2025-06-11 14:27:16 +02:00
Jan-Bulthuis ce7c940f65 Switched to openssh package with kerberos support 2025-06-11 14:21:57 +02:00
Jan-Bulthuis d8327c3edf Updated SSH to use GSSAPI 2025-06-11 14:13:25 +02:00
Jan-Bulthuis af9f7e0ee0 Updated sssd dyndns config 2025-06-11 13:01:02 +02:00
Jan-Bulthuis 3285b483e2 Created standard local user hm config for VMs 2025-06-11 12:42:06 +02:00
Jan-Bulthuis affa333969 Moved to systemd for initrd, added integration for vmWithDisko 2025-06-11 11:58:54 +02:00
Jan-Bulthuis 3c20190709 Create additional directories 2025-06-10 03:27:46 +02:00
Jan-Bulthuis 0305b8d33a Moved to bind mounts 2025-06-10 03:23:30 +02:00
Jan-Bulthuis 5ade637e57 Included package path 2025-06-10 03:07:57 +02:00
Jan-Bulthuis 029ff0c9a3 Added link creation to activation script 2025-06-10 03:04:44 +02:00
Jan-Bulthuis db4bd8cfd9 Used persistence for mounting network folders 2025-06-10 02:37:26 +02:00
Jan-Bulthuis 41d25d9695 Updated autofs 2025-06-10 02:12:19 +02:00
Jan-Bulthuis 7e2e012f3a Changed autofs map 2025-06-10 01:56:23 +02:00
Jan-Bulthuis 071e904990 Updated autofs setup 2025-06-10 01:27:47 +02:00
Jan-Bulthuis b68ca558d8 Set up autofs 2025-06-10 01:15:50 +02:00
Jan-Bulthuis cf760b8b85 Simplified sude config 2025-06-10 00:07:58 +02:00
Jan-Bulthuis 7d4ee43283 Filter out locally defined users and groups 2025-06-10 00:07:22 +02:00
Jan-Bulthuis 4e08366901 Changed backup ID 2025-06-09 16:39:13 +02:00
Jan-Bulthuis a0ca155f7c Set backup id 2025-06-09 16:34:42 +02:00
Jan-Bulthuis 110aa4215f Added dependency on network for krb5 auth 2025-06-09 16:28:37 +02:00
Jan-Bulthuis 08a161ff0d Set up mount dependencies 2025-06-09 16:18:02 +02:00
Jan-Bulthuis f4472de631 Updated backup script 2025-06-09 16:13:25 +02:00
Jan-Bulthuis 3c154de819 Changed correct script 2025-06-09 16:00:05 +02:00
Jan-Bulthuis 709040c072 exported configuration 2025-06-09 15:55:53 +02:00
Jan-Bulthuis 28193823c8 Added backup cron job 2025-06-09 15:45:14 +02:00
Jan-Bulthuis dd25c9323d Reenabled kinit 2025-06-09 15:15:17 +02:00
Jan-Bulthuis 5796bee499 Removed unneeded dependencies 2025-06-09 15:11:13 +02:00
Jan-Bulthuis 986afe4b32 Added packages 2025-06-09 15:07:54 +02:00
Jan-Bulthuis 537e30a347 Move request-key configuration 2025-06-09 15:00:44 +02:00
Jan-Bulthuis 2fec5ead38 Use kinit from krb5 package 2025-06-09 14:28:54 +02:00
Jan-Bulthuis d4e6283c2f Added service to set up user keytab 2025-06-09 14:23:11 +02:00
Jan-Bulthuis 32e7d99292 Set up request-key.conf 2025-06-09 13:54:31 +02:00
Jan-Bulthuis d9dab5b9d3 Resource bashrc 2025-06-09 13:24:58 +02:00
Jan-Bulthuis cdd94eefb3 Enabled base profile for domain users 2025-06-09 13:06:29 +02:00
Jan-Bulthuis 209dbea02a Disable sanity checks 2025-06-09 13:01:56 +02:00
Jan-Bulthuis c683809a78 Added initial homeConfiguration for domain users 2025-06-09 12:50:30 +02:00
Jan-Bulthuis 739e335c28 Added test loginShellInit 2025-06-09 04:29:25 +02:00
Jan-Bulthuis 3c6758b343 Quick fix 2025-06-09 04:07:18 +02:00
Jan-Bulthuis 799b91a509 Update PAM 2025-06-09 04:05:52 +02:00
Jan-Bulthuis 50ff958d35 Setup strict ssh auth 2025-06-09 03:42:25 +02:00
Jan-Bulthuis ecc2779ce9 Made SSSD strict for login in PAM 2025-06-09 03:28:39 +02:00
Jan-Bulthuis 10dab81fb5 Disable PTR update 2025-06-09 03:09:14 +02:00
Jan-Bulthuis 03e96662cc Set ad_gpo_implicit_deny to true 2025-06-09 02:57:06 +02:00
Jan-Bulthuis d6d54e213e Implement SSH domain integration 2025-06-09 02:36:07 +02:00
Jan-Bulthuis f491be0ace Added sudo domain integration 2025-06-09 02:17:05 +02:00
Jan-Bulthuis fef1eff181 Simplified kerberos config 2025-06-09 01:54:39 +02:00
Jan-Bulthuis e869e5d790 Setup kerberos config 2025-06-09 01:47:48 +02:00
Jan-Bulthuis 48caacd9e5 Enforce GPO access control 2025-06-09 01:34:29 +02:00
Jan-Bulthuis ce4401033a Enabled dyndns 2025-06-08 03:45:33 +02:00
Jan-Bulthuis 8b331ad3ae Added SSSD config 2025-06-08 03:39:12 +02:00
Jan-Bulthuis 417383f89b Updated adcli script 2025-06-08 03:22:10 +02:00
Jan-Bulthuis cc75c95ad4 Moved domain config 2025-06-08 03:04:14 +02:00
Jan-Bulthuis a321251b93 Update secrets 2025-06-08 03:04:00 +02:00
Jan-Bulthuis 54677248af Installed some packages 2025-06-08 00:56:26 +02:00
Jan-Bulthuis d8f18016cd Added krb5 setup 2025-06-08 00:10:13 +02:00
Jan-Bulthuis 6522ebc15e Added krb5 as sec for smb mount 2025-06-07 23:47:20 +02:00
Jan-Bulthuis 10216784e8 Set correct hostname 2025-06-07 23:38:38 +02:00
Jan-Bulthuis f3abb6d2f3 Added samba mount 2025-06-07 23:36:21 +02:00
Jan-Bulthuis 936d654877 Added oddjob VM 2025-06-07 21:15:31 +02:00
Jan-Bulthuis 61d207db04 Installed obsidian 2025-06-07 21:15:14 +02:00
Jan-Bulthuis e7b66cb40c Added kerberos config 2025-06-07 21:14:59 +02:00
Jan-Bulthuis c9b18219af Updated secrets 2025-06-07 21:14:43 +02:00
Jan-Bulthuis d5c4a78fba Updated README.md 2025-06-07 21:14:28 +02:00
Jan-Bulthuis 369d655a38 Autologin to root for access from hypervisor 2025-05-30 16:44:23 +02:00
Jan-Bulthuis eab130b99d Removed swapfile 2025-05-30 16:38:25 +02:00
Jan-Bulthuis 5ce6b9bdf2 Added swap partition 2025-05-30 16:37:48 +02:00
Jan-Bulthuis 5db52a4f84 Removed need for password for local wheel group on VMs 2025-05-30 16:22:09 +02:00
Jan-Bulthuis 3524f6b038 Replaced key 2025-05-30 16:19:12 +02:00
Jan-Bulthuis 0cf53a97cf Restricted SSH access 2025-05-30 16:15:52 +02:00
Jan-Bulthuis 46fe5b8056 Set local password 2025-05-30 16:15:42 +02:00
Jan-Bulthuis ec3d9e6049 Updated modules 2025-05-30 16:08:51 +02:00
Jan-Bulthuis fc0476ca5a Added admin-pub secret 2025-05-30 16:08:39 +02:00
Jan-Bulthuis 4b7c62d00b Gave local passwordless sudo, rerolled and encrypted the authorized key. 2025-05-30 16:05:00 +02:00
Jan-Bulthuis cfc276184f Updated README.md 2025-05-30 15:37:19 +02:00
Jan-Bulthuis 87b50bfb4d Updated secrets 2025-05-30 15:26:05 +02:00
Jan-Bulthuis 1bc34518e1 Added deployment key to root account 2025-05-30 15:11:22 +02:00
Jan-Bulthuis f1dcb8c72b Updated sops-nix to also directly point at /persist 2025-05-30 14:35:59 +02:00
Jan-Bulthuis ec002467fa Updated secrets 2025-05-30 14:03:14 +02:00
Jan-Bulthuis 5a228cb375 Updated update script 2025-05-30 14:03:05 +02:00
Jan-Bulthuis d53e395d42 Added a module for SOPS 2025-05-30 13:56:50 +02:00
Jan-Bulthuis cb39f82a48 Updated flake.lock 2025-05-30 12:42:35 +02:00
Jan-Bulthuis 0efee5bceb Added dependency on nixos-secrets 2025-05-30 12:06:21 +02:00
Jan-Bulthuis 844118055c Updated README.md 2025-05-29 21:00:40 +02:00
Jan-Bulthuis 0ba9de0030 Set disk device for vm disko 2025-05-29 20:46:44 +02:00
Jan-Bulthuis a745b35c84 Added update script 2025-05-29 20:37:12 +02:00
Jan-Bulthuis 6c74dcbc22 Automatically login to user 2025-05-29 20:32:19 +02:00
Jan-Bulthuis 76e609372f Added persistence to ssh host keys 2025-05-29 20:28:07 +02:00
Jan-Bulthuis cd91944b1e Updated local user configuration 2025-05-29 20:20:18 +02:00
Jan-Bulthuis bebd2748d1 Moved bitwarden to a module 2025-05-29 19:23:52 +02:00
Jan 12a4ba0482 Merge pull request 'Add disko support' (#2) from disko into main
Reviewed-on: Jan/dotfiles#2
2025-05-29 16:33:31 +00:00
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
195 changed files with 3085 additions and 9385 deletions

No files matched your search

+37 -2
View File
@@ -2,6 +2,41 @@
My NixOS configuration. My NixOS configuration.
## Usage ## Installation
Clone the repository to some directory. And build with `sudo nixos-rebuild switch --flake /directory/containing/flake.nix/`. For disk configuration we use disko, but for secrets management we use sops-nix and the particular setup makes the installation process a bit more involved. It is required that the computer from which the installation is being run has access to the `nixos-secrets` repository, otherwise you will need to manually add the required ssh keys to the installation image.
```bash
# Load into the installer
sudo passwd # Set a root password
# From a machine with network access to the installer
# and access to the nixos-secrets repo
ssh -A root@(installer-ip)
# Set up disks
nix-shell -p disko
disko --mode disko --flake git+https://git.bulthuis.dev/Jan/nixos-config#(system)
exit
# Install NixOS
nixos-install --no-channel-copy --no-root-password --flake git+https://git.bulthuis.dev/Jan/nixos-config#(system)
# Set up host credentials for access to the secrets
cd /mnt/persist/system/etc/sops
touch sops_ed25519_key
chmod 600 sops_ed25519_key
nano sops_ed25519_key
```
If `nixos-install` is being stopped by the OOM-killer, you can try adding `-j 1` to limit the amount of jobs that will be executed at the same time to 1. It might require running nixos-install multiple times untill it has managed to download all requirements and slowly start building the rest of the system.
## Updating
To update the system configuration, it is a single command:
```bash
sudo system-update
```
Or if this shell script has not been installed for some reason:
```bash
sudo nixos-rebuild switch --flake git+https://git.bulthuis.dev/Jan/nixos-config
```
Sometimes it may be necessary to reboot of course.
Generated
+136 -16
View File
@@ -1,15 +1,24 @@
{ {
"nodes": { "nodes": {
"glue": { "disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"path": "./glue", "lastModified": 1779135526,
"type": "path" "narHash": "sha256-glCununz6lmaK5fs2X946HA3EkNxB2JagdAAvInuRYU=",
"owner": "nix-community",
"repo": "disko",
"rev": "d405a179887d52b24c0ddd31e09a150bd1f66779",
"type": "github"
}, },
"original": { "original": {
"path": "./glue", "owner": "nix-community",
"type": "path" "repo": "disko",
}, "type": "github"
"parent": [] }
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
@@ -18,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1746981801, "lastModified": 1779157263,
"narHash": "sha256-+Bfr0KqZV6gZdA7e2kupeoawozaLIHLuiPtC54uxbFc=", "narHash": "sha256-VbiyZkRf8/qr7ObmlyfOHJsNAW5tyZ4MB1+cUwAwdrw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ff915842e4a2e63c4c8c5c08c6870b9d5b3c3ee9", "rev": "866412a19866b4a8e32d2306a118040afa2b840c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -31,27 +40,138 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": [
"impermanence",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768598210,
"narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c47b2cc64a629f8e075de52e4742de688f930dc6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1769548169,
"narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "7b1d382faf603b6d264f58627330f9faa5cba149",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1746576598, "lastModified": 1768564909,
"narHash": "sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0=", "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b3582c75c7f21ce0b429898980eddbbf05c68e55", "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixpkgs-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1778869304,
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"glue": "glue", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs" "impermanence": "impermanence",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"secrets": "secrets",
"sops-nix": "sops-nix"
}
},
"secrets": {
"locked": {
"lastModified": 1766822527,
"narHash": "sha256-0qNxAxr7LQ8C6MjSxV2FkMSfdVmOVRq7Yz/wCea8plo=",
"ref": "refs/heads/main",
"rev": "695e36891b5de248993845e1435df5e4116a26f2",
"revCount": 21,
"type": "git",
"url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets"
},
"original": {
"type": "git",
"url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1777944972,
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
} }
} }
}, },
+29 -3
View File
@@ -2,11 +2,37 @@
description = "System configuration for NixOS"; description = "System configuration for NixOS";
inputs = { inputs = {
glue.url = "./glue"; # General inputs
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Secrets
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
secrets.url = "git+ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets";
# Disk setup
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence";
# MADD
# madd.url = "git+https://git.bulthuis.dev/Jan/madd";
# madd.inputs.nixpkgs.follows = "nixpkgs";
# 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: inputs.glue { inherit inputs; }; outputs =
inputs:
import ./glue {
inherit inputs;
excludeHomeManagerModules = [ "impermanence" ];
};
} }
+199
View File
@@ -0,0 +1,199 @@
{
inputs,
excludeHomeManagerModules ? [ ],
}:
let
flake = inputs.self;
nixpkgs = inputs.nixpkgs;
lib = nixpkgs.lib;
nixpkgs-config = {
allowUnfree = true;
};
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;
config = nixpkgs-config;
}
);
stable-pkgs = (
import inputs.nixpkgs-stable {
inherit system;
config = nixpkgs-config;
}
);
});
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 (
lib.attrsets.filterAttrs (name: entry: !(lib.elem name excludeHomeManagerModules)) 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;
};
nixpkgsModule =
{ ... }:
{
nixpkgs.config = nixpkgs-config;
};
nixosConfigurations = importDir "${flake}/hosts" (
attrs:
lib.mapAttrs (
name: entry:
let
pkgs-stable = systemArgs."x86_64-linux".stable-pkgs;
in
lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-stable;
};
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.extraSpecialArgs = {
inherit inputs pkgs-stable;
};
home-manager.sharedModules = homeModules ++ homeProfiles ++ inputHomeModules;
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users = homesConfiguration;
users.users = usersConfiguration;
users.groups = groupsConfiguration;
};
in
[
systemPath
overlayModule
usersModule
nixpkgsModule
]
++ nixosModules
++ nixosProfiles
++ inputNixosModules;
}
) (lib.attrsets.filterAttrs (name: entry: entry.type == "directory") attrs)
);
in
{
inherit packages nixosConfigurations overlay;
overlays.default = overlay;
}
-14
View File
@@ -1,14 +0,0 @@
{
description = "Some glue";
inputs = { };
outputs =
inputs:
let
glue = import ./lib { inherit inputs; };
in
{
__functor = _: glue;
};
}
-167
View File
@@ -1,167 +0,0 @@
{ ... }:
let
mkGlue =
{
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);
systems = [
"x86_64-linux"
"aarch64-linux"
];
eachSystem = fn: lib.genAttrs systems 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";
homeModules = collectModules "${flake}/modules/home";
overlayModule =
{ ... }:
{
nixpkgs.overlays = [ overlay ];
};
homeManager = inputs.home-manager.nixosModules.home-manager;
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;
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
homeManager
]
++ nixosModules;
}
) (lib.attrsets.filterAttrs (name: entry: entry.type == "directory") attrs)
);
in
{
inherit packages nixosConfigurations;
overlays.default = overlay;
};
in
mkGlue
-20
View File
@@ -1,20 +0,0 @@
{ flake, ... }:
{
# State version
system.stateVersion = "24.05";
# Machine hostname
networking.hostName = "20212060";
# Admin users
users.users.jan.extraGroups = [ "wheel" ];
modules = {
profiles.laptop.enable = true;
};
imports = [
./hardware-configuration.nix
];
}
-43
View File
@@ -1,43 +0,0 @@
{ ... }:
{
# 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;
}
];
}
-99
View File
@@ -1,99 +0,0 @@
{
pkgs,
...
}:
{
home.stateVersion = "24.11";
home.packages = with pkgs; [
libreoffice-still
remmina
thunderbird
signal-desktop
prusa-slicer
freecad-wayland
inkscape
ente-auth
bitwarden
carla
baobab
gnome-calculator
nautilus
winbox
whatsapp-for-linux
discord
steam
spotify
# feishin # TODO: Fix or replace as insecure
eduvpn-client
river # TODO: Move
firefox # TODO: Move to dediated module
ryubing
];
modules = {
# Desktop environment
desktop.gnome.enable = true;
# desktop.tiling.enable = true;
# Browser
# firefox = {
# enable = true;
# default = false;
# };
# qutebrowser = {
# enable = true;
# default = true;
# };
# Gaming
# retroarch.enable = true;
# ryujinx.enable = true;
# Tools
git = {
enable = true;
user = "Jan-Bulthuis";
email = "git@bulthuis.dev";
# TODO: Move
ignores = [
".envrc"
".direnv"
"flake.nix"
"flake.lock"
];
};
# btop.enable = true;
direnv.enable = true;
fish.enable = true;
# bluetuith.enable = false;
# obsidian.enable = true;
# zathura.enable = true;
# keyring.enable = true;
# scripts.enable = true;
xpra = {
enable = true;
hosts = [
"mixer@10.20.60.251"
];
};
# Development
# neovim.enable = true;
vscode.enable = true;
# docker.enable = true;
# matlab.enable = true;
# mathematica.enable = true;
# Languages
haskell.enable = false;
js.enable = false;
nix.enable = true;
rust.enable = true;
python.enable = true;
cpp.enable = true;
tex.enable = true;
jupyter.enable = false;
};
}
-17
View File
@@ -1,17 +0,0 @@
{
pkgs,
...
}:
{
home.stateVersion = "24.11";
home.packages = with pkgs; [
];
modules = {
# Desktop environment
# desktop.gnome.enable = true;
# desktop.tiling.enable = true;
};
}
Binary file not shown.
+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 Personal"
];
};
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";
};
}
];
};
}
+39
View File
@@ -0,0 +1,39 @@
{
inputs,
...
}:
{
# State version
system.stateVersion = "25.05";
# Machine hostname
networking.hostName = "vm-infra";
# Enabled modules
modules = {
profiles.vm.enable = true;
};
# Setup JOOL NAT64
networking.jool = {
enable = true;
nat64.default = {
global.pool6 = "64:ff9b::/96";
pool4 = [
{
protocol = "TCP";
prefix = "10.64.0.1/32";
}
{
protocol = "UDP";
prefix = "10.64.0.1/32";
}
{
protocol = "ICMP";
prefix = "10.64.0.1/32";
}
];
};
};
}
+254
View File
@@ -0,0 +1,254 @@
{
inputs,
pkgs,
config,
...
}:
{
# State version
system.stateVersion = "25.05";
# Machine hostname
networking.hostName = "vm-k1s";
# Enabled modules
modules = {
profiles.vm.enable = true;
};
# Read in secrets
sops.secrets."flux/git-ssh-key" = {
sopsFile = "${inputs.secrets}/secrets/k3s-cluster.enc.yaml";
};
sops.secrets."flux/sops-decrypt-key" = {
sopsFile = "${inputs.secrets}/secrets/k3s-cluster.enc.yaml";
};
# Include NFS client module
boot.supportedFilesystems = [ "nfs" ];
# Set up K3S cluster with CoreDNS, FluxCD and Cilium
services.k3s = {
enable = true;
extraFlags = [
"--cluster-domain ${inputs.secrets.lab.k3s.clusterDomain}"
"--flannel-backend=none"
"--disable-network-policy"
"--disable-kube-proxy"
];
disable = [
# "coredns" # CoreDNS is required for Flux to be able to bootstrap the cluster (Flux needs to resolve the git repo)
"servicelb"
"traefik"
"local-storage"
"metrics-server"
"runtimes"
];
manifests = {
git-ssh-key = {
source = config.sops.secrets."flux/git-ssh-key".path;
};
sops-decrypt-key = {
source = config.sops.secrets."flux/sops-decrypt-key".path;
};
# TODO: Move to flux config, once it is possible to easily install flux without CNI
gateway-api =
let
manifest = pkgs.fetchurl {
url = "https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.1/experimental-install.yaml";
hash = "sha256-VTMn4P8yoaK+RGv5OCPIQTz5JTrGptVAfuvR6NJp9p4=";
};
in
{
source = manifest;
};
# TODO: Move to flux config, once it is possible to easily install flux without CNI
netpol-system-allow-egress.content = {
apiVersion = "cilium.io/v2";
kind = "CiliumClusterwideNetworkPolicy";
metadata.name = "allow-system-egress";
spec = {
description = "Allow all egress to system services.";
endpointSelector = {
matchExpressions = [
{
key = "io.kubernetes.pod.namespace";
operator = "NotIn";
values = [
"bogus-namespace"
# "kube-system"
# "cilium-system"
# "flux-system"
];
}
];
};
egress = [
{
toEntities = [
"all"
];
}
];
ingress = [
{
fromEntities = [
"all"
];
}
];
};
};
netpol-cluster-allow-dns.content = {
apiVersion = "cilium.io/v2";
kind = "CiliumClusterwideNetworkPolicy";
metadata.name = "allow-dns";
spec = {
description = "Allow DNS";
endpointSelector = { };
egress = [
{
toEndpoints = [
{
matchLabels = {
"io.kubernetes.pod.namespace" = "kube-system";
"k8s-app" = "kube-dns";
};
}
];
toPorts = [
{
ports = [
{
port = 53;
protocol = "ANY";
}
];
rules.dns = [
{
matchPattern = "*";
}
];
}
];
}
];
};
};
netpol-flux-allow-egress.content = { };
};
autoDeployCharts = {
# TODO: Move to flux config, once it is possible to easily install flux without CNI
cilium = {
name = "cilium";
repo = "oci://quay.io/cilium/charts/cilium";
version = "1.18.8";
hash = "sha256-z1aDpWttEfQ+Af/l0Lxdafasm75QysRc8h7sPhWXr94=";
createNamespace = true;
targetNamespace = "cilium-system";
values = {
operator.replicas = 1;
kubeProxyReplacement = true;
ipam.operator.clusterPoolIPv4PodCIDRList = [ "10.42.0.0/16" ];
cluster = {
id = 1;
name = "vm-k1s";
};
k8sServiceHost = "10.10.50.60";
k8sServicePort = 6443;
policyEnforcementMode = "always";
gatewayAPI = {
enabled = true;
gatewayClass.create = "true";
enableAlpn = true;
};
bgpControlPlane.enabled = true;
tls.secretsNamespace.create = false;
hubble = {
relay.enabled = true;
ui.enabled = true;
peerService.clusterDomain = inputs.secrets.lab.k3s.clusterDomain;
};
};
extraFieldDefinitions = {
spec.bootstrap = true;
};
};
flux-operator = {
name = "flux-operator";
repo = "oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator";
version = "0.38.1";
hash = "sha256-nb0mzEWC3IwjPenQ4LSWBN0NNJc2cc68RB+G60xBOEM=";
createNamespace = true;
targetNamespace = "flux-system";
extraDeploy = [
{
apiVersion = "fluxcd.controlplane.io/v1";
kind = "FluxInstance";
metadata = {
name = "flux";
namespace = "flux-system";
annotations = {
"fluxcd.controlplane.io/reconcile" = "enabled";
"fluxcd.controlplane.io/reconcileEvery" = "1h";
"fluxcd.controlplane.io/reconcileTimeout" = "5m";
};
};
spec = {
distribution = {
version = "2.x";
registry = "ghcr.io/fluxcd";
};
components = [
"source-controller"
"kustomize-controller"
"helm-controller"
"notification-controller"
];
cluster = {
type = "kubernetes";
size = "small";
multitenant = false;
networkPolicy = true;
domain = inputs.secrets.lab.k3s.clusterDomain;
};
commonMetadata.labels = {
"app.kubernetes.io/name" = "flux";
};
sync = (
{
pullSecret = "git-ssh-key";
}
// inputs.secrets.lab.k3s.fluxRepo
);
};
}
];
};
};
};
modules.impermanence.directories = [
"/var/lib/rancher/k3s"
];
environment.variables = {
KUBECONFIG = "/etc/rancher/k3s/k3s.yaml";
CILIUM_NAMESPACE = "cilium-system";
};
environment.systemPackages = with pkgs; [
fluxcd
k9s
cilium-cli
hubble
];
# Use correct disko profile
modules.disko.profile = "k3s";
# TEMP: Disable firewall for now
networking.firewall.enable = false;
security.sudo.wheelNeedsPassword = false;
}
+58
View File
@@ -0,0 +1,58 @@
{
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" ];
modules.impermanence.directories = [
"/srv/minecraft"
];
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true;
servers = {
vanilla = {
enable = true;
autoStart = true;
serverProperties = {
white-list = true;
difficulty = "normal";
max-players = 5;
};
package = inputs.nix-minecraft.legacyPackages.${pkgs.system}.fabricServers.fabric-1_21_7;
};
modpack = {
enable = false;
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";
};
};
};
}
+143
View File
@@ -0,0 +1,143 @@
{
inputs,
lib,
pkgs,
config,
...
}:
{
# State version
system.stateVersion = "24.11";
# Machine hostname
networking.hostName = "vm-oddjob";
# Enabled modules
modules = {
profiles.vm.enable = true;
};
# Omada Software Controller
users.users.omada = {
isSystemUser = true;
group = "omada";
};
users.groups.omada = { };
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
virtualisation.oci-containers = {
backend = "podman";
containers = {
omada-controller = {
volumes = [
"/var/lib/omada:/opt/tplink/EAPController/data"
];
environment = {
TZ = "Europe/Amsterdam";
};
extraOptions = [
"--network=host"
"--ulimit"
"nofile=4096:8192"
];
image = "mbentley/omada-controller:5.15";
};
};
};
modules.impermanence.directories = [
"/var/lib/omada"
];
networking.firewall = {
allowedTCPPorts = [
8088
8043
8843
];
allowedTCPPortRanges = [
{
from = 29811;
to = 29816;
}
];
allowedUDPPorts = [
19810
27001
29810
];
};
# Setup NAS backups
environment.systemPackages = with pkgs; [
keyutils
];
environment.etc."request-key.d/cifs.spnego.conf".text = ''
create cifs.spnego * * ${pkgs.cifs-utils}/bin/cifs.upcall -t %k
'';
environment.etc."request-key.d/cifs.idmap.conf".text = ''
create cifs.idmap * * ${pkgs.cifs-utils}/bin/cifs.idmap %k
'';
sops.secrets."smb-credentials" = {
sopsFile = "${inputs.secrets}/secrets/vm-oddjob.enc.yaml";
};
sops.secrets."backup-script-env" = {
sopsFile = "${inputs.secrets}/secrets/vm-oddjob.enc.yaml";
};
services.cron = {
enable = true;
systemCronJobs =
let
script = pkgs.writeShellScript "backup-script" (
lib.concatStrings (
[
''
. ${config.sops.secrets."backup-script-env".path}
export PBS_REPOSITORY=$PBS_REPOSITORY
export PBS_NAMESPACE=$PBS_NAMESPACE
export PBS_PASSWORD=$PBS_PASSWORD
export PBS_FINGERPRINT=$PBS_FINGERPRINT
''
]
++ lib.map (share: ''
systemctl start mnt-${share}.mount
${pkgs.util-linux}/bin/prlimit --nofile=1024:1024 ${pkgs.proxmox-backup-client}/bin/proxmox-backup-client backup nfs.pxar:/mnt/${share} --ns $PBS_NAMESPACE --backup-id share-${share} --change-detection-mode=metadata --exclude "#recycle"
systemctl stop mnt-${share}.mount
'') inputs.secrets.lab.nas.backupShares
)
);
in
[
"0 0 * * * root ${script}"
];
};
# Mount filesystems
systemd.services.krb5-mnt-credentials = {
description = "Set up Kerberos credentials for mounting shares";
before = map (share: "mnt-${share}.mount") inputs.secrets.lab.nas.backupShares;
requiredBy = map (share: "mnt-${share}.mount") inputs.secrets.lab.nas.backupShares;
after = [ "network-online.target" ];
requires = [ "network-online.target" ];
serviceConfig.Type = "oneshot";
script = ''
. ${config.sops.secrets."smb-credentials".path}
echo $password | ${pkgs.krb5}/bin/kinit $username
'';
};
fileSystems = lib.listToAttrs (
lib.map (share: {
name = "/mnt/${share}";
value = {
device = "//${inputs.secrets.lab.nas.host}/${share}";
fsType = "cifs";
options = [
"noauto"
"sec=krb5,credentials=${config.sops.secrets."smb-credentials".path}"
];
};
}) inputs.secrets.lab.nas.backupShares
);
}
+19
View File
@@ -0,0 +1,19 @@
{
lib,
pkgs,
config,
...
}:
{
# State version
system.stateVersion = "24.11";
# Machine hostname
networking.hostName = "vm-test";
# Enabled modules
modules = {
profiles.vm.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 ];
};
}
+176
View File
@@ -0,0 +1,176 @@
{
inputs,
pkgs,
config,
...
}:
{
# State version
system.stateVersion = "24.05";
# Machine hostname
networking.hostName = "ws-think";
# Set up users
sops.secrets."passwords/jan-hashed" = {
sopsFile = "${inputs.secrets}/secrets/ws-think.enc.yaml";
neededForUsers = true;
};
users.mutableUsers = false;
users.users.Jan = {
hashedPasswordFile = config.sops.secrets."passwords/jan-hashed".path;
# Extra admin groups
# TODO: Streamline setup of this
extraGroups = [
"wheel"
"wireshark"
"podman"
"libvirtd"
];
};
# Set up impermanence
modules.impermanence = {
enable = true;
resetScript = ''
# Revert to the blank state for the root directory
zfs rollback -r tank/root@blank
'';
};
# Set up kerberos
security.krb5 = {
enable = true;
settings = {
libdefaults = {
rdns = false;
};
realms = (inputs.secrets.gewis.krb5Realm);
};
};
services.netbird = {
enable = true;
};
# SSH X11 forwarding
programs.ssh.forwardX11 = true;
# Enable older samba versions
services.samba = {
enable = true;
settings = {
global = {
"invalid users" = [ "root" ];
"passwd program" = "/run/wrappers/bin/passwd %u";
"security" = "user";
"client min protocol" = "NT1";
};
};
};
# TODO: Remove once laptop is properly integrated into domain
programs.ssh = {
package = pkgs.openssh_gssapi;
extraConfig = ''
GSSAPIAuthentication yes
'';
};
# Enable virtualisation for VMs
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
# Enable wireshark
programs.wireshark = {
enable = true;
dumpcap.enable = true;
usbmon.enable = true;
};
# Enable Nix-LD
programs.nix-ld = {
enable = true;
};
# Set up wstunnel client
services.wstunnel = {
enable = true;
clients.wg-tunnel = {
connectTo = "wss://tunnel.bulthuis.dev:443";
settings.local-to-remote = [
"udp://51819:10.10.40.100:51820"
];
};
};
# Enable flatpak
services.flatpak.enable = true;
# Module setup
modules = {
profiles.laptop.enable = true;
};
# Set up podman
virtualisation.podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
autoPrune.enable = true;
};
# Enable Gnome Remote Desktop
services.gnome.gnome-remote-desktop.enable = true;
systemd.services."gnome-remote-desktop".wantedBy = [ "graphical.target" ];
systemd.services."gnome-remote-desktop".preStart =
let
credDir = "/var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop";
credPath = "${credDir}/credentials.ini";
credFile = pkgs.writeText "gnome-remote-desktop-credentials" ''
[RDP]
credentials={'username': <'remote'>, 'password': <'remote'>}
'';
script = pkgs.writeScript "gnome-remote-desktop-setup" ''
mkdir -p ${credDir}
touch ${credPath}
chown gnome-remote-desktop:gnome-remote-desktop ${credPath}
chmod 600 ${credPath}
cat ${credFile} > ${credPath}
'';
in
"${script}";
environment.etc."gnome-remote-desktop/grd.conf" = {
text = ''
[RDP]
port=3389
tls-key=/run/secrets/gnome-remote-desktop/tls-key
tls-cert=/run/secrets/gnome-remote-desktop/tls-crt
enabled=true
'';
};
networking.firewall = {
allowedTCPPorts = [
3389
3390
];
allowedUDPPorts = [
3389
3390
];
};
sops.secrets."gnome-remote-desktop/tls-key" = {
sopsFile = "${inputs.secrets}/secrets/ws-think.enc.yaml";
owner = config.users.users.gnome-remote-desktop.name;
group = config.users.users.gnome-remote-desktop.group;
};
sops.secrets."gnome-remote-desktop/tls-crt" = {
sopsFile = "${inputs.secrets}/secrets/ws-think.enc.yaml";
owner = config.users.users.gnome-remote-desktop.name;
group = config.users.users.gnome-remote-desktop.group;
};
# Set up hardware
imports = [ ./hardware-configuration.nix ];
}
+65
View File
@@ -0,0 +1,65 @@
{ ... }:
{
# Machine platform
nixpkgs.hostPlatform = "x86_64-linux";
# Set hostid (required for ZFS)
networking.hostId = "deadbeef";
# Use thermald
services.thermald.ignoreCpuidCheck = true;
# 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 = [ ];
boot.zfs.forceImportRoot = false;
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
fileSystems = {
"/" = {
device = "tank/root";
fsType = "zfs";
options = [ "zfsutil" ];
};
"/nix" = {
device = "tank/nix";
fsType = "zfs";
options = [ "zfsutil" ];
};
"/persist" = {
device = "tank/persist";
fsType = "zfs";
options = [ "zfsutil" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/46BF-DE2C";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
};
# Swap setup
swapDevices = [
{
device = "/dev/disk/by-uuid/9f6f2a47-e53a-45a0-8cb2-8c1082f54ccb";
discardPolicy = "both";
}
];
}
+52
View File
@@ -0,0 +1,52 @@
{
pkgs,
...
}:
{
home.stateVersion = "25.11";
modules.profiles.jan.enable = true;
# home.packages = with pkgs; [
# opencloud-desktop
# code-nautilus
# nautilus-open-in-blackbox
# ];
xdg.desktopEntries = {
canvas = {
name = "Canvas";
type = "Application";
exec = "${pkgs.chromium}/bin/chromium --app=\"https://canvas.tue.nl\" --user-data-dir=/home/jan/.local/state/Canvas";
settings.StartupWMClass = "chrome-canvas.tue.nl__-Default";
};
overleaf = {
name = "Overleaf";
type = "Application";
exec = "${pkgs.chromium}/bin/chromium --app=\"https://www.overleaf.com\" --user-data-dir=/home/jan/.local/state/Overleaf";
settings.StartupWMClass = "chrome-www.overleaf.com__-Default";
};
};
# TODO: Slowly remove
modules.impermanence = {
directories = [
".cache"
".config"
".cargo"
".dbus"
".gnupg"
".local"
".MathWorks"
".mozilla"
".ssh"
".steam"
".SteamCloud"
".thunderbird"
".vscode"
".wine"
".Wolfram"
];
};
}
+101
View File
@@ -0,0 +1,101 @@
{
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 (declaratively) with dconf
home.pointerCursor = {
enable = true;
name = "capitaine-cursors";
size = 24;
package = pkgs.capitaine-cursors;
gtk.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
gnome-calendar
gnome-backgrounds
gnome-bluetooth
gnome-color-manager
epiphany
# For theming gtk3
# adw-gtk3 # TODO: Do this better, same for morewaita, not sure if it even works
# More icons
# morewaita-icon-theme
]
++ (with pkgs.gnomeExtensions; [
gsconnect
disable-workspace-animation
wallpaper-slideshow
media-progress
mpris-label
pip-on-top
rounded-window-corners-reborn
caffeine
]);
# Set up gnome terminal as changing the default terminal is a pain
programs.gnome-terminal = {
enable = true;
profile."12d2da79-b36c-43d5-8e1f-cf70907b84b3" = {
visibleName = "Default";
default = true;
};
};
# 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";
# };
};
}
-32
View File
@@ -1,32 +0,0 @@
{
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.packages =
with pkgs;
[
gnome-control-center
gnome-tweaks
blackbox-terminal
]
++ (with pkgs.gnomeExtensions; [
gsconnect
disable-workspace-animation
]);
};
}
-20
View File
@@ -1,20 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.desktop.tiling;
in
{
options.modules.desktop.tiling = {
enable = mkEnableOption "tiling desktop";
};
config = mkIf cfg.enable {
};
}
+4 -4
View File
@@ -39,15 +39,15 @@ in
programs.git = { programs.git = {
enable = true; enable = true;
extraConfig = { settings = {
pull = { pull = {
rebase = false; rebase = false;
}; };
}; };
userName = cfg.user; settings.user.name = cfg.user;
userEmail = cfg.email; settings.user.email = cfg.email;
ignores = cfg.ignores; # ignores = cfg.ignores;
}; };
}; };
} }
@@ -7,29 +7,24 @@
with lib; with lib;
let let
cfg = config.modules.docker; cfg = config.modules.go;
in in
{ {
options.modules.docker = { options.modules.go = {
enable = mkEnableOption "docker"; enable = mkEnableOption "go";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Development packages # Development packages
home.packages = with pkgs; [ home.packages = with pkgs; [
docker
docker-compose
];
# Allow unfree
modules.unfree.allowedPackages = [
]; ];
# VSCode configuration # VSCode configuration
programs.vscode = { programs.vscode = {
profiles.default = { profiles.default = {
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
ms-azuretools.vscode-docker golang.go
]; ];
userSettings = { userSettings = {
@@ -38,6 +33,10 @@ in
}; };
# Neovim configuration # Neovim configuration
programs.nixvim = { }; # programs.nixvim = {
# plugins.rustaceanvim = {
# enable = true;
# };
# };
}; };
} }
+1 -1
View File
@@ -18,7 +18,7 @@ in
# Development packages # Development packages
home.packages = with pkgs; [ home.packages = with pkgs; [
nix-tree nix-tree
nixfmt-rfc-style nixfmt
nixd nixd
]; ];
+4 -2
View File
@@ -9,10 +9,11 @@ with lib;
let let
cfg = config.modules.mathematica; cfg = config.modules.mathematica;
my-mathematica = pkgs.mathematica.override { my-mathematica = pkgs.mathematica.overrideAttrs (old: {
force-rebuild = "1";
# TODO: Just use a generic name for the installer? # TODO: Just use a generic name for the installer?
# source = ./Wolfram_14.2.1_LIN_Bndl.sh; # source = ./Wolfram_14.2.1_LIN_Bndl.sh;
}; });
in in
{ {
options.modules.mathematica = { options.modules.mathematica = {
@@ -21,6 +22,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ home.packages = [
# pkgs.mathematica-cuda
my-mathematica my-mathematica
]; ];
}; };
+4
View File
@@ -43,6 +43,7 @@ in
tomoki1207.pdf tomoki1207.pdf
ms-vsliveshare.vsliveshare ms-vsliveshare.vsliveshare
ms-vscode-remote.remote-ssh ms-vscode-remote.remote-ssh
myriad-dreamin.tinymist
]; ];
userSettings = userSettings =
@@ -84,6 +85,9 @@ in
# Disable update notifications # Disable update notifications
"update.mode" = "none"; "update.mode" = "none";
# Set themes
"window.autoDetectColorScheme" = true;
# TODO: Move to direnv module # TODO: Move to direnv module
# Ignore direnv folder # Ignore direnv folder
"files.exclude" = { "files.exclude" = {
@@ -7,16 +7,16 @@
with lib; with lib;
let let
cfg = config.modules.pcsx2; cfg = config.modules.bitwarden;
in in
{ {
options.modules.pcsx2 = { options.modules.bitwarden = {
enable = mkEnableOption "pcsx2"; enable = mkEnableOption "Bitwarden";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
pcsx2 bitwarden-desktop
]; ];
}; };
} }
+3
View File
@@ -53,5 +53,8 @@ in
fzf fzf
grc grc
]; ];
# Impermanence
modules.impermanence.files = [ ".local/share/fish/fish_history" ];
}; };
} }
+34
View File
@@ -0,0 +1,34 @@
{ 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" = {
enable = true;
hideMounts = true;
directories = cfg.directories;
files = cfg.files;
};
};
}
+43
View File
@@ -0,0 +1,43 @@
{
inputs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.secrets;
secrets = inputs.secrets;
in
{
options.modules.secrets = {
enable = mkEnableOption "secrets";
defaultFile = mkOption {
type = types.str;
default = "${secrets}/secrets/common.enc.yaml";
description = ''
The default file to use for SOPS.
'';
};
secrets = mkOption {
type = types.attrs;
default = { };
description = ''
All secrets that should be made available.
'';
};
};
config = mkIf cfg.enable {
# Set up SOPS
# TODO: Fix the key not being present in .config/sops before sops-nix runs
sops.defaultSopsFile = cfg.defaultFile;
sops.age.sshKeyPaths = [
"${config.home.homeDirectory}/.config/sops/sops_ed25519_key"
# "/persist/home/${config.home.username}/.config/sops/sops_ed25519_key"
];
sops.secrets = cfg.secrets;
modules.impermanence.directories = [ ".config/sops" ];
};
}
+3
View File
@@ -16,5 +16,8 @@ in
systemd-boot.editor = false; systemd-boot.editor = false;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
# Initrd
boot.initrd.systemd.enable = true;
}; };
} }
+26
View File
@@ -0,0 +1,26 @@
{
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;
};
}
+218
View File
@@ -0,0 +1,218 @@
{
inputs,
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.modules.domain;
domain = inputs.secrets.lab.domain;
domainUpper = lib.strings.toUpper domain;
in
{
options.modules.domain = {
enable = mkEnableOption "Domain Integration";
join = {
userFile = mkOption {
type = types.str;
description = "File containing the user used to join the computer.";
};
passwordFile = mkOption {
type = types.str;
description = "File containing the password for the join user.";
};
domainOUFile = mkOption {
type = types.str;
description = "The OU to join the computer to.";
};
};
};
config = mkIf cfg.enable {
# Set network domain
networking.domain = domain;
networking.search = [ domain ];
# Automatically join the domain
systemd.services.adcli-join = {
description = "Automatically join the domain";
wantedBy = [ "default.target" ];
before = [ "sssd.service" ];
requiredBy = [ "sssd.service" ];
after = [
"network-online.target"
];
requires = [
"network-online.target"
];
serviceConfig = {
Type = "oneshot";
};
script = ''
ADCLI_JOIN_USER=$(cat ${cfg.join.userFile})
ADCLI_JOIN_OU=$(cat ${cfg.join.domainOUFile})
${pkgs.adcli}/bin/adcli join -D ${domain} \
-U $ADCLI_JOIN_USER \
-O $ADCLI_JOIN_OU \
--dont-expire-password=true \
--stdin-password < ${cfg.join.passwordFile}
'';
};
# Set up Kerberos
security.krb5 = {
enable = true;
settings = {
libdefaults = {
default_realm = domainUpper;
};
realms.${domainUpper} = {
};
domain_realm = {
"${domain}" = domainUpper;
".${domain}" = domainUpper;
};
};
};
# Set up SSSD
services.sssd = {
enable = true;
config = ''
[sssd]
domains = ${domain}
config_file_version = 2
services = nss, pam
[nss]
filter_users = ${concatStringsSep "," (lib.attrNames config.users.users)}
filter_groups = ${concatStringsSep "," (lib.attrNames config.users.groups)}
[domain/${domain}]
enumerate = False
ad_domain = ${domain}
krb5_realm = ${domainUpper}H
id_provider = ad
auth_provider = ad
access_provider = ad
chpass_provider = ad
use_fully_qualified_names = False
ldap_schema = ad
ldap_id_mapping = True
ad_gpo_access_control = enforcing
ad_gpo_implicit_deny = True
dyndns_update = True
dyndns_update_ptr = False
dyndns_refresh_interval = 86400
dyndns_ttl = 3600
'';
};
security.pam.services.login.sssdStrictAccess = true;
security.pam.services.sshd.sssdStrictAccess = true;
security.pam.services.su.sssdStrictAccess = true;
# Set up Sudo
security.sudo =
let
admin_group = "host_${lib.replaceStrings [ "-" ] [ "_" ] config.networking.hostName}_admin";
in
{
extraConfig = ''
%${admin_group} ALL=(ALL) SETENV: ALL
'';
};
# Set up SSH
programs.ssh = {
package = pkgs.openssh_gssapi;
extraConfig = ''
GSSAPIAuthentication yes
'';
};
services.openssh = {
package = pkgs.openssh_gssapi;
settings = {
GSSAPIAuthentication = true;
GSSAPICleanupCredentials = true;
GSSAPIStrictAcceptorCheck = true;
};
};
# Set up home directory
security.pam.services.login.makeHomeDir = true;
security.pam.services.sshd.makeHomeDir = true;
security.pam.services.su.makeHomeDir = true;
environment.etc.profile.text =
let
# TODO: Activate configuration based on AD group
homeConfiguration = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
(
{ lib, ... }:
{
home.stateVersion = "24.11";
home.username = "$USER";
home.homeDirectory = "/.$HOME";
modules.profiles.base.enable = true;
# Mount the directories from the network share
# home.activation.dirMount =
# let
# bindScript = dir: ''
# mkdir -p /network/$USER/${dir}
# mkdir -p $HOME/${dir}
# ${pkgs.bindfs}/bin/bindfs /network/$USER/${dir} $HOME/${dir}
# '';
# in
# lib.hm.dag.entryAfter [ "writeBoundary" ] ''
# if ! ${pkgs.krb5}/bin/klist -s; then
# echo "No kerberos ticket found"
# ${pkgs.krb5}/bin/kinit
# fi
# if ${pkgs.krb5}/bin/klist -s; then
# echo "Kerberos ticket found, mounting home directory"
# ${bindScript "Documents"}
# ${bindScript "Music"}
# ${bindScript "Pictures"}
# ${bindScript "Video"}
# else
# echo "Still no kerberos ticket found, skipping home directory mount"
# fi
# '';
}
)
] ++ config.home-manager.sharedModules;
};
in
mkAfter ''
# Activate Home Manager configuration for domain users
if id | egrep -o 'groups=.*' | sed 's/,/\n/g' | cut -d'(' -f2 | sed 's/)//' | egrep -o "^domain users$"; then
echo "Setting up environment for domain user"
SKIP_SANITY_CHECKS=1 ${homeConfiguration.activationPackage}/activate
if test -f "$HOME/.bashrc"; then
. $HOME/.bashrc
fi
fi
'';
# Automatically mount home share
# Can be accessed at /network/$USER
# services.autofs = {
# enable = true;
# autoMaster =
# let
# networkMap = pkgs.writeText "auto" ''
# * -fstype=cifs,sec=krb5,user=&,uid=$UID,gid=$GID,cruid=$UID ://${inputs.secrets.lab.nas.host}/home
# '';
# in
# ''
# /network ${networkMap} --timeout=30
# '';
# };
};
}
+6
View File
@@ -20,6 +20,12 @@ in
console.font = "dina"; console.font = "dina";
console.earlySetup = true; console.earlySetup = true;
fonts.packages = with pkgs; [
noto-fonts
fira
jetbrains-mono
];
# TODO: Disable default fonts, fonts should be managed per user # TODO: Disable default fonts, fonts should be managed per user
# fonts.enableDefaultPackages = false; # fonts.enableDefaultPackages = false;
# fonts.fontconfig = { # fonts.fontconfig = {
+10 -40
View File
@@ -17,10 +17,9 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Enable GDM and Gnome # Enable GDM and Gnome
services.xserver.enable = true; services.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.enable = true; services.desktopManager.gnome.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.gnome.core-apps.enable = false;
services.gnome.core-utilities.enable = false;
services.gnome.games.enable = false; services.gnome.games.enable = false;
services.gnome.core-developer-tools.enable = false; services.gnome.core-developer-tools.enable = false;
environment.gnome.excludePackages = with pkgs; [ environment.gnome.excludePackages = with pkgs; [
@@ -29,47 +28,14 @@ in
gnome-backgrounds gnome-backgrounds
gnome-bluetooth gnome-bluetooth
gnome-color-manager gnome-color-manager
gnome-control-center
gnome-shell-extensions gnome-shell-extensions
gnome-tour gnome-tour
gnome-user-docs gnome-user-docs
glib glib
gnome-menus gnome-menus
gtk3.out gtk3.out
xdg-user-dirs
xdg-user-dirs-gtk
]; ];
# Set up desktop entries for possible desktop environments
services.displayManager.sessionPackages = [
(pkgs.writeTextFile {
name = "river.desktop";
text = ''
[Desktop Entry]
Name=River
Comment=A dynamic tiling Wayland compositor
Exec=river
Type=Application
'';
destination = "/share/wayland-sessions/river.desktop";
passthru.providedSessions = [ "river" ];
})
];
# 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 # For GSConnect/KDE Connect
# TODO: Move to host config? # TODO: Move to host config?
networking.firewall = { networking.firewall = {
@@ -88,8 +54,12 @@ in
}; };
# Enable dependencies # Enable dependencies
modules = { modules.networkmanager.enable = true;
networkmanager.enable = true;
}; # Impermanence
modules.impermanence.directories = [
"/etc/NetworkManager/system-connections"
"/var/lib/bluetooth"
];
}; };
} }
+5 -1
View File
@@ -16,7 +16,11 @@ in
# TODO: Add nvidia settings back in # TODO: Add nvidia settings back in
# TODO: Move to nvidia module # TODO: Move to nvidia module
hardware.nvidia = { hardware.nvidia = {
open = true; open = false;
prime = {
intelBusId = "PCI:0@0:2:0";
nvidiaBusId = "PCI:1@0:0:0";
};
}; };
}; };
} }
+81
View File
@@ -0,0 +1,81 @@
{ 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 in order to reset the system to a clean state.
'';
};
};
config = mkIf cfg.enable {
# Filesystem setup
fileSystems."/persist".neededForBoot = true;
# boot.initrd.postResumeCommands = mkAfter cfg.resetScript;
# TODO: Reduce dependency on the root filesystem being ZFS?
boot.initrd.systemd.services.impermanence-rollback = {
description = "Rollback filesystem to clean state.";
wantedBy = [ "initrd.target" ];
after = [ "zfs-import.target" ];
before = [ "sysroot.mount" ];
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
script = cfg.resetScript;
};
# For home-manager persistence
programs.fuse.userAllowOther = true;
# For testing purposes with VM
virtualisation.vmVariantWithDisko.virtualisation.fileSystems."/persist".neededForBoot = true;
environment.persistence = {
"/persist/system" = {
enable = true;
hideMounts = true;
directories = cfg.directories;
files = cfg.files;
};
# "/persist/home" = {
# enable = true;
# hideMounts = true;
# users = (
# lib.mapAttrs' (
# name: value:
# let
# user = name;
# homeDir = "/home/${user}";
# impConfig = value.modules.impermanence;
# in
# lib.nameValuePair user {
# home = homeDir;
# directories = impConfig.directories;
# files = impConfig.files;
# }
# ) config.home-manager.users
# );
# };
};
};
}
+2
View File
@@ -11,5 +11,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
# TODO: Add sudo users to the networkmanager group? # TODO: Add sudo users to the networkmanager group?
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.firewall.checkReversePath = false;
}; };
} }
+3
View File
@@ -18,5 +18,8 @@ in
nssmdns4 = true; nssmdns4 = true;
openFirewall = true; openFirewall = true;
}; };
# For SMB network printers
services.samba.enable = true;
}; };
} }
+44
View File
@@ -0,0 +1,44 @@
{
inputs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.secrets;
secrets = inputs.secrets;
in
{
options.modules.secrets = {
enable = mkEnableOption "secrets";
defaultFile = mkOption {
type = types.str;
default = "${secrets}/secrets/common.enc.yaml";
description = ''
The default file to use for SOPS.
'';
};
secrets = mkOption {
type = types.attrs;
default = { };
description = ''
All secrets that should be made available.
'';
};
};
config = mkIf cfg.enable {
# Set up SOPS
# TODO: Fix the key not being present in /etc/sops before sops-nix runs
sops.defaultSopsFile = cfg.defaultFile;
sops.age.sshKeyPaths = [
"/etc/sops/sops_ed25519_key"
"/persist/system/etc/sops/sops_ed25519_key"
];
sops.secrets = cfg.secrets;
modules.impermanence.directories = [ "/etc/sops" ];
virtualisation.vmVariantWithDisko.sops.age.sshKeyPaths = [ "/tmp/shared/sops_ed25519_key" ];
};
}
+19 -2
View File
@@ -9,7 +9,24 @@ in
enable = mkEnableOption "ssh"; enable = mkEnableOption "ssh";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.openssh.enable = true; services.openssh = {
# TODO: Is this default configuration secure? enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
hostKeys = mkIf (config.modules.impermanence.enable) [
{
type = "ed25519";
path = "/persist/system/etc/ssh/ssh_host_ed25519_key";
}
{
type = "rsa";
bits = 4096;
path = "/persist/system/etc/ssh/ssh_host_rsa_key";
}
];
};
}; };
} }
File renamed without changes.
+37
View File
@@ -0,0 +1,37 @@
{
jq,
lib,
moreutils,
tinymist,
vscode-utils,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "tinymist-vscode-html";
publisher = "myriad-dreamin";
inherit (tinymist) version;
hash = "";
};
nativeBuildInputs = [
jq
moreutils
];
buildInputs = [ tinymist ];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."tinymist.serverPath".default = "${lib.getExe tinymist}"' package.json | sponge package.json
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/myriad-dreamin.tinymist/changelog";
description = "VSCode extension for providing an integration solution for Typst";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist";
homepage = "https://github.com/myriad-dreamin/tinymist";
license = lib.licenses.asl20;
maintainers = [ ];
};
}
+104
View File
@@ -0,0 +1,104 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
makeBinaryWrapper,
makeDesktopItem,
copyDesktopItems,
nodejs_20,
electron,
python3,
nix-update-script,
}:
buildNpmPackage rec {
pname = "open-stage-control";
version = "1.29.8";
src = fetchFromGitHub {
owner = "jean-emmanuel";
repo = "open-stage-control";
rev = "v${version}";
hash = "sha256-518KXvNffLOV2aIWlLJcnPzxEbWxYdjWeiDBC1jlecQ=";
};
# Remove some Electron stuff from package.json
postPatch = ''
sed -i -e '/"electron"\|"electron-installer-debian"/d' package.json
'';
npmDepsHash = "sha256-U4zwYL5URNW0y0W4WvWAVL0hubiiU+2z9F5mDE9l8UU=";
nodejs = nodejs_20;
nativeBuildInputs = [
copyDesktopItems
makeBinaryWrapper
];
buildInputs = [
python3.pkgs.python-rtmidi
];
doInstallCheck = true;
makeCacheWritable = true;
npmFlags = [
"--legacy-peer-deps"
"--skip-pkg"
];
# Override installPhase so we can copy the only directory that matters (app)
installPhase = ''
runHook preInstall
# copy built app and node_modules directories
mkdir -p $out/lib/node_modules/open-stage-control
cp -r app $out/lib/node_modules/open-stage-control/
# copy icon
install -Dm644 resources/images/logo.png $out/share/icons/hicolor/256x256/apps/open-stage-control.png
install -Dm644 resources/images/logo.svg $out/share/icons/hicolor/scalable/apps/open-stage-control.svg
# wrap electron and include python-rtmidi
makeWrapper '${electron}/bin/electron' $out/bin/open-stage-control \
--inherit-argv0 \
--add-flags $out/lib/node_modules/open-stage-control/app \
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix PATH : '${lib.makeBinPath [ python3 ]}'
runHook postInstall
'';
installCheckPhase = ''
XDG_CONFIG_HOME="$(mktemp -d)" $out/bin/open-stage-control --help
'';
desktopItems = [
(makeDesktopItem {
name = "open-stage-control";
exec = "open-stage-control";
icon = "open-stage-control";
desktopName = "Open Stage Control";
comment = meta.description;
categories = [
"Network"
"Audio"
"AudioVideo"
"Midi"
];
startupWMClass = "open-stage-control";
})
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Libre and modular OSC / MIDI controller";
homepage = "https://openstagecontrol.ammd.net/";
license = licenses.gpl3Only;
maintainers = [ ];
platforms = platforms.linux;
mainProgram = "open-stage-control";
};
}
+82
View File
@@ -0,0 +1,82 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/sda";
imageSize = "32G"; # For test VMs
content = {
type = "gpt";
partitions = {
boot = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
zfs = {
end = "-4G";
content = {
type = "zfs";
pool = "tank";
};
};
swap = {
size = "100%";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
longhorn = {
type = "disk";
device = "/dev/sdb";
imageSize = "64G"; # For longhorn storage
content = {
type = "gpt";
partitions = {
main = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
};
};
};
};
};
};
zpool = {
tank = {
type = "zpool";
rootFsOptions = {
compression = "zstd";
};
mountpoint = null;
postCreateHook = "zfs snapshot -r tank@blank && zfs hold -r blank tank@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
};
};
};
};
};
}
+65
View File
@@ -0,0 +1,65 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/sda";
imageSize = "32G"; # For test VMs
content = {
type = "gpt";
partitions = {
boot = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
zfs = {
end = "-4G";
content = {
type = "zfs";
pool = "tank";
};
};
swap = {
size = "100%";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
zpool = {
tank = {
type = "zpool";
rootFsOptions = {
compression = "zstd";
};
mountpoint = null;
postCreateHook = "zfs snapshot -r tank@blank && zfs hold -r blank tank@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
};
};
};
};
};
}
+65
View File
@@ -0,0 +1,65 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/sda"; # How do I handle this for laptops
imageSize = "64G"; # For test VMs
content = {
type = "gpt";
partitions = {
boot = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
zfs = {
end = "-16G";
content = {
type = "zfs";
pool = "tank";
};
};
swap = {
size = "100%";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
zpool = {
tank = {
type = "zpool";
rootFsOptions = {
compression = "zstd";
};
mountpoint = null;
postCreateHook = "zfs snapshot -r tank@blank && zfs hold -r blank tank@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
};
};
};
};
};
}
+65
View File
@@ -0,0 +1,65 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/sda";
imageSize = "64G"; # For test VMs
content = {
type = "gpt";
partitions = {
boot = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
zfs = {
end = "-16G";
content = {
type = "zfs";
pool = "tank";
};
};
swap = {
size = "100%";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
zpool = {
tank = {
type = "zpool";
rootFsOptions = {
compression = "zstd";
};
mountpoint = null;
postCreateHook = "zfs snapshot -r tank@blank && zfs hold -r blank tank@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
};
};
};
};
};
}
+32
View File
@@ -0,0 +1,32 @@
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.profiles.base;
in
{
options.modules.profiles.base = {
enable = mkEnableOption "Base home-manager profile";
};
config = mkIf cfg.enable {
modules = {
impermanence.enable = true;
# btop.enable = true;
direnv.enable = true;
fish.enable = true;
# scripts.enable = true;
# Development
# neovim.enable = true;
# Languages
nix.enable = true;
};
};
}
+102
View File
@@ -0,0 +1,102 @@
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.profiles.gnome;
in
{
options.modules.profiles.gnome = {
enable = mkEnableOption "Graphical GNOME environment";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
# firefox # TODO: Move to dediated module
];
dconf.settings = {
"org/gnome/calendar" = {
active-view = "week";
};
"org/gnome/desktop/background" = {
picture-uri = "file://${config.home.homeDirectory}/.local/share/backgrounds/background";
};
"org/gnome/desktop/input-sources" = {
sources = [
(lib.gvariant.mkTuple [
"xkb"
"us"
])
];
xkb-options = [ "caps:escape_shifted_capslock" ];
};
"org/gnome/desktop/interface" = {
accent-color = "purple";
enable-hot-corners = false;
};
"org/gnome/desktop/peripherals/touchpad" = {
speed = 0.214;
two-finger-scrolling-enabled = true;
};
"org/gnome/mutter" = {
workspaces-only-on-primary = true;
};
"org/gnome/nautilus/icon-view" = {
default-zoom-level = "small";
};
"org/gnome/nautilus/preferences" = {
default-folder-viewer = "icon-view";
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
night-light-schedule-automatic = false;
night-light-schedule-from = 20.0;
night-light-schedule-to = 6.0;
night-light-temperature = 2700;
};
"org/gnome/shell" = {
disable-extension-version-validation = true;
enabled-extensions = [
"disable-workspace-animation@ethnarque"
"gsconnect@andyholmes.github.io"
"rounded-window-corners@fxgn"
"media-progress@krypion17"
"mprisLabel@moon-0xff.github.com"
"caffeube@patapon.info"
];
last-selected-power-profile = "power-saver";
};
};
modules = {
profiles.base.enable = true;
# Desktop environment
desktop.gnome.enable = true;
# desktop.tiling.enable = true;
# Browser
# firefox = {
# enable = true;
# default = false;
# };
# qutebrowser = {
# enable = true;
# default = true;
# };
# Tools
# obsidian.enable = true;
# zathura.enable = true;
# Development
# neovim.enable = true;
vscode.enable = true;
};
};
}
+286
View File
@@ -0,0 +1,286 @@
{
pkgs,
pkgs-stable,
lib,
config,
inputs,
...
}:
with lib;
let
cfg = config.modules.profiles.jan;
in
{
options.modules.profiles.jan = {
enable = mkEnableOption "Jan's personal profile";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
firefox
# inputs.stable-nixpkgs.legacyPackages.${config.nixpkgs.hostPlatform}.libreoffice
libreoffice
remmina
thunderbird
signal-desktop
prusa-slicer
pkgs-stable.freecad-wayland
inkscape
# ente-auth
audacity
carla
# pkgs-stable.winbox
winbox4
# whatsapp-for-linux
karere
discord
steam
spotify
# feishin
eduvpn-client
ryubing
bottles
prismlauncher
foliate
wireshark
obsidian
# devenv
# kicad
vlc
authenticator
hotspot
btop
winboat
hieroglyphic
shortwave
podman
podman-compose
gnome-network-displays
gnome-logs
];
programs.zathura = {
enable = true;
options = {
synctex = true;
synctex-editor-command = "${pkgs.texlab}/bin/texlab inverse-search -i %{input} -l %{line}";
};
};
programs.helix = {
enable = true;
defaultEditor = true;
# settings = {
# theme = {
# light = "adwaita-light";
# dark = "adwaita-dark";
# fallback = "default";
# };
# };
settings =
let
move_line_up = [
"extend_to_line_bounds"
"delete_selection"
"move_line_up"
"paste_before"
];
move_line_down = [
"extend_to_line_bounds"
"delete_selection"
"paste_after"
];
in
{
keys.normal = {
"A-up" = move_line_up;
"A-down" = move_line_down;
"A-k" = move_line_up;
"A-j" = move_line_down;
};
keys.select = {
"A-up" = move_line_up;
"A-down" = move_line_down;
"A-k" = move_line_up;
"A-j" = move_line_down;
};
};
extraPackages = with pkgs; [
bash-language-server # Bash
fish-lsp # Fish
systemd-lsp # Systemd
yaml-language-server # Yaml
taplo # Toml
nixd # Nix
protols # Protobuf
dockerfile-language-server # Dockerfile
docker-compose-language-service # Docker compose
clang-tools # C, C++
neocmakelsp # Cmake
rust-analyzer # Rust
lldb # C, C++, Rust
zls # Zig
texlab # Latex
tinymist # Typst
marksman # Markdown
markdown-oxide # Markdown
vscode-langservers-extracted # HTML, CSS, JSON, ESLint
typescript-language-server # Typescript, Javascript
intelephense # PHP
vue-language-server # Vue
ruff # Python
basedpyright # Python
#helix-gpt # Copilot
ltex-ls-plus # Spellchecking
# texlab # Latex, Bibtex
# bibtex-tidy # Bibtex
# docker-langserver # Dockerfile
# docker-compose-langserver # Docker compose
# elixir-ls # Elixir
# gopls # Go
# golangci-lint-langserver # Go
# dlv # Go
# haskell-language-server # Haskell
# julia # Julia
# kotlin-language-server # Kotlin
# lua-language-server # Lua
# slint-lsp # Slint
# tinymist # Typst
];
languages = {
language-server = {
ltex = {
command = "ltex-ls-plus";
config.ltex = { };
};
texlab = {
command = "texlab";
config.texlab = {
build.onSave = true;
forwardSearch.executable = "${config.programs.zathura.package}/bin/zathura";
forwardSearch.args = [
"--synctex-forward"
"%l:1:%f"
"%p"
];
};
};
basedpyright = {
command = "basedpyright-langserver";
args = [ "--stdio" ];
};
tinymist = {
command = "tinymist";
config.preview.background = {
enabled = true;
args = [
"--data-plane-host=127.0.0.1:23635"
"--invert-colors=never"
"--open"
];
};
};
};
language = [
{
name = "latex";
# language-servers = [
# { name = "texlab"; }
# { name = "ltex"; }
# ];
soft-wrap = {
enable = true;
};
}
{
name = "python";
language-servers = [
{
name = "basedpyright";
except-features = [ "diagnostics" ];
}
"ruff"
];
auto-format = true;
formatter = {
command = "ruff";
args = [
"format"
"-"
];
};
}
];
};
};
systemd.user.tmpfiles.rules = [
"d ${config.home.homeDirectory}/Downloads - - - - -"
];
modules = {
profiles.gnome.enable = true;
impermanence = {
directories = [
"Code"
"Documents"
"Games"
"Models"
"Music"
"Pictures"
"Videos"
];
};
# Gaming
# retroarch.enable = true;
# ryujinx.enable = true;
# Tools
git = {
enable = true;
user = "Jan-Bulthuis";
email = "git@bulthuis.dev";
# TODO: Move
ignores = [
".envrc"
".direnv"
"flake.nix"
"flake.lock"
];
};
bitwarden.enable = true;
xpra = {
enable = true;
hosts = [
"mixer@10.20.40.100"
];
};
# Development
# docker.enable = true;
# matlab.enable = true;
# mathematica.enable = true;
# Languages
haskell.enable = false;
js.enable = true;
nix.enable = true;
rust.enable = true;
python.enable = true;
cpp.enable = true;
tex.enable = false;
jupyter.enable = true;
go.enable = true;
};
};
}
@@ -1,5 +1,4 @@
{ {
mkModule,
pkgs, pkgs,
lib, lib,
config, config,
@@ -19,6 +18,28 @@ in
modules = { modules = {
bootloader.enable = mkDefault true; bootloader.enable = mkDefault true;
ssh.enable = mkDefault true; ssh.enable = mkDefault true;
impermanence = {
files = [
"/etc/machine-id"
"/etc/zfs/zpool.cache" # TODO: Move to zfs module?
];
directories = [
"/var/log/journal"
"/var/lib/nixos"
"/var/lib/systemd"
];
};
# TODO: Remove the secrets module and use sops directly?
secrets = {
enable = true;
secrets = {
"ssh-keys/deploy-priv" = {
path = "/root/.ssh/id_ed25519";
};
};
};
}; };
# Localization # Localization
@@ -32,9 +53,6 @@ in
defaultEditor = true; defaultEditor = true;
}; };
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable the usage of flakes # Enable the usage of flakes
nix.settings.experimental-features = [ nix.settings.experimental-features = [
"nix-command" "nix-command"
@@ -56,6 +74,9 @@ in
pciutils pciutils
zip zip
unzip unzip
tmux
unixtools.net-tools
tcpdump
]; ];
}; };
} }
File renamed without changes.
File renamed without changes.
+109
View File
@@ -0,0 +1,109 @@
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.profiles.vm;
in
{
options.modules.profiles.vm = {
enable = mkEnableOption "Base VM profile";
};
config = mkIf cfg.enable {
# Enabled modules
modules = {
profiles.base.enable = true;
disko = {
enable = true;
profile = mkDefault "vm";
};
impermanence = {
enable = true;
resetScript = ''
# Revert to the blank state for the root directory
zfs rollback -r tank/root@blank
'';
};
domain = {
enable = true;
join = {
userFile = config.sops.secrets."vm-join/user".path;
passwordFile = config.sops.secrets."vm-join/password".path;
domainOUFile = config.sops.secrets."vm-join/ou".path;
};
};
ssh.enable = true;
};
# Initialize domain join secrets
sops.secrets."vm-join/user" = { };
sops.secrets."vm-join/password" = { };
sops.secrets."vm-join/ou" = { };
# Autologin to root for access from hypervisor
services.getty.autologinUser = "root";
# Local user
sops.secrets."passwords/local-hashed".neededForUsers = true;
users.mutableUsers = false;
users.users.local = {
isNormalUser = true;
group = "local";
hashedPasswordFile = config.sops.secrets."passwords/local-hashed".path;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKxoQSxfYqf9ITN8Fhckk8WbY4dwtBAXOhC9jxihJvq Admin"
];
};
users.groups.local = { };
home-manager.users.local =
{ ... }:
{
home.stateVersion = "24.11";
modules.profiles.base.enable = true;
};
# System packages
environment.systemPackages = with pkgs; [
# TODO: Make module for utilities/scripts
(writeShellScriptBin "system-update" "nixos-rebuild switch --flake git+https://git.bulthuis.dev/Jan/nixos-config")
];
# Enable qemu guest agent
services.qemuGuest.enable = true;
# Machine platform
nixpkgs.hostPlatform = "x86_64-linux";
# Set hostid (required for ZFS)
networking.hostId = "deadbeef";
# Hardware configuration
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_net"
"virtio_pci"
"virtio_mmio"
"virtio_blk"
"virtio_scsi"
"9p"
"9pnet_virtio"
"sd_mod"
"sr_mod"
];
boot.kernelModules = [
"kvm-intel"
"virtio_balloon"
"virtio_console"
"virtio_rng"
"virtio_gpu"
];
};
}
-244
View File
@@ -1,244 +0,0 @@
{
lib,
pkgs,
config,
...
}:
{
imports = [
# Import environment
./vm-base.nix
];
config = {
# Machine hostname
networking.hostName = "vm-audio";
# Enabled modules
modules = {
pipewire.enable = true;
spotifyd.enable = true;
};
# 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";
};
}
];
};
};
}
-63
View File
@@ -1,63 +0,0 @@
{ lib, ... }:
{
imports = [
# Import environment
../default.nix
];
config = {
# State version
system.stateVersion = "24.11";
# Machine hostname
networking.hostName = lib.mkDefault "vm-base";
# Enabled modules
modules = {
base.enable = true;
ssh.enable = true;
};
# Enable qemu guest agent
services.qemuGuest.enable = true;
# Hardware configuration
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
fileSystems."/" = {
device = "/dev/disk/by-partlabel/root";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/EFI";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
# Swapfile
swapDevices = [
{
device = "/var/lib/swapfile";
size = 6 * 1024;
}
];
};
}
-60
View File
@@ -1,60 +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
wireguard-tools
usbutils
pciutils
zip
unzip
];
modules = {
# Enable base modules
clean-tmp.enable = true;
neovim.enable = true;
systemd-boot.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.captive-browser.enable = true;
services.resolved = {
enable = true;
};
networking.firewall.enable = true;
modules.unfree.enable = true;
nix.settings.experimental-features = "nix-command flakes";
nixpkgs.hostPlatform = "x86_64-linux";
console.packages = [
pkgs.dina-psfu
];
console.font = "dina";
console.earlySetup = true;
boot.loader.timeout = 0;
};
}
-93
View File
@@ -1,93 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.base.desktop;
in
{
options.modules.base.desktop = {
enable = mkEnableOption "desktop";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
# TODO: MOVE
quickemu # TODO: Reenable once building this is fixed
pdftk
# TODO: Move to USB module
# usbutils
# udiskie
# udisks
brightnessctl
wireshark
];
# Move to Realm module
security.krb5 = {
enable = true;
settings = {
libdefaults = {
rdns = false;
};
realms = {
"GEWISWG.GEWIS.NL" = {
kdc = [
"https://gewisvdesktop.gewis.nl/KdcProxy"
];
};
};
};
};
modules = {
# Enable base modules
base.enable = true;
fontconfig.enable = true;
nixgreety.enable = true;
pipewire.enable = true;
graphics.enable = true;
};
programs.dconf.enable = true;
services.libinput.enable = true;
networking.firewall = {
enable = true;
logRefusedConnections = true;
logRefusedPackets = true;
logReversePathDrops = true;
logRefusedUnicastsOnly = false;
};
programs.wireshark.enable = true;
machine.sudo-groups = [ "wireshark" ];
services.upower.enable = true; # For battery percentage in gnome
modules.unfree.allowedPackages = [
"nvidia-x11"
"nvidia-settings"
];
networking.firewall.allowedTCPPortRanges = [
{
from = 10000;
to = 11000;
}
];
networking.firewall.allowedUDPPortRanges = [
{
from = 10000;
to = 11000;
}
];
security.rtkit.enable = true;
security.polkit.enable = true;
# TODO: Move to USB module
# services.gvfs.enable = true;
services.udisks2.enable = true;
};
}
-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"
];
};
};
}
-24
View File
@@ -1,24 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.systemd-boot;
in
{
options.modules.systemd-boot = {
enable = mkEnableOption "systemd-boot";
};
config = mkIf cfg.enable {
boot.loader = {
systemd-boot.enable = true;
systemd-boot.editor = false;
efi.canTouchEfiVariables = true;
};
};
}
@@ -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 ]; };
}
-39
View File
@@ -1,39 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
{
imports = [
# Import modules
./base/default.nix
./base/desktop.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
./grdp/default.nix
./greeter/greetd/default.nix
./greeter/greetd/nixgreety.nix
./greeter/greetd/tuigreet.nix
./greeter/ly/default.nix
./locale/default.nix
./neovim/default.nix
./networkmanager/default.nix
./power-saving/default.nix
./printing/default.nix
./sound/pipewire.nix
./spotifyd/default.nix
./ssh/default.nix
./users/default.nix
./unfree/default.nix
./vpn/tailscale.nix
./wifi/wpa_supplicant.nix
];
}
@@ -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 [ ];
};
};
}
-39
View File
@@ -1,39 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.fontconfig;
in
{
options.modules.graphics = {
enable = mkEnableOption "graphics";
};
config = mkIf cfg.enable {
# 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.beta;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
};
}
-50
View File
@@ -1,50 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
{
options.modules.grdp = {
enable = mkEnableOption "grdp";
};
config = mkIf config.modules.grdp.enable {
services.gnome.gnome-remote-desktop.enable = true;
environment.systemPackages = with pkgs; [
gnome-remote-desktop
gnome-control-center
gnome-session
gnome-shell
gnome-settings-daemon
gdm
];
systemd.services."gnome-remote-desktop".wantedBy = [ "graphical.target" ];
networking.firewall = {
allowedTCPPorts = [ 3389 ];
allowedUDPPorts = [ 3389 ];
};
services.xserver.displayManager.gdm.enable = true;
modules.greetd.enable = mkForce false;
# security.polkit.extraConfig = ''
# polkit.addRule(function(action, subject) {
# if (action.id == "org.gnome.controlcenter.remote-session-helper" &&
# subject.isInGroup("wheel")) {
# return polkit.Result.YES;
# }
# });'';
# programs.dconf.profiles.user.databases = [
# {
# settings = with lib.gvariant; {
# "org/gnome/desktop/remote-desktop/rdp" = {
# enable = true;
# view-only = false;
# };
# };
# }
# ];
};
}
@@ -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 = mkDefault "greeter";
};
};
};
}
@@ -1,30 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.nixgreety;
in
{
options.modules.nixgreety = {
enable = mkEnableOption "nixgreety";
};
config = mkIf cfg.enable {
# Enable greetd
modules.greetd = {
enable = true;
command = "${pkgs.nixgreety}/bin/nixgreety";
};
services.greetd.settings.default_session.user = "root";
environment.systemPackages = with pkgs; [
nixgreety
];
};
}
@@ -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;
};
}
@@ -1,30 +0,0 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.ly;
in
{
options.modules.ly = {
enable = mkEnableOption "ly";
};
config = mkIf cfg.enable {
services.displayManager.ly = {
enable = true;
settings = {
animation = "matrix";
animation_refresh_ms = 32;
box_title = "Hewwo! >_< :3";
clear_password = true;
load = true;
save = true;
xinitrc = "null";
};
};
};
}
-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;
};
};
}
@@ -1,29 +0,0 @@
{
lib,
config,
...
}:
with lib;
let
cfg = config.modules.networkmanager;
in
{
options.modules.networkmanager = {
enable = mkEnableOption "networkmanager";
};
config = mkIf cfg.enable {
machine.sudo-groups = [ "networkmanager" ];
networking = {
networkmanager = {
enable = true;
wifi.powersave = true;
};
firewall = {
# Fix for wireguard
checkReversePath = false;
};
};
};
}
@@ -1,36 +0,0 @@
{
lib,
config,
...
}:
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;
};
};
};
}
-27
View File
@@ -1,27 +0,0 @@
{
lib,
config,
...
}:
with lib;
let
cfg = config.modules.printing;
in
{
options.modules.printing = {
enable = mkEnableOption "printing";
};
config = mkIf cfg.enable {
services.printing = {
enable = true;
# drivers = with pkgs; [];
};
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
}
-27
View File
@@ -1,27 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.pipewire;
in
{
options.modules.pipewire = {
enable = mkEnableOption "pipewire";
};
config = mkIf cfg.enable {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
};
}
-64
View File
@@ -1,64 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.spotifyd;
in
{
options.modules.spotifyd = {
enable = mkEnableOption "spotifyd";
};
config = mkIf cfg.enable {
# User for spotifyd
users.users.mixer = {
group = "mixer";
};
users.groups.mixer = { };
# Spotifyd service
systemd.user.services.spotifyd = {
description = "SpotifyD Service";
wantedBy = [ "default.target" ];
after = [
"network.target"
"sound.target"
];
unitConfig = {
ConditionUser = "mixer"; # TODO: Allow user configuration
};
serviceConfig = {
ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --config-path /etc/spotifyd/spotifyd.conf";
Restart = "always";
RestartSec = 5;
};
};
# Set up config
environment.etc = {
"spotifyd/spotifyd.conf" = {
source = ./spotifyd.conf;
mode = "0444";
user = "mixer"; # TODO: Make user configurable
group = "mixer";
};
};
# Set up firewall
networking.firewall = {
allowedTCPPorts = [
5353
5454
];
allowedUDPPorts = [
5353
5454
];
};
};
}
-118
View File
@@ -1,118 +0,0 @@
[global]
#---------#
# GENERAL #
#---------#
# The name that gets displayed under the connect tab on
# official clients.
device_name = "Linox"
# The displayed device type in Spotify clients.
# Can be unknown, computer, tablet, smartphone, speaker, t_v,
# a_v_r (Audio/Video Receiver), s_t_b (Set-Top Box), and audio_dongle.
device_type = "a_v_r"
# The directory used to store credentials and audio cache.
# Default: infers a sensible cache directory (e.g. on Linux: $XDG_CACHE_HOME)
#
# Note: The file path does not get expanded. Environment variables and
# shell placeholders like $HOME or ~ don't work!
#cache_path = "/full/path/to/cache/directory"
# If set to true, audio data does NOT get cached.
# In this case, the cache is only used for credentials.
#no_audio_cache = true
# The maximal size of the cache directory in bytes
# The example value corresponds to ~ 1GB
#max_cache_size = 1000000000
# If set to true, `spotifyd` tries to bind to dbus (default is the session bus)
# and expose MPRIS controls. When running headless, without the session bus,
# you should set this to false, to avoid errors. If you still want to use MPRIS,
# have a look at the `dbus_type` option.
use_mpris = false
# The bus to bind to with the MPRIS interface.
# Possible values: "session", "system"
# The system bus can be used if no graphical session is available
# (e.g. on headless systems) but you still want to be able to use MPRIS.
# NOTE: You might need to add appropriate policies to allow spotifyd to
# own the name.
#dbus_type = "session"
#-----------#
# DISCOVERY #
#-----------#
# If set to true, this disables zeroconf discovery.
# This can be useful, if one prefers to run a single-user instance.
#disable_discovery = false
# The port at which `spotifyd` is going to offer its service over the network (TCP).
# If not set, a random port > 1024 is used. For the service to be discoverable on the
# local network via mDNS, both the mDNS port (5353 UDP) and the random or fixed
# zeroconf port need to be allowed through any active firewall.
zeroconf_port = 5454
#-------#
# AUDIO #
#-------#
# The audio backend used to play music. To get
# a list of possible backends, run `spotifyd --help`.
#backend = "alsa" # use portaudio for macOS [homebrew]
backend = "pulseaudio"
# The alsa audio device to stream audio. To get a
# list of valid devices, run `aplay -L`,
#device = "default" # omit for macOS
device = "SpotifyD-Proxy"
# The PCM sample format to use. Possible values
# are F32, S32, S24, S24_3, S16.
# Change this value if you encounter errors like
# "Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'"
#audio_format = "S16"
# The volume controller. Each one behaves different to
# volume increases. For possible values, run
# `spotifyd --help`.
#volume_controller = "softvol" # use softvol for macOS
# ! Only relevant for ALSA !
# The alsa control device. By default this is the same
# name as the `device` field.
#control = "default"
# ! Only relevant for ALSA !
# The alsa mixer used by `spotifyd`.
#mixer = "PCM" # omit for macOS
# The audio bitrate. 96, 160 or 320 kbit/s
#bitrate = 160
# Volume on startup between 0 and 100
#initial_volume = 90
initial_volume = 100
# If set to true, enables volume normalisation between songs.
# volume_normalisation = true
# The normalisation pregain that is applied for each song.
#normalisation_pregain = -10
#-------ä
# OTHER #
#-------#
# After the music playback has ended, start playing similar songs based on the previous tracks.
# By default, `spotifyd` infers this setting from the user settings.
autoplay = true
# A command that gets executed in your shell after each song changes.
#on_song_change_hook = "echo \"hook executed on $PLAYER_EVENT\""
# The proxy `spotifyd` will use to connect to spotify.
#proxy = "http://proxy.example.org:8080"
-20
View File
@@ -1,20 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.ssh;
in
{
options.modules.ssh = {
enable = mkEnableOption "ssh";
};
config = mkIf cfg.enable {
services.openssh.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;
};
}
-79
View File
@@ -1,79 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
# 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 systemwide configuration
./systemwide.nix
];
options = {
machine.sudo-groups = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Groups assigned to sudo users.";
};
machine.users = mkOption {
type = types.attrsOf userModule;
default = { };
description = "Users configured on this system.";
};
};
config = {
# Add required home manager modules
home-manager.sharedModules = [
# Modules
../../user-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.sudo-groups
);
};
}) config.machine.users;
# Create home manager configuration for users
home-manager.users = attrsets.concatMapAttrs (name: value: {
${name} = value.configuration;
}) config.machine.users;
};
}
-42
View File
@@ -1,42 +0,0 @@
{
config,
lib,
...
}:
with lib;
let
moduleFiles = [
../../user-modules/desktop/systemwide.nix
../../user-modules/development/systemwide.nix
../../user-modules/gaming/systemwide.nix
../../user-modules/keyring/systemwide.nix
];
moduleConfig = lists.foldr (file: acc: recursiveUpdate acc (import file)) { } moduleFiles;
moduleNames = attrNames moduleConfig;
mkModule =
name: moduleConfig:
{ pkgs, ... }:
{
config =
mkIf
(any (
user:
(
config.home-manager.users.${user}.modules.${name}.enable
|| (any (specialisation: specialisation.configuration.modules.${name}.enable) (
attrValues config.home-manager.users.${user}.specialisation
))
)
) (attrNames config.home-manager.users))
(if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; }));
};
imports = map (name: mkModule name moduleConfig."${name}") moduleNames;
in
{
imports = imports;
}
-23
View File
@@ -1,23 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.tailscale;
in
{
options.modules.tailscale = {
enable = mkEnableOption "tailscale";
};
config = mkIf cfg.enable {
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
};
};
}
@@ -1,24 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.wpa_supplicant;
in
{
options.modules.wpa_supplicant = {
enable = mkEnableOption "wpa_supplicant";
};
config = mkIf cfg.enable {
networking.wireless = {
enable = true;
userControlled.enable = true;
allowAuxiliaryImperativeNetworks = true;
};
};
}
-21
View File
@@ -1,21 +0,0 @@
{
...
}:
let
overlay = final: prev: {
dina-psfu = prev.callPackage ./fonts/dina-psfu.nix { };
ttf2psf = prev.callPackage ./fonts/ttf2psf.nix { };
wqy-zenhei = prev.callPackage ./fonts/wqy-zenhei.nix { };
wqy-microhei = prev.callPackage ./fonts/wqy-microhei.nix { };
wqy-bitmapsong = prev.callPackage ./fonts/wqy-bitmapsong.nix { };
wprs = prev.callPackage ./programs/wprs/default.nix { };
nixgreety = prev.callPackage ./programs/nixgreety.nix { };
carla_osc_bridge = prev.callPackage ./programs/carla_osc_bridge.nix { };
# ly = prev.callPackage ./programs/ly/default.nix { };
};
in
{
nixpkgs.overlays = [ overlay ];
}
-31
View File
@@ -1,31 +0,0 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "ttf2psf";
version = "1.0.0";
src = pkgs.fetchFromGitHub {
owner = "NateChoe1";
repo = "ttf2psf";
rev = "8db09d05385f595c320eccae4c48ff4393ca5bde";
sha256 = "v52TZp+GyXHBAMsIoHFA8ZIMPsDVls13WW29vpesCig=";
};
buildInputs = with pkgs; [
pkg-config
freetype
];
buildPhase = ''
make build/ttf2psf
'';
installPhase = ''
install -Dm 755 -t $out/bin build/ttf2psf
install -Dm 644 -t $out/share/ttf2psf data/*.*
install -Dm 644 -t $out/share/ttf2psf/fontsets data/fontsets/*
'';
}
-35
View File
@@ -1,35 +0,0 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-bitmapsong-pcf";
version = "1.0.0-RC1";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
};
buildInputs = [ pkgs.fontforge ];
buildPhase = ''
newName() {
test "''${1:5:1}" = i && _it=Italic || _it=
case ''${1:6:3} in
400) test -z $it && _weight=Medium ;;
700) _weight=Bold ;;
esac
_pt=''${1%.pcf}
_pt=''${_pt#*-}
echo "WenQuanYi_Bitmap_Song$_weight$_it$_pt"
}
for i in *.pcf; do
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$(newName $i).otb\")"
done
'';
installPhase = ''
install -Dm644 *.otb -t $out/share/fonts/
'';
}
-22
View File
@@ -1,22 +0,0 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-microhei";
version = "0.2.0-beta";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttc -t $out/share/fonts/
runHook postInstall
'';
}
-22
View File
@@ -1,22 +0,0 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-zenhei";
version = "0.9.45";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
hash = "sha256-5LfjBkdb+UJ9F1dXjw5FKJMMhMROqj8WfUxC8RDuddY=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttc -t $out/share/fonts/
runHook postInstall
'';
}
-47
View File
@@ -1,47 +0,0 @@
{
stdenv,
lib,
fetchFromGitHub,
linux-pam,
libxcb,
makeBinaryWrapper,
zig_0_12,
callPackage,
nixosTests,
}:
stdenv.mkDerivation {
pname = "ly";
version = "1.0.2";
src = fetchFromGitHub {
owner = "peterc-s";
repo = "ly";
rev = "e6d8bea236dd0097adb1c22e9a23d95102ebe9d9";
sha256 = "w9YdNVD+8UhrEbPJ7xqsd/WoxU2rlo2GXFtc9JpWHxo=";
};
nativeBuildInputs = [
makeBinaryWrapper
zig_0_12.hook
];
buildInputs = [
libxcb
linux-pam
];
postPatch = ''
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
'';
passthru.tests = { inherit (nixosTests) ly; };
meta = with lib; {
description = "TUI display manager";
license = licenses.wtfpl;
homepage = "https://github.com/fairyglade/ly";
maintainers = [ maintainers.vidister ];
platforms = platforms.linux;
mainProgram = "ly";
};
}
-110
View File
@@ -1,110 +0,0 @@
# generated by zon2nix (https://github.com/Cloudef/zig2nix)
{
lib,
linkFarm,
fetchurl,
fetchgit,
runCommandLocal,
zig,
name ? "zig-packages",
}:
let
unpackZigArtifact =
{ name, artifact }:
runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
mv "$TMPDIR/p/$hash" "$out"
chmod 755 "$out"
'';
fetchZig =
{
name,
url,
hash,
}:
let
artifact = fetchurl { inherit url hash; };
in
unpackZigArtifact { inherit name artifact; };
fetchGitZig =
{
name,
url,
hash,
}:
let
parts = lib.splitString "#" url;
base = lib.elemAt parts 0;
rev = lib.elemAt parts 1;
in
fetchgit {
inherit name rev hash;
url = base;
deepClone = false;
};
fetchZigArtifact =
{
name,
url,
hash,
}:
let
parts = lib.splitString "://" url;
proto = lib.elemAt parts 0;
path = lib.elemAt parts 1;
fetcher = {
"git+http" = fetchGitZig {
inherit name hash;
url = "http://${path}";
};
"git+https" = fetchGitZig {
inherit name hash;
url = "https://${path}";
};
http = fetchZig {
inherit name hash;
url = "http://${path}";
};
https = fetchZig {
inherit name hash;
url = "https://${path}";
};
file = unpackZigArtifact {
inherit name;
artifact = /. + path;
};
};
in
fetcher.${proto};
in
linkFarm name [
{
name = "122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b";
path = fetchZigArtifact {
name = "clap";
url = "https://github.com/Hejsil/zig-clap/archive/refs/tags/0.9.1.tar.gz";
hash = "sha256-7qxm/4xb+58MGG+iUzssUtR97OG2dRjAqyS0BAet4HY=";
};
}
{
name = "12209b971367b4066d40ecad4728e6fdffc4cc4f19356d424c2de57f5b69ac7a619a";
path = fetchZigArtifact {
name = "zigini";
url = "https://github.com/Kawaii-Ash/zigini/archive/0bba97a12582928e097f4074cc746c43351ba4c8.tar.gz";
hash = "sha256-OdaJ5tqmk2MPwaAbpK4HRD/CcQCN+Cjj8U63BqUcFMs=";
};
}
{
name = "1220b0979ea9891fa4aeb85748fc42bc4b24039d9c99a4d65d893fb1c83e921efad8";
path = fetchZigArtifact {
name = "ini";
url = "https://github.com/ziglibs/ini/archive/e18d36665905c1e7ba0c1ce3e8780076b33e3002.tar.gz";
hash = "sha256-RQ6OPJBqqH7PCL+xiI58JT7vnIo6zbwpLWn+byZO5iM=";
};
}
]
-19
View File
@@ -1,19 +0,0 @@
{ pkgs, ... }:
with pkgs;
rustPlatform.buildRustPackage {
pname = "nixgreety";
version = "master";
src = fetchFromGitea {
domain = "git.bulthuis.dev";
owner = "Jan";
repo = "nixgreety";
rev = "c7278a910a0238a53f23fe9a0ae881802a4bcb31";
hash = "sha256-kZB+iEFIDJ8pOJetu4Isu4oaktgIn14D4PcpDXLOXA8=";
};
cargoHash = "sha256-pklKVzYoChRqPZ/D3BsMGnaBFd615TKbvoAy7iU8UtA=";
useFetchCargoVendor = true;
}
File diff suppressed because it is too large. Load diff
@@ -1,50 +0,0 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
libxkbcommon,
python3,
runCommand,
wprs,
}:
rustPlatform.buildRustPackage {
pname = "wprs";
version = "0-unstable-2025-04-16";
src = fetchFromGitHub {
owner = "wayland-transpositor";
repo = "wprs";
rev = "dfc1385bcb73734cd0d05a7e353522983c236562";
hash = "sha256-MrfYrKAVFoT453B2zED6Ax2coZ/KZ7CWYdZCx469Q/4=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libxkbcommon
(python3.withPackages (pp: with pp; [ psutil ]))
];
useFetchCargoVendor = true;
cargoHash = "sha256-01PTfgDeagC72z8XADXEn5Aio6UWQAAYgDP4zKFTPpY=";
preFixup = ''
cp wprs "$out/bin/wprs"
'';
passthru.tests.sanity = runCommand "wprs-sanity" { nativeBuildInputs = [ wprs ]; } ''
${wprs}/bin/wprs -h > /dev/null && touch $out
'';
meta = with lib; {
description = "rootless remote desktop access for remote Wayland";
license = licenses.asl20;
maintainers = with maintainers; [ mksafavi ];
platforms = [ "x86_64-linux" ]; # The aarch64-linux support is not implemented in upstream yet. Also, the darwin platform is not supported as it requires wayland.
homepage = "https://github.com/wayland-transpositor/wprs";
mainProgram = "wprs";
};
}
-54
View File
@@ -1,54 +0,0 @@
{
nixpkgs,
flake-utils,
...
}:
let
imports = [
./shell.nix
./languages/python.nix
./languages/rust.nix
./utilities/cuda.nix
./utilities/jupyter.nix
];
in
{
mkShell =
attrs:
(flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
evaluated =
(nixpkgs.lib.evalModules {
modules = [ attrs ] ++ imports;
specialArgs = {
pkgs = pkgs;
};
}).config;
recUpdate = nixpkgs.lib.recursiveUpdate;
libPackages = evaluated.libPackages pkgs;
shell = recUpdate {
env =
evaluated.env
// (
if (libPackages != [ ]) then
{
LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath libPackages;
}
else
{ }
);
packages = evaluated.packages ++ (evaluated.extraPackages pkgs) ++ libPackages;
} evaluated.override;
in
{
devShells.default = pkgs.mkShell shell;
}
));
}
Loaded 100 of 195 files, more files were not shown because too many files have changed in this diff. Show more