25 Commits

Author SHA1 Message Date
e6bad13cfd home-assistant: Add ui-lovelace-minimalist
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m55s
2025-01-26 19:08:46 +00:00
6dad981103 hass-browser-mod: init at 2.3.3 2025-01-26 19:08:45 +00:00
00dfecbcf0 ui-lovelace-minimalist: init at 1.3.15 2025-01-26 18:54:52 +00:00
36724a4bf5 mutter: bump overlay
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m52s
2025-01-25 11:45:24 +00:00
7d34ebb4d5 flake.lock: Update
Some checks failed
Check flake / build-amd64-linux (push) Has been cancelled
Flake lock file updates:

• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/cb3173dc5c746fa95bca1f035a7e4d2b588894ac?narHash=sha256-%2BX9KAryvDsIE7lQ0FdfiD1u33nOVgsgufedqspf77N4%3D' (2025-01-19)
  → 'github:NixOS/nixos-hardware/dfad538f751a5aa5d4436d9781ab27a6128ec9d4?narHash=sha256-ZEbOJ9iT72iwqXsiEMbEa8wWjyFvRA9Ugx8utmYbpz4%3D' (2025-01-24)
• Updated input 'nixos-mailserver':
    'gitlab:simple-nixos-mailserver/nixos-mailserver/dc0569066e79ae96184541da6fa28f35a33fbf7b?narHash=sha256-zgR8NTiNDPVNrfaiOlB9yHSmCqFDo7Ks2IavaJ2dZo4%3D' (2024-12-26)
  → 'gitlab:simple-nixos-mailserver/nixos-mailserver/ade37b2765032f83d2d4bd50b6204a40a4c05eb4?narHash=sha256-JBh5%2Bg8oQteQdQqbO07dGHBRQo/NGI61JPlTjdfQ1pk%3D' (2025-01-18)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6a3ae7a5a12fb8cac2d59d7df7cbd95f9b2f0566?narHash=sha256-s40Kk/OulP3J/1JvC3VT16U4r/Xw6Qdi7SRw3LYkPWs%3D' (2025-01-18)
  → 'github:NixOS/nixpkgs/035f8c0853c2977b24ffc4d0a42c74f00b182cd8?narHash=sha256-YnHJJ19wqmibLQdUeq9xzE6CjrMA568KN/lFPuSVs4I%3D' (2025-01-23)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/5df43628fdf08d642be8ba5b3625a6c70731c19c?narHash=sha256-Tbk1MZbtV2s5aG%2BiM99U8FqwxU/YNArMcWAv6clcsBc%3D' (2025-01-16)
  → 'github:NixOS/nixpkgs/0aa475546ed21629c4f5bbf90e38c846a99ec9e9?narHash=sha256-38J9QfeGSej341ouwzqf77WIHAScihAKCt8PQJ%2BNH28%3D' (2025-01-23)
• Updated input 'pre-commit-hooks':
    'github:cachix/git-hooks.nix/15a87cedeb67e3dbc8d2f7b9831990dffcf4e69f?narHash=sha256-2UNmLCKORvdBRhPGI8Vx0b6l7M8/QBey/nHLIxOl4jE%3D' (2025-01-19)
  → 'github:cachix/git-hooks.nix/9364dc02281ce2d37a1f55b6e51f7c0f65a75f17?narHash=sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg%3D' (2025-01-21)
2025-01-25 11:10:03 +00:00
68632fcfe6 music-assistant: init
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m47s
2025-01-20 21:43:06 +00:00
132e005654 zigbee2mqtt: prepare for 2.0.0
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m58s
The next release contains some breaking changes:
https://github.com/Koenkk/zigbee2mqtt/discussions/24198
2025-01-19 20:39:46 +00:00
7ada93c5b4 flake.lock: Update
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m20s
Flake lock file updates:

• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/b678606690027913f3434dea3864e712b862dde5?narHash=sha256-oMr3PVIQ8XPDI8/x6BHxsWEPBRU98Pam6KGVwUh8MPk%3D' (2025-01-15)
  → 'github:NixOS/nixos-hardware/cb3173dc5c746fa95bca1f035a7e4d2b588894ac?narHash=sha256-%2BX9KAryvDsIE7lQ0FdfiD1u33nOVgsgufedqspf77N4%3D' (2025-01-19)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/e24b4c09e963677b1beea49d411cd315a024ad3a?narHash=sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ%3D' (2025-01-15)
  → 'github:NixOS/nixpkgs/6a3ae7a5a12fb8cac2d59d7df7cbd95f9b2f0566?narHash=sha256-s40Kk/OulP3J/1JvC3VT16U4r/Xw6Qdi7SRw3LYkPWs%3D' (2025-01-18)
• Updated input 'nixvim':
    'github:nix-community/nixvim/c2ee71c814c9427d4991b9d58d412add9c5a1c56?narHash=sha256-Lq7PWAD%2BedeIpZKM7aresrwON%2BTdo3OMu1S2YX8AjjM%3D' (2025-01-17)
  → 'github:nix-community/nixvim/abcbd250b8a2c7aab1f4b2b9e01598ee24b42337?narHash=sha256-FyHmM6vvz%2BUxCrPZo/poIaZBZejLHVKkAH4cjtUxZDA%3D' (2025-01-19)
• Updated input 'nixvim/git-hooks':
    'github:cachix/git-hooks.nix/a5a961387e75ae44cc20f0a57ae463da5e959656?narHash=sha256-3FZAG%2BpGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110%3D' (2025-01-03)
  → 'github:cachix/git-hooks.nix/94ee657f6032d913fe0ef49adaa743804635b0bb?narHash=sha256-I/OuxGwXwRi5gnFPsyCvVR%2BIfFstA%2BQXEpHu1hvsgD8%3D' (2025-01-16)
• Updated input 'nixvim/nix-darwin':
    'github:lnl7/nix-darwin/57733bd1dc81900e13438e5b4439239f1b29db0e?narHash=sha256-iWcjToBpx4PUd74uqvIGAfqqVfyrvRLRauC/SxEKIF0%3D' (2025-01-08)
  → 'github:lnl7/nix-darwin/944c2b181792ae7ae6b20c0df3f44879c11706c9?narHash=sha256-SDuKLOWAh8VJRXlNWQn9QE99bjeEUAAbYXqrKGbsiyk%3D' (2025-01-14)
• Updated input 'nixvim/treefmt-nix':
    'github:numtide/treefmt-nix/13c913f5deb3a5c08bb810efd89dc8cb24dd968b?narHash=sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw%3D' (2025-01-06)
  → 'github:numtide/treefmt-nix/d1ed3b385f8130e392870cfb1dbfaff8a63a1899?narHash=sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc%3D' (2025-01-17)
• Updated input 'pre-commit-hooks':
    'github:cachix/git-hooks.nix/94ee657f6032d913fe0ef49adaa743804635b0bb?narHash=sha256-I/OuxGwXwRi5gnFPsyCvVR%2BIfFstA%2BQXEpHu1hvsgD8%3D' (2025-01-16)
  → 'github:cachix/git-hooks.nix/15a87cedeb67e3dbc8d2f7b9831990dffcf4e69f?narHash=sha256-2UNmLCKORvdBRhPGI8Vx0b6l7M8/QBey/nHLIxOl4jE%3D' (2025-01-19)
2025-01-19 17:48:23 +00:00
fd49cc75b1 Use home-assistant module on pi host
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m13s
2025-01-19 14:38:28 +00:00
242d87fbf7 Add home-assistant module 2025-01-19 14:38:28 +00:00
87ec801acf Add ha-floorplan package 2025-01-19 14:23:38 +00:00
84105829b1 Add default user to audio group 2025-01-19 14:22:23 +00:00
00d8cdf92b treewide: fix whitespace
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m12s
2025-01-19 13:19:45 +00:00
0473348ad2 Remove dead code
Some checks failed
Check flake / build-amd64-linux (push) Failing after 3m0s
2025-01-19 12:58:39 +00:00
5a8b6bc354 Add pre-commit check and devShell
Some checks failed
Check flake / build-amd64-linux (push) Failing after 3m9s
2025-01-19 12:48:45 +00:00
ccb57f954e treewide: format
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m53s
2025-01-19 11:13:04 +00:00
c3283314b7 Add formatter and pre-commit hooks 2025-01-19 11:02:07 +00:00
328a50c365 Refactor modules into nixos and home-manager
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
2025-01-19 01:22:43 +00:00
b00cd5c2b3 Move modules inside /nixos 2025-01-19 00:04:10 +00:00
404e747037 flake.lock: Update
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m36s
Flake lock file updates:

• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/eb62e6aa39ea67e0b8018ba8ea077efe65807dc8?narHash=sha256-uQ%2BNQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140%3D' (2025-01-14)
  → 'github:NixOS/nixpkgs/5df43628fdf08d642be8ba5b3625a6c70731c19c?narHash=sha256-Tbk1MZbtV2s5aG%2BiM99U8FqwxU/YNArMcWAv6clcsBc%3D' (2025-01-16)
• Updated input 'nixvim':
    'github:nix-community/nixvim/2004ff4547f11d25da78f393fe797dde2b831ce7?narHash=sha256-G6/9vT12RAxkNWQPEX9p8tTx/i8jJcmISpbVDGbEPGc%3D' (2025-01-11)
  → 'github:nix-community/nixvim/c2ee71c814c9427d4991b9d58d412add9c5a1c56?narHash=sha256-Lq7PWAD%2BedeIpZKM7aresrwON%2BTdo3OMu1S2YX8AjjM%3D' (2025-01-17)
2025-01-17 22:43:05 +00:00
ee346f40b3 Use nodejs 22
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m41s
2025-01-16 23:18:43 +00:00
f237ba2c0b flake.lock: Update
Flake lock file updates:

• Updated input 'agenix':
    'github:ryantm/agenix/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41?narHash=sha256-b%2Buqzj%2BWa6xgMS9aNbX4I%2BsXeb5biPDi39VgvSFqFvU%3D' (2024-08-10)
  → 'github:ryantm/agenix/e600439ec4c273cf11e06fe4d9d906fb98fa097c?narHash=sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA%3D' (2025-01-15)
• Updated input 'disko':
    'github:nix-community/disko/cb6297acebb15ebffef7d36b4b880b9dfe15638e?narHash=sha256-y1Y5vcr%2B9fHV2x1VRYFuJkpfE1cB/5FyeeO4Xwff7mY%3D' (2025-01-11)
  → 'github:nix-community/disko/bf0abfde48f469c256f2b0f481c6281ff04a5db2?narHash=sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk%3D' (2025-01-16)
• Updated input 'firefox-gnome-theme':
    'github:rafaelmardojai/firefox-gnome-theme/a5029a0797d9ab4d5a20f223cacddd70e3748dc8?narHash=sha256-mRE/foGagh2XarMerOXtgldpxiCb/dQa7tHOpPpP2Zw%3D' (2025-01-07)
  → 'github:rafaelmardojai/firefox-gnome-theme/91ca1f82d717b02ceb03a3f423cbe8082ebbb26d?narHash=sha256-S79Hqn2EtSxU4kp99t8tRschSifWD4p/51%2B%2B0xNWUxw%3D' (2025-01-15)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/8870dcaff63dfc6647fb10648b827e9d40b0a337?narHash=sha256-OL7leZ6KBhcDF3nEKe4aZVfIm6xQpb1Kb%2BmxySIP93o%3D' (2025-01-09)
  → 'github:NixOS/nixos-hardware/b678606690027913f3434dea3864e712b862dde5?narHash=sha256-oMr3PVIQ8XPDI8/x6BHxsWEPBRU98Pam6KGVwUh8MPk%3D' (2025-01-15)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/3f0a8ac25fb674611b98089ca3a5dd6480175751?narHash=sha256-JO%2BlFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I%3D' (2025-01-06)
  → 'github:NixOS/nixpkgs/e24b4c09e963677b1beea49d411cd315a024ad3a?narHash=sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ%3D' (2025-01-15)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/bffc22eb12172e6db3c5dde9e3e5628f8e3e7912?narHash=sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc%2Bc2c%3D' (2025-01-08)
  → 'github:NixOS/nixpkgs/eb62e6aa39ea67e0b8018ba8ea077efe65807dc8?narHash=sha256-uQ%2BNQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140%3D' (2025-01-14)
• Updated input 'nixvim':
    'github:nix-community/nixvim/6bd1c7c5927fa9fdfdfd68f5aa772e6a62b9d779?narHash=sha256-Syew%2B5yuzysUr07SrGD%2BGRfZjE11h36TSYbxzEHYyyc%3D' (2025-01-04)
  → 'github:nix-community/nixvim/2004ff4547f11d25da78f393fe797dde2b831ce7?narHash=sha256-G6/9vT12RAxkNWQPEX9p8tTx/i8jJcmISpbVDGbEPGc%3D' (2025-01-11)
• Updated input 'nixvim/flake-parts':
    'github:hercules-ci/flake-parts/f2f7418ce0ab4a5309a4596161d154cfc877af66?narHash=sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq%2BraipRI%3D' (2025-01-01)
  → 'github:hercules-ci/flake-parts/b905f6fc23a9051a6e1b741e1438dbfc0634c6de?narHash=sha256-%2Bhu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU%3D' (2025-01-06)
• Updated input 'nixvim/home-manager':
    'github:nix-community/home-manager/613691f285dad87694c2ba1c9e6298d04736292d?narHash=sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM%3D' (2024-12-28)
  → 'github:nix-community/home-manager/bd65bc3cde04c16755955630b344bc9e35272c56?narHash=sha256-dinzAqCjenWDxuy%2BMqUQq0I4zUSfaCvN9rzuCmgMZJY%3D' (2025-01-08)
• Updated input 'nixvim/nix-darwin':
    'github:lnl7/nix-darwin/3feaf376d75d3d58ebf7e9a4f584d00628548ad9?narHash=sha256-svzx3yVXD5tbBJZCn3Lt1RriH8GHo6CyVUPTHejf7sU%3D' (2025-01-04)
  → 'github:lnl7/nix-darwin/57733bd1dc81900e13438e5b4439239f1b29db0e?narHash=sha256-iWcjToBpx4PUd74uqvIGAfqqVfyrvRLRauC/SxEKIF0%3D' (2025-01-08)
• Updated input 'nixvim/treefmt-nix':
    'github:numtide/treefmt-nix/29806abab803e498df96d82dd6f34b32eb8dd2c8?narHash=sha256-1hKMRIT%2BQZNWX46e4gIovoQ7H8QRb7803ZH4qSKI45o%3D' (2025-01-03)
  → 'github:numtide/treefmt-nix/13c913f5deb3a5c08bb810efd89dc8cb24dd968b?narHash=sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw%3D' (2025-01-06)
2025-01-16 16:30:03 +00:00
33ba1c7ebe flake.lock: Update
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m59s
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/49f8aa791f81ff2402039b3efe0c35b9386c4bcf?narHash=sha256-TdU0a/x8048rbbJmkKWzSY1CtsbbGKNkIJcMdr8Zf4Q%3D' (2025-01-06)
  → 'github:nix-community/disko/cb6297acebb15ebffef7d36b4b880b9dfe15638e?narHash=sha256-y1Y5vcr%2B9fHV2x1VRYFuJkpfE1cB/5FyeeO4Xwff7mY%3D' (2025-01-11)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/4f339f6be2b61662f957c2ee9eda0fa597d8a6d6?narHash=sha256-BG1FfTexFwNty5VhYjaQLMR6CMPfI3QRcaZrFQYu2EM%3D' (2025-01-07)
  → 'github:NixOS/nixos-hardware/8870dcaff63dfc6647fb10648b827e9d40b0a337?narHash=sha256-OL7leZ6KBhcDF3nEKe4aZVfIm6xQpb1Kb%2BmxySIP93o%3D' (2025-01-09)
• Updated input 'plasma-manager':
    'github:nix-community/plasma-manager/d16bbded0ae452bc088489e7dca3ef58d8d1830b?narHash=sha256-fWUd9kyXdepphJ7cCzOsuSo7l0kbFCkUqfgKqZyFZzE%3D' (2024-12-24)
  → 'github:nix-community/plasma-manager/a53af7f1514ef4cce8620a9d6a50f238cdedec8b?narHash=sha256-XzwkB62Tt5UYoL1jXiHzgk/qz2fUpGHExcSIbyGTtI0%3D' (2025-01-10)
2025-01-11 10:34:24 +00:00
ebb790a20d flake.lock: Update
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m54s
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/76816af65d5294761636a838917e335992a52e0c?narHash=sha256-OT%2BsF4eNDFN/OdyUfIQwyp28%2BCFQL7PAdWn0wGU7F0U%3D' (2025-01-06)
  → 'github:nix-community/disko/49f8aa791f81ff2402039b3efe0c35b9386c4bcf?narHash=sha256-TdU0a/x8048rbbJmkKWzSY1CtsbbGKNkIJcMdr8Zf4Q%3D' (2025-01-06)
• Updated input 'firefox-gnome-theme':
    'github:rafaelmardojai/firefox-gnome-theme/0d7c992b33b70ecabf734532beb6aefd2f883fe2?narHash=sha256-ptbARQ03Y1s2W8MYOQG7AjkD1HL/Pypayj7Nxdk8pns%3D' (2025-01-05)
  → 'github:rafaelmardojai/firefox-gnome-theme/a5029a0797d9ab4d5a20f223cacddd70e3748dc8?narHash=sha256-mRE/foGagh2XarMerOXtgldpxiCb/dQa7tHOpPpP2Zw%3D' (2025-01-07)
• Updated input 'home-manager':
    'github:nix-community/home-manager/613691f285dad87694c2ba1c9e6298d04736292d?narHash=sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM%3D' (2024-12-28)
  → 'github:nix-community/home-manager/bd65bc3cde04c16755955630b344bc9e35272c56?narHash=sha256-dinzAqCjenWDxuy%2BMqUQq0I4zUSfaCvN9rzuCmgMZJY%3D' (2025-01-08)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/7c674c6734f61157e321db595dbfcd8523e04e19?narHash=sha256-e5IOgjQf0SZcFCEV/gMGrsI0gCJyqOKShBQU0iiM3Kg%3D' (2024-12-28)
  → 'github:NixOS/nixos-hardware/4f339f6be2b61662f957c2ee9eda0fa597d8a6d6?narHash=sha256-BG1FfTexFwNty5VhYjaQLMR6CMPfI3QRcaZrFQYu2EM%3D' (2025-01-07)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/cbd8ec4de4469333c82ff40d057350c30e9f7d36?narHash=sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60%3D' (2025-01-05)
  → 'github:NixOS/nixpkgs/3f0a8ac25fb674611b98089ca3a5dd6480175751?narHash=sha256-JO%2BlFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I%3D' (2025-01-06)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/8f3e1f807051e32d8c95cd12b9b421623850a34d?narHash=sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs%2BrI%3D' (2025-01-04)
  → 'github:NixOS/nixpkgs/bffc22eb12172e6db3c5dde9e3e5628f8e3e7912?narHash=sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc%2Bc2c%3D' (2025-01-08)
2025-01-09 10:27:42 +00:00
ec20e57c4c flake.lock: Update
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/84a5b93637cc16cbfcc61b6e1684d626df61eb21?narHash=sha256-2dt1nOe9zf9pDkf5Kn7FUFyPRo581s0n90jxYXJ94l0%3D' (2024-12-29)
  → 'github:nix-community/disko/76816af65d5294761636a838917e335992a52e0c?narHash=sha256-OT%2BsF4eNDFN/OdyUfIQwyp28%2BCFQL7PAdWn0wGU7F0U%3D' (2025-01-06)
• Updated input 'firefox-gnome-theme':
    'github:rafaelmardojai/firefox-gnome-theme/097c98cb4a7568f6f83a43e37950c08b575dd126?narHash=sha256-U9WjPisByrvw8Kt6Ufg9kLrvg7uHPsFSyG93GR3I1iE%3D' (2024-12-29)
  → 'github:rafaelmardojai/firefox-gnome-theme/0d7c992b33b70ecabf734532beb6aefd2f883fe2?narHash=sha256-ptbARQ03Y1s2W8MYOQG7AjkD1HL/Pypayj7Nxdk8pns%3D' (2025-01-05)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/edf04b75c13c2ac0e54df5ec5c543e300f76f1c9?narHash=sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0%3D' (2024-12-31)
  → 'github:NixOS/nixpkgs/cbd8ec4de4469333c82ff40d057350c30e9f7d36?narHash=sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60%3D' (2025-01-05)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/88195a94f390381c6afcdaa933c2f6ff93959cb4?narHash=sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs%3D' (2024-12-29)
  → 'github:NixOS/nixpkgs/8f3e1f807051e32d8c95cd12b9b421623850a34d?narHash=sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs%2BrI%3D' (2025-01-04)
• Updated input 'nixvim':
    'github:nix-community/nixvim/c8fa65c6ac35dba157de0873d645ab398c370123?narHash=sha256-3co5A7PUEN%2BBm7b3/6BxFsmvplg3XYUNR2MzWnheZoE%3D' (2024-12-28)
  → 'github:nix-community/nixvim/6bd1c7c5927fa9fdfdfd68f5aa772e6a62b9d779?narHash=sha256-Syew%2B5yuzysUr07SrGD%2BGRfZjE11h36TSYbxzEHYyyc%3D' (2025-01-04)
• Updated input 'nixvim/devshell':
    'github:numtide/devshell/dd6b80932022cea34a019e2bb32f6fa9e494dfef?narHash=sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg%3D' (2024-10-07)
  → 'github:numtide/devshell/f7795ede5b02664b57035b3b757876703e2c3eac?narHash=sha256-tO3HrHriyLvipc4xr%2BEwtdlo7wM1OjXNjlWRgmM7peY%3D' (2024-12-31)
• Updated input 'nixvim/flake-parts':
    'github:hercules-ci/flake-parts/205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9?narHash=sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c%3D' (2024-12-04)
  → 'github:hercules-ci/flake-parts/f2f7418ce0ab4a5309a4596161d154cfc877af66?narHash=sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq%2BraipRI%3D' (2025-01-01)
• Updated input 'nixvim/git-hooks':
    'github:cachix/git-hooks.nix/f0f0dc4920a903c3e08f5bdb9246bb572fcae498?narHash=sha256-ulZN7ps8nBV31SE%2BdwkDvKIzvN6hroRY8sYOT0w%2BE28%3D' (2024-12-21)
  → 'github:cachix/git-hooks.nix/a5a961387e75ae44cc20f0a57ae463da5e959656?narHash=sha256-3FZAG%2BpGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110%3D' (2025-01-03)
• Removed input 'nixvim/git-hooks/nixpkgs-stable'
• Updated input 'nixvim/nix-darwin':
    'github:lnl7/nix-darwin/bc03f7818771a75716966ce8c23110b715eff2aa?narHash=sha256-MoUAbmXz9TEr7zlKDRO56DBJHe30%2B7B5X7nhXm%2BVpc8%3D' (2024-12-26)
  → 'github:lnl7/nix-darwin/3feaf376d75d3d58ebf7e9a4f584d00628548ad9?narHash=sha256-svzx3yVXD5tbBJZCn3Lt1RriH8GHo6CyVUPTHejf7sU%3D' (2025-01-04)
• Updated input 'nixvim/nuschtosSearch':
    'github:NuschtOS/search/3051be7f403bff1d1d380e4612f0c70675b44fc9?narHash=sha256-Y47y%2BLesOCkJaLvj%2BdI/Oa6FAKj/T9sKVKDXLNsViPw%3D' (2024-12-09)
  → 'github:NuschtOS/search/836908e3bddd837ae0f13e215dd48767aee355f0?narHash=sha256-Iv59gMDZajNfezTO0Fw6LHE7uKAShxbvMidmZREit7c%3D' (2025-01-02)
• Updated input 'nixvim/treefmt-nix':
    'github:numtide/treefmt-nix/9e09d30a644c57257715902efbb3adc56c79cf28?narHash=sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q%2BT0BVeZE%3D' (2024-12-25)
  → 'github:numtide/treefmt-nix/29806abab803e498df96d82dd6f34b32eb8dd2c8?narHash=sha256-1hKMRIT%2BQZNWX46e4gIovoQ7H8QRb7803ZH4qSKI45o%3D' (2025-01-03)
2025-01-06 20:15:14 +00:00
113 changed files with 2850 additions and 1428 deletions

View File

@ -52,4 +52,3 @@ tailscale up --login-server https://headscale.vimium.net
then visit the URL, SSH onto `vps1` and run `headscale --user mesh nodes register --key <key>`. then visit the URL, SSH onto `vps1` and run `headscale --user mesh nodes register --key <key>`.
The new node can optionally be given a friendly name with `headscale node rename -i <index> <hostname>`. The new node can optionally be given a friendly name with `headscale node rename -i <index> <hostname>`.

167
flake.lock generated
View File

@ -8,11 +8,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1723293904, "lastModified": 1736955230,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", "narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", "rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -87,11 +87,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1728330715, "lastModified": 1735644329,
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", "rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -107,11 +107,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735468753, "lastModified": 1737038063,
"narHash": "sha256-2dt1nOe9zf9pDkf5Kn7FUFyPRo581s0n90jxYXJ94l0=", "narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "84a5b93637cc16cbfcc61b6e1684d626df61eb21", "rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -123,11 +123,11 @@
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1735511798, "lastModified": 1736899990,
"narHash": "sha256-U9WjPisByrvw8Kt6Ufg9kLrvg7uHPsFSyG93GR3I1iE=", "narHash": "sha256-S79Hqn2EtSxU4kp99t8tRschSifWD4p/51++0xNWUxw=",
"owner": "rafaelmardojai", "owner": "rafaelmardojai",
"repo": "firefox-gnome-theme", "repo": "firefox-gnome-theme",
"rev": "097c98cb4a7568f6f83a43e37950c08b575dd126", "rev": "91ca1f82d717b02ceb03a3f423cbe8082ebbb26d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -182,6 +182,22 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
} }
}, },
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@ -190,11 +206,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733312601, "lastModified": 1736143030,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -231,18 +247,14 @@
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1734797603, "lastModified": 1737043064,
"narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=", "narHash": "sha256-I/OuxGwXwRi5gnFPsyCvVR+IfFstA+QXEpHu1hvsgD8=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498", "rev": "94ee657f6032d913fe0ef49adaa743804635b0bb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -290,6 +302,27 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_2": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -318,11 +351,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735344290, "lastModified": 1736373539,
"narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "613691f285dad87694c2ba1c9e6298d04736292d", "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -340,11 +373,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735344290, "lastModified": 1736373539,
"narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "613691f285dad87694c2ba1c9e6298d04736292d", "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -406,26 +439,27 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735218083, "lastModified": 1736820923,
"narHash": "sha256-MoUAbmXz9TEr7zlKDRO56DBJHe30+7B5X7nhXm+Vpc8=", "narHash": "sha256-SDuKLOWAh8VJRXlNWQn9QE99bjeEUAAbYXqrKGbsiyk=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "bc03f7818771a75716966ce8c23110b715eff2aa", "rev": "944c2b181792ae7ae6b20c0df3f44879c11706c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lnl7", "owner": "lnl7",
"ref": "nix-darwin-24.11",
"repo": "nix-darwin", "repo": "nix-darwin",
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1735388221, "lastModified": 1737751639,
"narHash": "sha256-e5IOgjQf0SZcFCEV/gMGrsI0gCJyqOKShBQU0iiM3Kg=", "narHash": "sha256-ZEbOJ9iT72iwqXsiEMbEa8wWjyFvRA9Ugx8utmYbpz4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "7c674c6734f61157e321db595dbfcd8523e04e19", "rev": "dfad538f751a5aa5d4436d9781ab27a6128ec9d4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -444,11 +478,11 @@
"nixpkgs-24_11": "nixpkgs-24_11" "nixpkgs-24_11": "nixpkgs-24_11"
}, },
"locked": { "locked": {
"lastModified": 1735230346, "lastModified": 1737201600,
"narHash": "sha256-zgR8NTiNDPVNrfaiOlB9yHSmCqFDo7Ks2IavaJ2dZo4=", "narHash": "sha256-JBh5+g8oQteQdQqbO07dGHBRQo/NGI61JPlTjdfQ1pk=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "dc0569066e79ae96184541da6fa28f35a33fbf7b", "rev": "ade37b2765032f83d2d4bd50b6204a40a4c05eb4",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -490,11 +524,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1735471104, "lastModified": 1737632463,
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "narHash": "sha256-38J9QfeGSej341ouwzqf77WIHAScihAKCt8PQJ+NH28=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "rev": "0aa475546ed21629c4f5bbf90e38c846a99ec9e9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -521,11 +555,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1735669367, "lastModified": 1737672001,
"narHash": "sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0=", "narHash": "sha256-YnHJJ19wqmibLQdUeq9xzE6CjrMA568KN/lFPuSVs4I=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "edf04b75c13c2ac0e54df5ec5c543e300f76f1c9", "rev": "035f8c0853c2977b24ffc4d0a42c74f00b182cd8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -549,11 +583,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1735389157, "lastModified": 1737283156,
"narHash": "sha256-3co5A7PUEN+Bm7b3/6BxFsmvplg3XYUNR2MzWnheZoE=", "narHash": "sha256-FyHmM6vvz+UxCrPZo/poIaZBZejLHVKkAH4cjtUxZDA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "c8fa65c6ac35dba157de0873d645ab398c370123", "rev": "abcbd250b8a2c7aab1f4b2b9e01598ee24b42337",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -573,11 +607,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733773348, "lastModified": 1735854821,
"narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=", "narHash": "sha256-Iv59gMDZajNfezTO0Fw6LHE7uKAShxbvMidmZREit7c=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9", "rev": "836908e3bddd837ae0f13e215dd48767aee355f0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -596,11 +630,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735049224, "lastModified": 1736549395,
"narHash": "sha256-fWUd9kyXdepphJ7cCzOsuSo7l0kbFCkUqfgKqZyFZzE=", "narHash": "sha256-XzwkB62Tt5UYoL1jXiHzgk/qz2fUpGHExcSIbyGTtI0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "plasma-manager", "repo": "plasma-manager",
"rev": "d16bbded0ae452bc088489e7dca3ef58d8d1830b", "rev": "a53af7f1514ef4cce8620a9d6a50f238cdedec8b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -609,6 +643,28 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_4",
"gitignore": "gitignore_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1737465171,
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
@ -624,6 +680,7 @@
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim", "nixvim": "nixvim",
"plasma-manager": "plasma-manager", "plasma-manager": "plasma-manager",
"pre-commit-hooks": "pre-commit-hooks",
"secrets": "secrets", "secrets": "secrets",
"thunderbird-gnome-theme": "thunderbird-gnome-theme" "thunderbird-gnome-theme": "thunderbird-gnome-theme"
} }
@ -713,11 +770,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735135567, "lastModified": 1737103437,
"narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=", "narHash": "sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "9e09d30a644c57257715902efbb3adc56c79cf28", "rev": "d1ed3b385f8130e392870cfb1dbfaff8a63a1899",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -41,6 +41,10 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager"; inputs.home-manager.follows = "home-manager";
}; };
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
secrets = { secrets = {
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git"; url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
flake = false; flake = false;
@ -51,12 +55,12 @@
}; };
}; };
outputs = inputs @ { self, nixpkgs, ... }: outputs =
inputs@{ self, nixpkgs, ... }:
let let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
domain = "mesh.vimium.net"; domain = "mesh.vimium.net";
forEverySystem = lib.getAttrs lib.systems.flakeExposed;
forEachSystem = lib.genAttrs [ forEachSystem = lib.genAttrs [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" "aarch64-linux"
@ -66,7 +70,11 @@
profiles.system = { profiles.system = {
user = "root"; user = "root";
path = inputs.deploy-rs.lib.${self.nixosConfigurations.${hostName}.config.system.build.toplevel.system}.activate.nixos self.nixosConfigurations.${hostName}; path =
inputs.deploy-rs.lib.${
self.nixosConfigurations.${hostName}.config.system.build.toplevel.system
}.activate.nixos
self.nixosConfigurations.${hostName};
}; };
}; };
in in
@ -76,16 +84,19 @@
directory = ./overlays; directory = ./overlays;
}; };
legacyPackages = forEachSystem (system: legacyPackages = forEachSystem (
system:
lib.packagesFromDirectoryRecursive { lib.packagesFromDirectoryRecursive {
callPackage = nixpkgs.legacyPackages.${system}.callPackage; callPackage = nixpkgs.legacyPackages.${system}.callPackage;
directory = ./pkgs; directory = ./pkgs;
}); }
);
nixosConfigurations = lib.pipe ./hosts [ nixosConfigurations = lib.pipe ./hosts [
builtins.readDir builtins.readDir
(lib.filterAttrs (name: value: value == "directory")) (lib.filterAttrs (name: value: value == "directory"))
(lib.mapAttrs (name: value: (lib.mapAttrs (
name: value:
lib.nixosSystem { lib.nixosSystem {
specialArgs = { inherit self; }; specialArgs = { inherit self; };
@ -98,15 +109,46 @@
} }
./hosts/${name} ./hosts/${name}
]; ];
})) }
))
]; ];
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell { checks =
buildInputs = [ builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib
inputs.agenix.packages.x86_64-linux.agenix // (forEachSystem (system: {
inputs.deploy-rs.packages.x86_64-linux.deploy-rs pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
]; src = ./.;
}; hooks = {
check-case-conflicts.enable = true;
check-executables-have-shebangs.enable = true;
check-merge-conflicts.enable = true;
deadnix = {
enable = true;
settings = {
noLambdaArg = true;
};
};
detect-private-keys.enable = true;
end-of-file-fixer.enable = true;
fix-byte-order-marker.enable = true;
mixed-line-endings.enable = true;
nixfmt-rfc-style.enable = true;
trim-trailing-whitespace.enable = true;
};
};
}));
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
devShells = forEachSystem (system: {
default = nixpkgs.legacyPackages.${system}.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = [
inputs.agenix.packages.${system}.agenix
inputs.deploy-rs.packages.${system}.deploy-rs
] ++ self.checks.${system}.pre-commit-check.enabledPackages;
};
});
deploy = { deploy = {
magicRollback = true; magicRollback = true;
@ -119,8 +161,5 @@
"vps1" "vps1"
] mkDeployNode; ] mkDeployNode;
}; };
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
}; };
} }

View File

@ -1,4 +1,4 @@
{ config, ... }: { ... }:
{ {
imports = [ imports = [
@ -22,29 +22,22 @@
users.extraGroups.vboxusers.members = [ "jordan" ]; users.extraGroups.vboxusers.members = [ "jordan" ];
modules = { modules = {
desktop = { programs = {
apps = { dev = {
qbittorrent.enable = true; node.enable = true;
thunderbird.enable = true;
}; };
browsers = { firefox.enable = true;
firefox.enable = true; git.enable = true;
}; gpg.enable = true;
media.graphics = { graphics = {
raster.enable = true; raster.enable = true;
vector.enable = true; vector.enable = true;
}; };
office.libreoffice.enable = true; libreoffice.enable = true;
};
dev = {
node.enable = true;
};
editors = {
neovim.enable = true; neovim.enable = true;
};
security = {
gpg.enable = true;
pass.enable = true; pass.enable = true;
qbittorrent.enable = true;
thunderbird.enable = true;
}; };
services = { services = {
borgmatic = { borgmatic = {
@ -56,7 +49,6 @@
}; };
}; };
shell = { shell = {
git.enable = true;
zsh.enable = true; zsh.enable = true;
}; };
}; };

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -6,7 +11,14 @@
]; ];
boot = { boot = {
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ]; initrd.kernelModules = [ ];
initrd.supportedFilesystems = [ "zfs" ]; initrd.supportedFilesystems = [ "zfs" ];
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];

View File

@ -1,20 +1,23 @@
{ config, pkgs, self, ... }: {
pkgs,
self,
...
}:
{ {
imports = [ imports = [
self.inputs.agenix.nixosModules.age self.inputs.agenix.nixosModules.age
self.inputs.home-manager.nixosModule self.inputs.home-manager.nixosModule
../modules ../modules/home-manager
../modules/nixos
]; ];
nixpkgs.overlays = [ nixpkgs.overlays = [
self.inputs.agenix.overlays.default self.inputs.agenix.overlays.default
(import ../overlays/default.nix) (import ../overlays/default.nix)
( (final: prev: {
final: prev: { unstable = import self.inputs.nixpkgs-unstable { system = final.system; };
unstable = import self.inputs.nixpkgs-unstable { system = final.system; }; })
}
)
]; ];
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
@ -65,7 +68,10 @@
system = "aarch64-linux"; system = "aarch64-linux";
maxJobs = 6; maxJobs = 6;
speedFactor = 1; speedFactor = 1;
supportedFeatures = [ "big-parallel" "benchmark" ]; supportedFeatures = [
"big-parallel"
"benchmark"
];
} }
]; ];
distributedBuilds = true; distributedBuilds = true;

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [
@ -48,12 +48,19 @@
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
noto-fonts noto-fonts
(nerdfonts.override { fonts = [ "BigBlueTerminal" "ComicShannsMono" "Terminus" "UbuntuMono" ]; }) (nerdfonts.override {
fonts = [
"BigBlueTerminal"
"ComicShannsMono"
"Terminus"
"UbuntuMono"
];
})
]; ];
modules = { modules = {
desktop.gnome.enable = true; system.desktop.gnome.enable = true;
networking.tailscale.enable = true; services.tailscale.enable = true;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -1,4 +1,4 @@
{ config, ... }: { ... }:
{ {
imports = [ imports = [
@ -25,24 +25,18 @@
}; };
modules = { modules = {
desktop = { programs = {
apps.qbittorrent.enable = true; dev = {
browsers = { node.enable = true;
firefox.enable = true;
}; };
}; firefox.enable = true;
dev = { git.enable = true;
node.enable = true;
};
editors = {
neovim.enable = true;
};
security = {
gpg.enable = true; gpg.enable = true;
neovim.enable = true;
pass.enable = true; pass.enable = true;
qbittorrent.enable = true;
}; };
shell = { shell = {
git.enable = true;
zsh.enable = true; zsh.enable = true;
}; };
}; };

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -6,7 +11,13 @@
]; ];
boot = { boot = {
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; initrd.availableKernelModules = [
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
initrd.supportedFilesystems = [ "zfs" ]; initrd.supportedFilesystems = [ "zfs" ];
kernel.sysctl = { kernel.sysctl = {
"kernel.nmi_watchdog" = 0; "kernel.nmi_watchdog" = 0;

View File

@ -1,4 +1,4 @@
{ config, ... }: { ... }:
{ {
imports = [ imports = [
@ -22,21 +22,16 @@
}; };
modules = { modules = {
desktop = { programs = {
apps.qbittorrent.enable = true; dev = {
browsers = { node.enable = true;
firefox.enable = true;
}; };
}; firefox.enable = true;
dev = { git.enable = true;
node.enable = true;
};
editors = {
neovim.enable = true;
};
security = {
gpg.enable = true; gpg.enable = true;
neovim.enable = true;
pass.enable = true; pass.enable = true;
qbittorrent.enable = true;
}; };
services = { services = {
borgmatic = { borgmatic = {
@ -48,7 +43,6 @@
}; };
}; };
shell = { shell = {
git.enable = true;
zsh.enable = true; zsh.enable = true;
}; };
}; };

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -6,7 +11,15 @@
]; ];
boot = { boot = {
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "zfs" ]; initrd.availableKernelModules = [
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
"zfs"
];
initrd.kernelModules = [ ]; initrd.kernelModules = [ ];
initrd.supportedFilesystems = [ "zfs" ]; initrd.supportedFilesystems = [ "zfs" ];
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];

View File

@ -15,7 +15,7 @@ index d5a8182cf..be722c43a 100644
@@ -449,6 +449,63 @@ static void setup_graphics(struct boot_params *boot_params) @@ -449,6 +449,63 @@ static void setup_graphics(struct boot_params *boot_params)
} }
} }
+typedef struct { +typedef struct {
+ u64 version; + u64 version;
+ void (*set_os_version) (const char *os_version); + void (*set_os_version) (const char *os_version);
@ -73,13 +73,13 @@ index d5a8182cf..be722c43a 100644
+ +
+ return status; + return status;
+} +}
static void __noreturn efi_exit(efi_handle_t handle, efi_status_t status) static void __noreturn efi_exit(efi_handle_t handle, efi_status_t status)
{ {
@@ -951,6 +1008,8 @@ void __noreturn efi_stub_entry(efi_handle_t handle, @@ -951,6 +1008,8 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
setup_unaccepted_memory(); setup_unaccepted_memory();
+ apple_set_os(); + apple_set_os();
+ +
status = exit_boot(boot_params, handle); status = exit_boot(boot_params, handle);
@ -97,6 +97,5 @@ index d59b0947f..81158014f 100644
#define EFI_TCG2_PROTOCOL_GUID EFI_GUID(0x607f766c, 0x7455, 0x42be, 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f) #define EFI_TCG2_PROTOCOL_GUID EFI_GUID(0x607f766c, 0x7455, 0x42be, 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f)
#define EFI_TCG2_FINAL_EVENTS_TABLE_GUID EFI_GUID(0x1e2ed096, 0x30e2, 0x4254, 0xbd, 0x89, 0x86, 0x3b, 0xbe, 0xf8, 0x23, 0x25) #define EFI_TCG2_FINAL_EVENTS_TABLE_GUID EFI_GUID(0x1e2ed096, 0x30e2, 0x4254, 0xbd, 0x89, 0x86, 0x3b, 0xbe, 0xf8, 0x23, 0x25)
#define EFI_LOAD_FILE_PROTOCOL_GUID EFI_GUID(0x56ec3091, 0x954c, 0x11d2, 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) #define EFI_LOAD_FILE_PROTOCOL_GUID EFI_GUID(0x56ec3091, 0x954c, 0x11d2, 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
-- --
2.42.0 2.42.0

View File

@ -1,4 +1,9 @@
{ config, lib, self, ... }: {
config,
lib,
self,
...
}:
{ {
imports = [ imports = [
@ -30,7 +35,7 @@
videoDrivers = [ "nvidia" ]; videoDrivers = [ "nvidia" ];
}; };
displayManager = { displayManager = {
defaultSession = if config.modules.desktop.kde.enable then "plasmax11" else "gnome-xorg"; defaultSession = if config.modules.system.desktop.kde.enable then "plasmax11" else "gnome-xorg";
sddm.wayland.enable = lib.mkForce false; sddm.wayland.enable = lib.mkForce false;
}; };
}; };
@ -39,26 +44,20 @@
environment.sessionVariables.GSK_RENDERER = "gl"; environment.sessionVariables.GSK_RENDERER = "gl";
modules = { modules = {
desktop = { programs = {
browsers = { dev = {
firefox.enable = true; node.enable = true;
}; };
media.recording = { firefox.enable = true;
git.enable = true;
gpg.enable = true;
neovim.enable = true;
pass.enable = true;
recording = {
audio.enable = true; audio.enable = true;
}; };
}; };
dev = {
node.enable = true;
};
editors = {
neovim.enable = true;
};
security = {
gpg.enable = true;
pass.enable = true;
};
shell = { shell = {
git.enable = true;
zsh.enable = true; zsh.enable = true;
}; };
}; };

View File

@ -1,4 +1,4 @@
{ lib, ... }: { ... }:
{ {
disko.devices = { disko.devices = {
disk = { disk = {
@ -123,4 +123,3 @@
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -6,12 +12,22 @@
]; ];
boot = { boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernel.sysctl = { kernel.sysctl = {
"kernel.nmi_watchdog" = 0; "kernel.nmi_watchdog" = 0;
"vm.laptop_mode" = 5; "vm.laptop_mode" = 5;
}; };
kernelModules = [ "applesmc" "kvm-intel" "wl" ]; kernelModules = [
"applesmc"
"kvm-intel"
"wl"
];
extraModulePackages = [ extraModulePackages = [
config.boot.kernelPackages.broadcom_sta config.boot.kernelPackages.broadcom_sta
config.boot.kernelPackages.nvidiaPackages.legacy_470 config.boot.kernelPackages.nvidiaPackages.legacy_470
@ -38,4 +54,3 @@
}; };
}; };
} }

View File

@ -43,4 +43,3 @@ See [Graham Christensen's article](https://grahamc.com/blog/nixos-on-zfs/#datase
### Networks ### Networks
- DHCP on `10.0.1.0/24` subnet. - DHCP on `10.0.1.0/24` subnet.
- Tailscale on `100.64.0.0/10` subnet. FQDN: `library.mesh.vimium.net`. - Tailscale on `100.64.0.0/10` subnet. FQDN: `library.mesh.vimium.net`.

View File

@ -19,7 +19,7 @@
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [
22 # SSH 22 # SSH
]; ];
}; };
}; };
@ -71,12 +71,14 @@
scrapeConfigs = [ scrapeConfigs = [
{ {
job_name = "node"; job_name = "node";
static_configs = [{ static_configs = [
targets = [ {
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}" targets = [
"127.0.0.1:${toString config.services.prometheus.exporters.zfs.port}" "127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
]; "127.0.0.1:${toString config.services.prometheus.exporters.zfs.port}"
}]; ];
}
];
} }
]; ];
}; };
@ -90,8 +92,8 @@
]; ];
wants = [ "network-online.target" ]; wants = [ "network-online.target" ];
serviceConfig = { serviceConfig = {
Type="simple"; Type = "simple";
ExecStart=pkgs.lib.mkForce '' ExecStart = pkgs.lib.mkForce ''
${pkgs.openssh}/bin/ssh \ ${pkgs.openssh}/bin/ssh \
-NT \ -NT \
-o ExitOnForwardFailure=yes \ -o ExitOnForwardFailure=yes \
@ -101,60 +103,62 @@
-R localhost:8000:localhost:8000 \ -R localhost:8000:localhost:8000 \
jellyfin@vps1.mesh.vimium.net jellyfin@vps1.mesh.vimium.net
''; '';
Restart="always"; Restart = "always";
RestartSec=20; RestartSec = 20;
}; };
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
}; };
services.nginx = let services.nginx =
proxyConfig = '' let
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxyConfig = ''
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Range $http_range; proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range; proxy_set_header If-Range $http_if_range;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
''; '';
in { in
enable = true; {
package = pkgs.openresty; enable = true;
recommendedGzipSettings = true; package = pkgs.openresty;
recommendedOptimisation = true; recommendedGzipSettings = true;
recommendedTlsSettings = true; recommendedOptimisation = true;
clientMaxBodySize = "2G"; recommendedTlsSettings = true;
virtualHosts = { clientMaxBodySize = "2G";
"library.mesh.vimium.net" = { virtualHosts = {
locations."/" = { "library.mesh.vimium.net" = {
root = "/mnt/library"; locations."/" = {
extraConfig = '' root = "/mnt/library";
autoindex on; extraConfig = ''
''; autoindex on;
'';
};
}; };
}; "jellyfin.vimium.com" = {
"jellyfin.vimium.com" = { default = true;
default = true; listen = [
listen = [ {
{ addr = "127.0.0.1";
addr = "127.0.0.1"; port = 8000;
port = 8000; }
} ];
]; locations."/" = {
locations."/" = { proxyPass = "http://localhost:8096";
proxyPass = "http://localhost:8096"; extraConfig = proxyConfig;
extraConfig = proxyConfig; };
}; locations."/metrics" = {
locations."/metrics" = { return = "404";
return = "404"; };
}; };
}; };
}; };
};
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
@ -162,7 +166,10 @@
vaapiVdpau vaapiVdpau
]; ];
}; };
users.users.jellyfin.extraGroups = [ "video" "render" ]; users.users.jellyfin.extraGroups = [
"video"
"render"
];
services.jellyfin = { services.jellyfin = {
enable = true; enable = true;
package = pkgs.unstable.jellyfin; package = pkgs.unstable.jellyfin;
@ -172,7 +179,7 @@
modules = { modules = {
podman.enable = true; podman.enable = true;
security = { programs = {
gpg.enable = true; gpg.enable = true;
}; };
shell = { shell = {
@ -192,4 +199,3 @@
system.stateVersion = "22.11"; system.stateVersion = "22.11";
} }

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -6,7 +11,13 @@
]; ];
boot = { boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ]; initrd.kernelModules = [ ];
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
@ -65,4 +76,3 @@
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -15,4 +15,3 @@ NVMe | `/dev/sda1` (ext4, NixOS Root)
### Networks ### Networks
- DHCP on `10.0.1.0/24` subnet. - DHCP on `10.0.1.0/24` subnet.
- Tailscale on `100.64.0.0/10` subnet. FQDN: `mail.mesh.vimium.net`. - Tailscale on `100.64.0.0/10` subnet. FQDN: `mail.mesh.vimium.net`.

View File

@ -1,4 +1,8 @@
{ config, lib, self, ... }: {
lib,
self,
...
}:
{ {
imports = [ imports = [
@ -15,7 +19,7 @@
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [
22 # SSH 22 # SSH
]; ];
}; };
}; };

View File

@ -1,4 +1,7 @@
{ config, lib, pkgs, modulesPath, ... }: {
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -7,7 +10,12 @@
boot = { boot = {
initrd = { initrd = {
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
"vmw_pvscsi"
];
kernelModules = [ "nvme" ]; kernelModules = [ "nvme" ];
}; };
loader.grub = { loader.grub = {
@ -19,4 +27,3 @@
zramSwap.enable = true; zramSwap.enable = true;
} }

View File

@ -26,7 +26,10 @@
networking = { networking = {
hostId = "c5e68d78"; hostId = "c5e68d78";
networkmanager.enable = true; networkmanager.enable = true;
firewall.trustedInterfaces = [ "lxdbr0" "virbr0" ]; # Work around https://github.com/NixOS/nixpkgs/issues/263359 firewall.trustedInterfaces = [
"lxdbr0"
"virbr0"
]; # Work around https://github.com/NixOS/nixpkgs/issues/263359
}; };
virtualisation = { virtualisation = {
@ -44,50 +47,44 @@
recommendedProxySettings = true; recommendedProxySettings = true;
virtualHosts = { virtualHosts = {
"odyssey.mesh.vimium.net" = { "odyssey.mesh.vimium.net" = {
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; locations."/".proxyPass =
"http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
}; };
}; };
}; };
modules = { modules = {
desktop = { programs = {
apps.qbittorrent.enable = true; dev = {
browsers = { node.enable = true;
firefox.enable = true;
}; };
gaming = { emulators = {
emulators = { gamecube.enable = true;
gamecube.enable = true; ps2.enable = true;
ps2.enable = true; ps3.enable = true;
ps3.enable = true; psp.enable = true;
psp.enable = true; wii.enable = true;
wii.enable = true; xbox.enable = true;
xbox.enable = true;
};
lutris.enable = true;
}; };
media.graphics = { firefox.enable = true;
git.enable = true;
gpg.enable = true;
graphics = {
modeling.enable = true; modeling.enable = true;
raster.enable = true; raster.enable = true;
vector.enable = true; vector.enable = true;
}; };
media.recording = { libreoffice.enable = true;
lutris.enable = true;
pass.enable = true;
neovim.enable = true;
qbittorrent.enable = true;
recording = {
audio.enable = true; audio.enable = true;
video.enable = true; video.enable = true;
}; };
office.libreoffice.enable = true;
};
dev = {
node.enable = true;
};
editors = {
neovim.enable = true;
}; };
hardware.presonus-studio.enable = true; hardware.presonus-studio.enable = true;
security = {
gpg.enable = true;
pass.enable = true;
};
services = { services = {
borgmatic = { borgmatic = {
enable = true; enable = true;
@ -105,7 +102,6 @@
gitea-runner.enable = true; gitea-runner.enable = true;
}; };
shell = { shell = {
git.enable = true;
zsh.enable = true; zsh.enable = true;
}; };
}; };

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -6,7 +12,14 @@
]; ];
boot = { boot = {
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ]; initrd.kernelModules = [ ];
initrd.supportedFilesystems = [ "zfs" ]; initrd.supportedFilesystems = [ "zfs" ];
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];

View File

@ -1,4 +1,8 @@
{ config, lib, pkgs, self, ... }: {
pkgs,
self,
...
}:
{ {
imports = [ imports = [
@ -108,113 +112,8 @@
pulse.enable = true; pulse.enable = true;
}; };
age.secrets."files/services/home-assistant/secrets.yaml" = {
file = "${self.inputs.secrets}/files/services/home-assistant/secrets.yaml.age";
path = "${config.services.home-assistant.configDir}/secrets.yaml";
owner = "hass";
group = "hass";
};
services.home-assistant = {
enable = true;
extraComponents = [
"api"
"alert"
"auth"
"backup"
"command_line"
"default_config"
"homekit_controller"
"homekit"
"http"
"icloud"
"jellyfin"
"metoffice"
"mqtt"
"onkyo"
"ping"
"proximity"
"radio_browser"
"scrape"
"sensor"
"system_health"
];
config = {
default_config = {};
backup = {};
homeassistant = {
name = "Home";
latitude = "!secret latitude";
longitude = "!secret longitude";
country = "GB";
temperature_unit = "C";
time_zone = config.time.timeZone;
unit_system = "metric";
};
mqtt = { };
scene = "!include scenes.yaml";
automation = "!include automations.yaml";
system_health = { };
recorder = {
purge_keep_days = 365;
};
};
};
services.mosquitto = {
enable = true;
listeners = [{
acl = [ "pattern readwrite #" ];
omitPasswordAuth = true;
port = 1883;
settings = {
allow_anonymous = true;
};
}];
};
age.secrets."files/services/zigbee2mqtt/secret.yaml" = {
file = "${self.inputs.secrets}/files/services/zigbee2mqtt/secret.yaml.age";
path = "${config.services.zigbee2mqtt.dataDir}/secret.yaml";
owner = "zigbee2mqtt";
group = "zigbee2mqtt";
};
services.zigbee2mqtt = {
package = pkgs.unstable.zigbee2mqtt;
enable = true;
dataDir = "/var/lib/zigbee2mqtt";
settings = {
homeassistant = lib.optionalAttrs config.services.home-assistant.enable {
discovery_topic = "homeassistant";
status_topic = "hass/status";
legacy_entity_attributes = true;
legacy_triggers = true;
};
availability = true;
frontend = true;
device_options = {
retain = true;
};
serial = {
port = "/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0";
};
advanced = {
channel = 20;
network_key = "!secret.yaml network_key";
pan_id = 13001;
ext_pan_id = [ 79 1 73 47 250 136 124 222 ];
transmit_power = 20;
};
mqtt = {
version = 5;
server = "mqtt://localhost:1883";
};
};
};
modules = { modules = {
networking = { system = {
wireless = { wireless = {
enable = true; enable = true;
interfaces = [ "wlan0" ]; interfaces = [ "wlan0" ];
@ -223,21 +122,20 @@
services = { services = {
borgmatic = { borgmatic = {
enable = true; enable = true;
directories = [
"/var/lib/mosquitto"
"/var/lib/zigbee2mqtt"
];
repoPath = "ssh://qcw86s11@qcw86s11.repo.borgbase.com/./repo"; repoPath = "ssh://qcw86s11@qcw86s11.repo.borgbase.com/./repo";
}; };
home-assistant.enable = true;
}; };
}; };
# Connection to ONKYO HT-R990 # Connection to ONKYO HT-R990
networking.interfaces.end0 = { networking.interfaces.end0 = {
ipv4.addresses = [{ ipv4.addresses = [
address = "172.16.0.1"; {
prefixLength = 30; address = "172.16.0.1";
}]; prefixLength = 30;
}
];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -248,4 +146,3 @@
system.stateVersion = "22.11"; system.stateVersion = "22.11";
} }

View File

@ -1,4 +1,9 @@
{ lib, pkgs, modulesPath, ... }: {
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -6,42 +11,55 @@
]; ];
boot = { boot = {
kernelPackages = let kernelPackages =
version = "6.1.73"; let
tag = "stable_20240124"; version = "6.1.73";
srcHash = "sha256-P4ExzxWqZj+9FZr9U2tmh7rfs/3+iHEv0m74PCoXVuM="; tag = "stable_20240124";
in pkgs.linuxPackagesFor (pkgs.linux_rpi4.override { srcHash = "sha256-P4ExzxWqZj+9FZr9U2tmh7rfs/3+iHEv0m74PCoXVuM=";
argsOverride = { in
src = pkgs.fetchFromGitHub { pkgs.linuxPackagesFor (
owner = "raspberrypi"; pkgs.linux_rpi4.override {
repo = "linux"; argsOverride = {
rev = tag; src = pkgs.fetchFromGitHub {
hash = srcHash; owner = "raspberrypi";
repo = "linux";
rev = tag;
hash = srcHash;
};
version = version;
modDirVersion = version;
structuredExtraConfig = { };
kernelPatches = [
{
name = "drm-rp1-depends-on-instead-of-select-MFD_RP1.patch";
patch = pkgs.fetchpatch {
url = "https://github.com/peat-psuwit/rpi-linux/commit/6de0bb51929cd3ad4fa27b2a421a2af12e6468f5.patch";
hash = "sha256-9pHcbgWTiztu48SBaLPVroUnxnXMKeCGt5vEo9V8WGw=";
};
}
{
name = "iommu-bcm2712-don-t-allow-building-as-module.patch";
patch = pkgs.fetchpatch {
url = "https://github.com/peat-psuwit/rpi-linux/commit/693a5e69bddbcbe1d1b796ebc7581c3597685b1b.patch";
hash = "sha256-8BYYQDM5By8cTk48ASYKJhGVQnZBIK4PXtV70UtfS+A=";
};
}
];
}; };
version = version; }
modDirVersion = version; );
structuredExtraConfig = {};
kernelPatches = [
{
name = "drm-rp1-depends-on-instead-of-select-MFD_RP1.patch";
patch = pkgs.fetchpatch {
url = "https://github.com/peat-psuwit/rpi-linux/commit/6de0bb51929cd3ad4fa27b2a421a2af12e6468f5.patch";
hash = "sha256-9pHcbgWTiztu48SBaLPVroUnxnXMKeCGt5vEo9V8WGw=";
};
}
{
name = "iommu-bcm2712-don-t-allow-building-as-module.patch";
patch = pkgs.fetchpatch {
url = "https://github.com/peat-psuwit/rpi-linux/commit/693a5e69bddbcbe1d1b796ebc7581c3597685b1b.patch";
hash = "sha256-8BYYQDM5By8cTk48ASYKJhGVQnZBIK4PXtV70UtfS+A=";
};
}
];
};
});
# Stop ZFS kernel being built # Stop ZFS kernel being built
supportedFilesystems = lib.mkForce [ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs" ]; supportedFilesystems = lib.mkForce [
"btrfs"
"cifs"
"f2fs"
"jfs"
"ntfs"
"reiserfs"
"vfat"
"xfs"
];
tmp.cleanOnBoot = true; tmp.cleanOnBoot = true;
}; };
@ -49,14 +67,15 @@
# https://github.com/NixOS/nixpkgs/issues/154163 # https://github.com/NixOS/nixpkgs/issues/154163
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
makeModulesClosure = x: makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; });
prev.makeModulesClosure (x // { allowMissing = true; });
}) })
(final: prev: { (final: prev: {
raspberrypifw = let raspberrypifw =
version = "1.20240529"; let
srcHash = "sha256-KsCo7ZG6vKstxRyFljZtbQvnDSqiAPdUza32xTY/tlA="; version = "1.20240529";
in pkgs.raspberrypifw.override { srcHash = "sha256-KsCo7ZG6vKstxRyFljZtbQvnDSqiAPdUza32xTY/tlA=";
in
pkgs.raspberrypifw.override {
argsOverride = { argsOverride = {
src = prev.fetchFromGitHub { src = prev.fetchFromGitHub {
owner = "raspberrypi"; owner = "raspberrypi";
@ -77,4 +96,3 @@
}; };
}; };
} }

View File

@ -1,4 +1,6 @@
{ config, lib, pkgs, ... }: {
...
}:
{ {
imports = [ imports = [
@ -54,7 +56,7 @@
]; ];
}; };
modules.networking.tailscale = { modules.services.tailscale = {
enable = true; enable = true;
restrictSSH = false; restrictSSH = false;
}; };

View File

@ -26,4 +26,3 @@ To generate a compressed SD card image for Skycam, run:
Once a card is imaged, the existing SSH host keys should be copied to Once a card is imaged, the existing SSH host keys should be copied to
`/etc/ssh` manually to enable secret decryption. `/etc/ssh` manually to enable secret decryption.

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
self,
...
}:
{ {
imports = [ imports = [
@ -21,27 +27,36 @@
# From https://github.com/Electrostasy/dots/blob/3b81723feece67610a252ce754912f6769f0cd34/hosts/phobos/klipper.nix#L43-L65 # From https://github.com/Electrostasy/dots/blob/3b81723feece67610a252ce754912f6769f0cd34/hosts/phobos/klipper.nix#L43-L65
overlays = overlays =
let let
mkCompatibleDtsFile = dtbo: mkCompatibleDtsFile =
dtbo:
let let
drv = pkgs.runCommand "fix-dts" { nativeBuildInputs = with pkgs; [ dtc gnused ]; } '' drv =
mkdir "$out" pkgs.runCommand "fix-dts"
dtc -I dtb -O dts ${dtbo} | sed -e 's/bcm2835/bcm2711/' > $out/overlay.dts {
''; nativeBuildInputs = with pkgs; [
dtc
gnused
];
}
''
mkdir "$out"
dtc -I dtb -O dts ${dtbo} | sed -e 's/bcm2835/bcm2711/' > $out/overlay.dts
'';
in in
"${drv}/overlay.dts"; "${drv}/overlay.dts";
inherit (config.boot.kernelPackages) kernel; inherit (config.boot.kernelPackages) kernel;
in in
[ [
{ {
name = "imx708.dtbo"; name = "imx708.dtbo";
dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/imx708.dtbo"; dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/imx708.dtbo";
} }
{ {
name = "vc4-kms-v3d-pi4.dtbo"; name = "vc4-kms-v3d-pi4.dtbo";
dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/vc4-kms-v3d-pi4.dtbo"; dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/vc4-kms-v3d-pi4.dtbo";
} }
]; ];
}; };
firmware = with pkgs; [ firmware = with pkgs; [
firmwareLinuxNonfree firmwareLinuxNonfree
@ -83,9 +98,10 @@
ConditionPathExists = "/sys/bus/i2c/drivers/imx708/10-001a/video4linux"; ConditionPathExists = "/sys/bus/i2c/drivers/imx708/10-001a/video4linux";
}; };
serviceConfig = { serviceConfig = {
ExecStart = ''${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \ ExecStart = ''
--host=0.0.0.0 \ ${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \
--resolution=4608x2592 --host=0.0.0.0 \
--resolution=4608x2592
''; '';
DynamicUser = "yes"; DynamicUser = "yes";
SupplementaryGroups = [ "video" ]; SupplementaryGroups = [ "video" ];

View File

@ -1,4 +1,8 @@
{ config, lib, modulesPath, ... }: {
lib,
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -11,14 +15,17 @@
"cma=512M" "cma=512M"
"panic=0" "panic=0"
]; ];
supportedFilesystems = lib.mkForce [ "f2fs" "vfat" "xfs" ]; supportedFilesystems = lib.mkForce [
"f2fs"
"vfat"
"xfs"
];
tmp.cleanOnBoot = false; tmp.cleanOnBoot = false;
}; };
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: super: { (final: super: {
makeModulesClosure = x: makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
super.makeModulesClosure (x // { allowMissing = true; });
}) })
]; ];
@ -30,4 +37,3 @@
}; };
}; };
} }

View File

@ -15,4 +15,3 @@ NVMe | `/dev/sda1` (ext4, NixOS Root)
### Networks ### Networks
- DHCP on `10.0.1.0/24` subnet. - DHCP on `10.0.1.0/24` subnet.
- Tailscale on `100.64.0.0/10` subnet. FQDN: `vps1.mesh.vimium.net`. - Tailscale on `100.64.0.0/10` subnet. FQDN: `vps1.mesh.vimium.net`.

View File

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
imports = [ imports = [
@ -13,7 +18,7 @@
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [
22 # SSH 22 # SSH
]; ];
}; };
}; };
@ -37,7 +42,10 @@
groups = { groups = {
jellyfin = { }; jellyfin = { };
}; };
extraGroups.acme.members = [ "kanidm" "nginx" ]; extraGroups.acme.members = [
"kanidm"
"nginx"
];
}; };
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password"; services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
@ -47,26 +55,28 @@
group = "acme"; group = "acme";
}; };
services.kanidm = let services.kanidm =
baseDomain = "vimium.com"; let
domain = "auth.${baseDomain}"; baseDomain = "vimium.com";
uri = "https://${domain}"; domain = "auth.${baseDomain}";
in { uri = "https://${domain}";
package = pkgs.unstable.kanidm; in
enableClient = true; {
enableServer = true; package = pkgs.unstable.kanidm;
clientSettings = { enableClient = true;
inherit uri; enableServer = true;
clientSettings = {
inherit uri;
};
serverSettings = {
bindaddress = "[::1]:3013";
ldapbindaddress = "[::1]:636";
domain = baseDomain;
origin = uri;
tls_chain = "${config.security.acme.certs.${domain}.directory}/full.pem";
tls_key = "${config.security.acme.certs.${domain}.directory}/key.pem";
};
}; };
serverSettings = {
bindaddress = "[::1]:3013";
ldapbindaddress = "[::1]:636";
domain = baseDomain;
origin = uri;
tls_chain = "${config.security.acme.certs.${domain}.directory}/full.pem";
tls_key = "${config.security.acme.certs.${domain}.directory}/key.pem";
};
};
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"auth.vimium.com" = { "auth.vimium.com" = {
@ -79,7 +89,6 @@
}; };
modules = rec { modules = rec {
databases.postgresql.enable = true;
services = { services = {
borgmatic = { borgmatic = {
enable = true; enable = true;
@ -103,10 +112,11 @@
signal = true; signal = true;
whatsapp = true; whatsapp = true;
}; };
usePostgresql = databases.postgresql.enable; usePostgresql = services.postgresql.enable;
}; };
nginx.enable = true; nginx.enable = true;
photoprism.enable = true; photoprism.enable = true;
postgresql.enable = true;
}; };
}; };

View File

@ -1,4 +1,7 @@
{ config, lib, pkgs, modulesPath, ... }: {
modulesPath,
...
}:
{ {
imports = [ imports = [
@ -7,7 +10,12 @@
boot = { boot = {
initrd = { initrd = {
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
"vmw_pvscsi"
];
kernelModules = [ "nvme" ]; kernelModules = [ "nvme" ];
}; };
loader.grub.device = "/dev/sda"; loader.grub.device = "/dev/sda";
@ -23,4 +31,3 @@
}; };
}; };
} }

View File

@ -1,53 +0,0 @@
{
imports = [
./options.nix
./podman.nix
./databases/postgresql.nix
./desktop/gnome.nix
./desktop/forensics.nix
./desktop/hyprland.nix
./desktop/kde.nix
./desktop/mimeapps.nix
./desktop/apps/qbittorrent.nix
./desktop/apps/slack.nix
./desktop/apps/thunderbird.nix
./desktop/apps/zoom.nix
./desktop/browsers/brave.nix
./desktop/browsers/firefox.nix
./desktop/gaming/emulators.nix
./desktop/gaming/lutris.nix
./desktop/gaming/steam.nix
./desktop/media/graphics.nix
./desktop/media/recording.nix
./desktop/office/libreoffice.nix
./dev/cc.nix
./dev/java.nix
./dev/lua.nix
./dev/node.nix
./dev/python.nix
./dev/rust.nix
./dev/scala.nix
./dev/shell.nix
./dev/zig.nix
./editors/neovim
./editors/vscode.nix
./hardware/presonus-studio.nix
./networking/netbird.nix
./networking/tailscale.nix
./networking/wireless.nix
./security/gpg.nix
./security/pass.nix
./services/borgmatic
./services/chrony
./services/coturn
./services/gitea
./services/gitea-runner
./services/headscale
./services/mail
./services/matrix
./services/nginx
./services/photoprism
./shell/git
./shell/zsh
];
}

View File

@ -1,28 +0,0 @@
{ config, lib, pkgs, ... }:
let cfg = config.modules.desktop.media.recording;
in {
options.modules.desktop.media.recording = {
audio.enable = lib.mkOption {
default = false;
example = true;
};
video.enable = lib.mkOption {
default = false;
example = true;
};
};
config = {
user.packages = with pkgs;
(if cfg.audio.enable then [
ardour
audacity
] else []) ++
(if cfg.video.enable then [
handbrake
mkvtoolnix
obs-studio
] else []);
};
}

View File

@ -1,38 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.modules.desktop.office.libreoffice;
# libreoffice-gtk4 = pkgs.libreoffice.override {
# extraMakeWrapperArgs = [
# "--set SAL_USE_VCLPLUGIN gtk4"
# ];
# unwrapped = pkgs.libreoffice-unwrapped.overrideAttrs (oldAttrs: {
# buildInputs = oldAttrs.buildInputs ++ [
# pkgs.gtk4
# ];
# configureFlags = oldAttrs.configureFlags ++ [
# "--disable-werror"
# "--enable-gtk4"
# ];
# passthru = oldAttrs.passthru // {
# inherit (pkgs) gtk4;
# };
# });
# };
in {
options.modules.desktop.office.libreoffice = {
enable = lib.mkOption {
default = false;
example = true;
};
};
config = lib.mkIf cfg.enable {
user.packages = with pkgs; [
(if config.modules.desktop.kde.enable == true then libreoffice-qt else libreoffice)
hunspell
hunspellDicts.en-gb-large
hunspellDicts.en-us-large
];
};
}

View File

@ -0,0 +1,33 @@
{
imports = [
./options.nix
./programs/brave.nix
./programs/dev/cc.nix
./programs/dev/java.nix
./programs/dev/lua.nix
./programs/dev/node.nix
./programs/dev/python.nix
./programs/dev/rust.nix
./programs/dev/scala.nix
./programs/dev/shell.nix
./programs/dev/zig.nix
./programs/emulators.nix
./programs/firefox.nix
./programs/forensics.nix
./programs/git
./programs/gpg.nix
./programs/graphics.nix
./programs/libreoffice.nix
./programs/lutris.nix
./programs/neovim.nix
./programs/pass.nix
./programs/qbittorrent.nix
./programs/recording.nix
./programs/slack.nix
./programs/steam.nix
./programs/thunderbird.nix
./programs/vscode.nix
./programs/zoom.nix
./shell/zsh
];
}

View File

@ -0,0 +1,137 @@
{
config,
options,
lib,
self,
...
}:
with lib;
{
options = with types; {
user = mkOption {
type = attrs;
default = { };
};
home = {
configFile = mkOption {
type = attrs;
default = { };
description = "Files to place in $XDG_CONFIG_HOME";
};
dataFile = mkOption {
type = attrs;
default = { };
description = "Files to place in $XDG_DATA_HOME";
};
file = mkOption {
type = attrs;
default = { };
description = "Files to place directly in $HOME";
};
packages = mkOption {
type = attrs;
default = { };
description = "User-level installed packages";
};
programs = mkOption {
type = attrs;
default = { };
description = "Programs managed directly from home-manager";
};
services = mkOption {
type = attrs;
default = { };
description = "Services managed directly from home-manager";
};
};
dconf.settings = mkOption {
type = attrs;
default = { };
description = "dconf settings to enable";
};
env = mkOption {
type = attrsOf (oneOf [
str
path
(listOf (either str path))
]);
apply = mapAttrs (
n: v: if isList v then concatMapStringsSep ":" (x: toString x) v else (toString v)
);
default = { };
description = "";
};
};
config = {
age.secrets."passwords/users/jordan".file = "${self.inputs.secrets}/passwords/users/jordan.age";
user =
let
user = builtins.getEnv "USER";
name =
if
elem user [
""
"root"
]
then
"jordan"
else
user;
in
{
inherit name;
isNormalUser = true;
extraGroups = [
"audio"
"lxd"
"networkmanager"
"wheel"
];
description = "Jordan Holt";
useDefaultShell = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS jordan@vimium.com"
];
hashedPasswordFile = config.age.secrets."passwords/users/jordan".path;
home = "/home/${name}";
group = "users";
uid = 1000;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${config.user.name} = {
home = {
file = mkAliasDefinitions options.home.file;
stateVersion = config.system.stateVersion;
};
programs = mkAliasDefinitions options.home.programs;
services = mkAliasDefinitions options.home.services;
xdg = {
enable = true;
configFile = mkAliasDefinitions options.home.configFile;
dataFile = mkAliasDefinitions options.home.dataFile;
};
dconf.settings = mkAliasDefinitions options.dconf.settings;
};
sharedModules = [
self.inputs.nixvim.homeManagerModules.nixvim
self.inputs.plasma-manager.homeManagerModules.plasma-manager
];
};
users.users.${config.user.name} = mkAliasDefinitions options.user;
environment.extraInit = concatStringsSep "\n" (
mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env
);
};
}

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.browsers.brave; let
in { cfg = config.modules.programs.brave;
options.modules.desktop.browsers.brave = { in
{
options.modules.programs.brave = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.cc; let
in { cfg = config.modules.programs.dev.cc;
options.modules.dev.cc = { in
{
options.modules.programs.dev.cc = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.java; let
in { cfg = config.modules.programs.dev.java;
options.modules.dev.java = { in
{
options.modules.programs.dev.java = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.lua; let
in { cfg = config.modules.programs.dev.lua;
options.modules.dev.lua = { in
{
options.modules.programs.dev.lua = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.node; let
in { cfg = config.modules.programs.dev.node;
options.modules.dev.node = { in
{
options.modules.programs.dev.node = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
@ -11,7 +18,7 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
user.packages = with pkgs; [ user.packages = with pkgs; [
nodejs_latest nodejs_22
]; ];
}; };
} }

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.python; let
in { cfg = config.modules.programs.dev.python;
options.modules.dev.python = { in
{
options.modules.programs.dev.python = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.rust; let
in { cfg = config.modules.programs.dev.rust;
options.modules.dev.rust = { in
{
options.modules.programs.dev.rust = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.scala; let
in { cfg = config.modules.programs.dev.scala;
options.modules.dev.scala = { in
{
options.modules.programs.dev.scala = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.shell; let
in { cfg = config.modules.programs.dev.shell;
options.modules.dev.shell = { in
{
options.modules.programs.dev.shell = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.dev.zig; let
in { cfg = config.modules.programs.dev.zig;
options.modules.dev.zig = { in
{
options.modules.programs.dev.zig = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,17 +1,24 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.gaming.emulators; let
in { cfg = config.modules.programs.emulators;
options.modules.desktop.gaming.emulators = { in
ds.enable = lib.mkOption { {
options.modules.programs.emulators = {
ds.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
gb.enable = lib.mkOption { gb.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
gba.enable = lib.mkOption { gba.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
@ -19,35 +26,35 @@ in {
default = false; default = false;
example = true; example = true;
}; };
ps1.enable = lib.mkOption { ps1.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
ps2.enable = lib.mkOption { ps2.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
ps3.enable = lib.mkOption { ps3.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
psp.enable = lib.mkOption { psp.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
snes.enable = lib.mkOption { snes.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
switch.enable = lib.mkOption { switch.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
wii.enable = lib.mkOption { wii.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
xbox.enable = lib.mkOption { xbox.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
@ -60,14 +67,9 @@ in {
(lib.mkIf cfg.ps3.enable rpcs3) (lib.mkIf cfg.ps3.enable rpcs3)
(lib.mkIf cfg.psp.enable unstable.ppsspp) (lib.mkIf cfg.psp.enable unstable.ppsspp)
(lib.mkIf cfg.ds.enable desmume) (lib.mkIf cfg.ds.enable desmume)
(lib.mkIf (cfg.gba.enable || (lib.mkIf (cfg.gba.enable || cfg.gb.enable || cfg.snes.enable) higan)
cfg.gb.enable ||
cfg.snes.enable)
higan)
(lib.mkIf cfg.switch.enable yuzuPackages.mainline) (lib.mkIf cfg.switch.enable yuzuPackages.mainline)
(lib.mkIf (cfg.wii.enable || (lib.mkIf (cfg.wii.enable || cfg.gamecube.enable) dolphin-emu)
cfg.gamecube.enable)
dolphin-emu)
(lib.mkIf cfg.xbox.enable unstable.xemu) (lib.mkIf cfg.xbox.enable unstable.xemu)
]; ];
}; };

View File

@ -1,8 +1,15 @@
{ config, lib, self, ... }: {
config,
lib,
self,
...
}:
let cfg = config.modules.desktop.browsers.firefox; let
in { cfg = config.modules.programs.firefox;
options.modules.desktop.browsers.firefox = { in
{
options.modules.programs.firefox = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
@ -10,7 +17,8 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = self.inputs.firefox-gnome-theme; home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source =
self.inputs.firefox-gnome-theme;
home.programs.firefox = { home.programs.firefox = {
enable = true; enable = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.forensics; let
in { cfg = config.modules.programs.forensics;
options.modules.desktop.forensics = { in
{
options.modules.programs.forensics = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
...
}:
let cfg = config.modules.shell.git; let
in { cfg = config.modules.programs.git;
options.modules.shell.git = { in
{
options.modules.programs.git = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
...
}:
let cfg = config.modules.security.gpg; let
in { cfg = config.modules.programs.gpg;
options.modules.security.gpg = { in
{
options.modules.programs.gpg = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,17 +1,24 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.media.graphics; let
in { cfg = config.modules.programs.graphics;
options.modules.desktop.media.graphics = { in
{
options.modules.programs.graphics = {
modeling.enable = lib.mkOption { modeling.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
raster.enable = lib.mkOption { raster.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
vector.enable = lib.mkOption { vector.enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };

View File

@ -0,0 +1,44 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.programs.libreoffice;
in
# libreoffice-gtk4 = pkgs.libreoffice.override {
# extraMakeWrapperArgs = [
# "--set SAL_USE_VCLPLUGIN gtk4"
# ];
# unwrapped = pkgs.libreoffice-unwrapped.overrideAttrs (oldAttrs: {
# buildInputs = oldAttrs.buildInputs ++ [
# pkgs.gtk4
# ];
# configureFlags = oldAttrs.configureFlags ++ [
# "--disable-werror"
# "--enable-gtk4"
# ];
# passthru = oldAttrs.passthru // {
# inherit (pkgs) gtk4;
# };
# });
# };
{
options.modules.programs.libreoffice = {
enable = lib.mkOption {
default = false;
example = true;
};
};
config = lib.mkIf cfg.enable {
user.packages = with pkgs; [
(if config.modules.system.desktop.kde.enable == true then libreoffice-qt else libreoffice)
hunspell
hunspellDicts.en-gb-large
hunspellDicts.en-us-large
];
};
}

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.gaming.lutris; let
in { cfg = config.modules.programs.lutris;
options.modules.desktop.gaming.lutris = { in
{
options.modules.programs.lutris = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,9 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
...
}:
let let
cfg = config.modules.editors.neovim; cfg = config.modules.programs.neovim;
in { in
options.modules.editors.neovim = { {
options.modules.programs.neovim = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.security.pass; let
in { cfg = config.modules.programs.pass;
options.modules.security.pass = { in
{
options.modules.programs.pass = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.apps.qbittorrent; let
in { cfg = config.modules.programs.qbittorrent;
options.modules.desktop.apps.qbittorrent = { in
{
options.modules.programs.qbittorrent = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -0,0 +1,46 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.programs.recording;
in
{
options.modules.programs.recording = {
audio.enable = lib.mkOption {
default = false;
example = true;
};
video.enable = lib.mkOption {
default = false;
example = true;
};
};
config = {
user.packages =
with pkgs;
(
if cfg.audio.enable then
[
ardour
audacity
]
else
[ ]
)
++ (
if cfg.video.enable then
[
handbrake
mkvtoolnix
obs-studio
]
else
[ ]
);
};
}

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.apps.slack; let
in { cfg = config.modules.programs.slack;
options.modules.desktop.apps.slack = { in
{
options.modules.programs.slack = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
...
}:
let cfg = config.modules.desktop.gaming.steam; let
in { cfg = config.modules.programs.steam;
options.modules.desktop.gaming.steam = { in
{
options.modules.programs.steam = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,16 +1,24 @@
{ config, lib, self, ... }: {
config,
lib,
self,
...
}:
let cfg = config.modules.desktop.apps.thunderbird; let
in { cfg = config.modules.programs.thunderbird;
options.modules.desktop.apps.thunderbird = { in
{
options.modules.programs.thunderbird = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = self.inputs.thunderbird-gnome-theme; home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source =
self.inputs.thunderbird-gnome-theme;
home.programs.thunderbird = { home.programs.thunderbird = {
enable = true; enable = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.editors.vscode; let
in { cfg = config.modules.programs.vscode;
options.modules.editors.vscode = { in
{
options.modules.programs.vscode = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.apps.zoom; let
in { cfg = config.modules.programs.zoom;
options.modules.desktop.apps.zoom = { in
{
options.modules.programs.zoom = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.shell.zsh; let
in { cfg = config.modules.shell.zsh;
in
{
options.modules.shell.zsh = { options.modules.shell.zsh = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
@ -30,9 +37,9 @@ in {
]; ];
env = { env = {
ZDOTDIR = "$XDG_CONFIG_HOME/zsh"; ZDOTDIR = "$XDG_CONFIG_HOME/zsh";
ZSH_CACHE = "$XDG_CACHE_HOME/zsh"; ZSH_CACHE = "$XDG_CACHE_HOME/zsh";
ZGEN_DIR = "$XDG_DATA_HOME/zgenom"; ZGEN_DIR = "$XDG_DATA_HOME/zgenom";
}; };
home.configFile = { home.configFile = {

26
modules/nixos/default.nix Normal file
View File

@ -0,0 +1,26 @@
{
imports = [
./hardware/presonus-studio
./podman.nix
./services/borgmatic.nix
./services/chrony.nix
./services/coturn.nix
./services/gitea.nix
./services/gitea-runner.nix
./services/headscale.nix
./services/home-assistant
./services/mail.nix
./services/matrix.nix
./services/music-assistant.nix
./services/netbird.nix
./services/nginx.nix
./services/photoprism.nix
./services/postgresql.nix
./services/tailscale.nix
./system/desktop/gnome.nix
./system/desktop/hyprland.nix
./system/desktop/kde.nix
./system/desktop/mimeapps.nix
./system/wireless.nix
];
}

View File

@ -15,16 +15,16 @@ index ab5fed9f55b6..da50a4782414 100644
--- a/sound/usb/format.c --- a/sound/usb/format.c
+++ b/sound/usb/format.c +++ b/sound/usb/format.c
@@ -378,8 +378,8 @@ static int parse_uac2_sample_rate_range(struct snd_usb_audio *chip, @@ -378,8 +378,8 @@ static int parse_uac2_sample_rate_range(struct snd_usb_audio *chip,
for (rate = min; rate <= max; rate += res) { for (rate = min; rate <= max; rate += res) {
- /* Filter out invalid rates on Presonus Studio 1810c */ - /* Filter out invalid rates on Presonus Studio 1810c */
- if (chip->usb_id == USB_ID(0x194f, 0x010c) && - if (chip->usb_id == USB_ID(0x194f, 0x010c) &&
+ /* Filter out invalid rates on Presonus Studio 1824c */ + /* Filter out invalid rates on Presonus Studio 1824c */
+ if (chip->usb_id == USB_ID(0x194f, 0x010d) && + if (chip->usb_id == USB_ID(0x194f, 0x010d) &&
!s1810c_valid_sample_rate(fp, rate)) !s1810c_valid_sample_rate(fp, rate))
goto skip_rate; goto skip_rate;
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 898bc3baca7b..c3135459c38c 100644 index 898bc3baca7b..c3135459c38c 100644
--- a/sound/usb/mixer_quirks.c --- a/sound/usb/mixer_quirks.c
@ -32,7 +32,7 @@ index 898bc3baca7b..c3135459c38c 100644
@@ -3445,7 +3445,7 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer) @@ -3445,7 +3445,7 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
err = snd_rme_controls_create(mixer); err = snd_rme_controls_create(mixer);
break; break;
- case USB_ID(0x194f, 0x010c): /* Presonus Studio 1810c */ - case USB_ID(0x194f, 0x010c): /* Presonus Studio 1810c */
+ case USB_ID(0x194f, 0x010d): /* Presonus Studio 1824c */ + case USB_ID(0x194f, 0x010d): /* Presonus Studio 1824c */
err = snd_sc1810_init_mixer(mixer); err = snd_sc1810_init_mixer(mixer);
@ -44,7 +44,7 @@ index fac4bbc6b275..5bc2e66d452c 100644
+++ b/sound/usb/mixer_s1810c.c +++ b/sound/usb/mixer_s1810c.c
@@ -552,7 +552,7 @@ int snd_sc1810_init_mixer(struct usb_mixer_interface *mixer) @@ -552,7 +552,7 @@ int snd_sc1810_init_mixer(struct usb_mixer_interface *mixer)
return 0; return 0;
dev_info(&dev->dev, dev_info(&dev->dev,
- "Presonus Studio 1810c, device_setup: %u\n", chip->setup); - "Presonus Studio 1810c, device_setup: %u\n", chip->setup);
+ "Presonus Studio 1824c, device_setup: %u\n", chip->setup); + "Presonus Studio 1824c, device_setup: %u\n", chip->setup);
@ -64,8 +64,7 @@ index ab2b938502eb..b86832edaaa0 100644
+ /* presonus studio 1824c: skip altsets incompatible with device_setup */ + /* presonus studio 1824c: skip altsets incompatible with device_setup */
+ if (chip->usb_id == USB_ID(0x194f, 0x010d)) + if (chip->usb_id == USB_ID(0x194f, 0x010d))
return s1810c_skip_setting_quirk(chip, iface, altno); return s1810c_skip_setting_quirk(chip, iface, altno);
--
2.42.0
--
2.42.0

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.modules.hardware.presonus-studio; cfg = config.modules.hardware.presonus-studio;
snd-usb-audio-module = pkgs.callPackage ./snd-usb-audio.nix { snd-usb-audio-module = pkgs.callPackage ./snd-usb-audio.nix {
@ -13,7 +18,8 @@ let
"channelmix.upmix-method" = "psd"; "channelmix.upmix-method" = "psd";
}; };
}; };
in { in
{
options.modules.hardware.presonus-studio = { options.modules.hardware.presonus-studio = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
@ -67,11 +73,23 @@ in {
"capture.props" = { "capture.props" = {
"node.name" = "Genelec_Speakers"; "node.name" = "Genelec_Speakers";
"media.class" = "Audio/Sink"; "media.class" = "Audio/Sink";
"audio.position" = [ "FL" "FR" "SL" "SR" "LFE" ]; "audio.position" = [
"FL"
"FR"
"SL"
"SR"
"LFE"
];
}; };
"playback.props" = { "playback.props" = {
"node.name" = "playback.Genelec_Speakers"; "node.name" = "playback.Genelec_Speakers";
"audio.position" = [ "AUX0" "AUX1" "AUX3" "AUX4" "AUX5" ]; "audio.position" = [
"AUX0"
"AUX1"
"AUX3"
"AUX4"
"AUX5"
];
"target.object" = "alsa_output.usb-PreSonus_Studio_1824c_SC4E21110775-00.multichannel-output"; "target.object" = "alsa_output.usb-PreSonus_Studio_1824c_SC4E21110775-00.multichannel-output";
"stream.dont-remix" = true; "stream.dont-remix" = true;
"node.passive" = true; "node.passive" = true;
@ -85,4 +103,4 @@ in {
client-rt."40-upmix" = upmixConfig; client-rt."40-upmix" = upmixConfig;
}; };
}; };
} }

View File

@ -1,8 +1,17 @@
{ pkgs, lib, kernel ? pkgs.linuxPackages_latest.kernel }: {
pkgs,
lib,
kernel ? pkgs.linuxPackages_latest.kernel,
}:
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
pname = "snd-usb-audio"; pname = "snd-usb-audio";
inherit (kernel) src version postPatch nativeBuildInputs; inherit (kernel)
src
version
postPatch
nativeBuildInputs
;
kernel_dev = kernel.dev; kernel_dev = kernel.dev;
kernelVersion = kernel.modDirVersion; kernelVersion = kernel.modDirVersion;
@ -33,4 +42,3 @@ pkgs.stdenv.mkDerivation {
license = lib.licenses.gpl2; license = lib.licenses.gpl2;
}; };
} }

View File

@ -1,10 +1,16 @@
{ pkgs, lib, config, ... }: {
pkgs,
lib,
config,
...
}:
with lib; with lib;
let let
cfg = config.modules.podman; cfg = config.modules.podman;
in { in
{
options.modules.podman = { options.modules.podman = {
enable = mkOption { enable = mkOption {
default = false; default = false;

View File

@ -1,9 +1,15 @@
{ config, lib, self, ... }: {
config,
lib,
self,
...
}:
let let
cfg = config.modules.services.borgmatic; cfg = config.modules.services.borgmatic;
hostname = config.networking.hostName; hostname = config.networking.hostName;
in { in
{
options.modules.services.borgmatic = { options.modules.services.borgmatic = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
@ -12,7 +18,7 @@ in {
}; };
directories = lib.mkOption { directories = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
default = []; default = [ ];
example = [ example = [
"/home/jordan/Documents" "/home/jordan/Documents"
]; ];
@ -35,9 +41,14 @@ in {
settings = { settings = {
source_directories = cfg.directories; source_directories = cfg.directories;
repositories = [ repositories = [
{ label = "borgbase"; path = cfg.repoPath; } {
label = "borgbase";
path = cfg.repoPath;
}
]; ];
encryption_passcommand = "cat ${config.age.secrets."passwords/services/borg/${hostname}-passphrase".path}"; encryption_passcommand = "cat ${
config.age.secrets."passwords/services/borg/${hostname}-passphrase".path
}";
ssh_command = "ssh -i /etc/ssh/ssh_host_ed25519_key"; ssh_command = "ssh -i /etc/ssh/ssh_host_ed25519_key";
keep_daily = 7; keep_daily = 7;
keep_weekly = 4; keep_weekly = 4;

View File

@ -1,10 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.modules.services.chrony; cfg = config.modules.services.chrony;
in { in
{
options.modules.services.chrony = { options.modules.services.chrony = {
enable = mkOption { enable = mkOption {
default = false; default = false;

View File

@ -1,8 +1,14 @@
{ config, lib, self, ... }: {
config,
lib,
self,
...
}:
let let
cfg = config.modules.services.coturn; cfg = config.modules.services.coturn;
in { in
{
options.modules.services.coturn = { options.modules.services.coturn = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
@ -21,24 +27,28 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
networking.firewall = let networking.firewall =
range = with config.services.coturn; lib.singleton { let
from = min-port; range =
to = max-port; with config.services.coturn;
lib.singleton {
from = min-port;
to = max-port;
};
in
{
allowedTCPPorts = [
3478 # TURN listener
5349 # STUN TLS
5350 # STUN TLS alt
];
allowedUDPPorts = [
3478 # TURN listener
5349 # TLS
5350 # TLS alt
];
allowedUDPPortRanges = range; # TURN peer relays
}; };
in {
allowedTCPPorts = [
3478 # TURN listener
5349 # STUN TLS
5350 # STUN TLS alt
];
allowedUDPPorts = [
3478 # TURN listener
5349 # TLS
5350 # TLS alt
];
allowedUDPPortRanges = range; # TURN peer relays
};
security.acme.certs = { security.acme.certs = {
"${config.services.coturn.realm}" = { "${config.services.coturn.realm}" = {
@ -47,19 +57,26 @@ in {
}; };
}; };
age.secrets = { age.secrets =
"passwords/services/coturn/static-auth-secret" = { {
file = "${self.inputs.secrets}/passwords/services/coturn/static-auth-secret.age"; "passwords/services/coturn/static-auth-secret" = {
owner = "turnserver"; file = "${self.inputs.secrets}/passwords/services/coturn/static-auth-secret.age";
group = "turnserver"; owner = "turnserver";
}; group = "turnserver";
} // (if cfg.matrixIntegration then { };
"passwords/services/coturn/matrix-turn-config.yml" = { }
file = "${self.inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age"; // (
owner = "matrix-synapse"; if cfg.matrixIntegration then
group = "matrix-synapse"; {
}; "passwords/services/coturn/matrix-turn-config.yml" = {
} else {}); file = "${self.inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age";
owner = "matrix-synapse";
group = "matrix-synapse";
};
}
else
{ }
);
services.coturn = rec { services.coturn = rec {
enable = true; enable = true;

View File

@ -1,4 +1,10 @@
{ pkgs, config, lib, self, ... }: {
pkgs,
config,
lib,
self,
...
}:
# Based on: https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix # Based on: https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix
@ -52,7 +58,12 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "podman.service" ]; after = [ "podman.service" ];
requires = [ "podman.service" ]; requires = [ "podman.service" ];
path = [ config.virtualisation.podman.package pkgs.gnutar pkgs.shadow pkgs.getent ]; path = [
config.virtualisation.podman.package
pkgs.gnutar
pkgs.shadow
pkgs.getent
];
script = '' script = ''
set -eux -o pipefail set -eux -o pipefail
mkdir -p etc/nix mkdir -p etc/nix
@ -142,7 +153,12 @@ in
"~setdomainname" "~setdomainname"
"~sethostname" "~sethostname"
]; ];
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" "AF_NETLINK" ]; RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_UNIX"
"AF_NETLINK"
];
# Needs network access # Needs network access
PrivateNetwork = false; PrivateNetwork = false;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
self,
...
}:
let let
cfg = config.modules.services.gitea; cfg = config.modules.services.gitea;
in { in
{
options.modules.services.gitea = { options.modules.services.gitea = {
enable = lib.mkEnableOption "gitea"; enable = lib.mkEnableOption "gitea";
domain = lib.mkOption { domain = lib.mkOption {
@ -16,7 +23,7 @@ in {
users.git = { users.git = {
isSystemUser = true; isSystemUser = true;
useDefaultShell = true; useDefaultShell = true;
group = "git"; group = "git";
extraGroups = [ "gitea" ]; extraGroups = [ "gitea" ];
home = config.services.gitea.stateDir; home = config.services.gitea.stateDir;
}; };

View File

@ -1,9 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.modules.services.headscale; cfg = config.modules.services.headscale;
fqdn = "headscale.vimium.net"; fqdn = "headscale.vimium.net";
in { in
{
options.modules.services.headscale = { options.modules.services.headscale = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;

View File

@ -0,0 +1,315 @@
{
config,
lib,
pkgs,
self,
...
}:
let
cfg = config.modules.services.home-assistant;
in
{
imports = [
./floorplan/default.nix
./mqtt.nix
];
options.modules.services.home-assistant.enable = lib.mkEnableOption "home-assistant";
config = lib.mkIf cfg.enable {
age.secrets."files/services/home-assistant/secrets.yaml" = {
file = "${self.inputs.secrets}/files/services/home-assistant/secrets.yaml.age";
path = "${config.services.home-assistant.configDir}/secrets.yaml";
owner = "hass";
group = "hass";
};
services.home-assistant = {
enable = true;
config = {
automation = "!include automations.yaml";
backup = { };
binary_sensor = [ ];
default_config = { };
http = {
server_host = "::1";
trusted_proxies = [ "::1" ];
use_x_forwarded_for = true;
};
ffmpeg = { };
homeassistant = {
name = "Home";
latitude = "!secret latitude";
longitude = "!secret longitude";
country = "GB";
temperature_unit = "C";
time_zone = config.time.timeZone;
unit_system = "metric";
auth_providers = [
{
type = "trusted_networks";
trusted_networks = [
"100.64.0.0/10"
"127.0.0.1"
];
allow_bypass_login = true;
}
{
type = "homeassistant";
}
];
};
logger = {
default = "info";
logs = { };
};
lovelace = {
resources = [
{
url = "/local/nixos-lovelace-modulels/mushroom.js";
type = "module";
}
];
};
media_player = [ ];
mobile_app = { };
onkyo = { };
open_meteo = { };
recorder = {
purge_keep_days = 365;
};
scene = "!include scenes.yaml";
script = "!include scripts.yaml";
sensor = [ ];
system_health = { };
zeroconf = { };
};
configDir = "/etc/home-assistant";
extraComponents = [
"air_quality"
"airly"
"alert"
"api"
"application_credentials"
"asuswrt"
"auth"
"automation"
"bayesian"
"binary_sensor"
# "blackbird"
"blueprint"
"bluetooth_adapters"
"bluetooth_le_tracker"
"button"
"calendar"
"camera"
"cast"
"cert_expiry"
"climate"
"co2signal"
"color_extractor"
"command_line"
"compensation"
"configurator"
"counter"
"cover"
"cpuspeed"
"default_config"
"demo"
"derivative"
"device_automation"
"device_sun_light_trigger"
"device_tracker"
"dlna_dmr"
"dlna_dms"
"dnsip"
"esphome"
"fail2ban"
"fan"
"feedreader"
"ffmpeg"
"file"
"file_upload"
"filesize"
"folder"
"folder_watcher"
"forecast_solar"
"frontend"
"gdacs"
"generic"
"generic_hygrostat"
"generic_thermostat"
"geo_json_events"
"geo_location"
"geo_rss_events"
"github"
"group"
"hardware"
"hdmi_cec"
"history_stats"
"homeassistant"
"homekit"
"homekit_controller"
"html5"
"http"
"humidifier"
"icloud"
"image_processing"
"input_boolean"
"input_button"
"input_datetime"
"input_number"
"input_select"
"input_text"
"integration"
"ios"
"jellyfin"
"light"
"local_calendar"
"local_file"
"local_ip"
"local_todo"
"lock"
"logentries"
"logger"
"lovelace"
"manual"
"manual_mqtt"
"matter"
"media_player"
"min_max"
"mjpeg"
"modern_forms"
"mold_indicator"
"moon"
"mysensors"
"network"
"nmap_tracker"
"notify"
"number"
"onboarding"
"onkyo"
"panel_custom"
"persistent_notification"
"person"
"ping"
"plant"
"prometheus"
"proximity"
"push"
"proximity"
"python_script"
"radio_browser"
"random"
"recorder"
"remote"
"repairs"
"rest"
"rest_command"
"rss_feed_template"
"scene"
"schedule"
"scrape"
"script"
"search"
"season"
"select"
"sense"
"sensor"
"sensorpush"
"shell_command"
"shopping_list"
"siren"
"smtp"
"snmp"
"sql"
"statistics"
"sun"
"switch"
"switch_as_x"
"system_health"
"system_log"
"systemmonitor"
"tag"
"tailscale"
"tcp"
"template"
"text"
"thread"
"threshold"
"time_date"
"timer"
"tod"
"todo"
"tomorrowio"
"trend"
"universal"
"upb"
"update"
"upnp"
"uptime"
"utility_meter"
"vacuum"
"vlc"
"vlc_telnet"
"wake_on_lan"
"water_heater"
"weather"
"websocket_api"
"wled"
"workday"
"worldclock"
"zone"
];
extraPackages =
python3Packages: with python3Packages; [
onkyo-eiscp
zeroconf
];
customComponents = [
pkgs.ui-lovelace-minimalist
];
customLovelaceModules =
with pkgs.home-assistant-custom-lovelace-modules;
[
bubble-card
button-card
mushroom
sankey-chart
universal-remote-card
# zigbee2mqtt-networkmap
]
++ [
pkgs.hass-browser-mod
];
};
systemd.services.home-assistant.preStart = lib.mkForce "";
modules.services.borgmatic.directories = [
config.services.home-assistant.configDir
];
services.nginx = {
enable = true;
virtualHosts."home.mesh.vimium.net" = {
forceSSL = false;
extraConfig = ''
proxy_buffering off;
'';
locations."/" = {
proxyPass = "http://[::1]:8123";
proxyWebsockets = true;
};
};
};
};
}

View File

@ -0,0 +1,100 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.services.home-assistant;
in
{
config = lib.mkIf cfg.enable {
services.home-assistant = {
config.lovelace.resources = [
{
url = "/local/nixos-lovelace-modules/floorplan.js";
type = "module";
}
];
customLovelaceModules = [
pkgs.ha-floorplan
];
};
environment.etc."home-assistant/www/floorplan/style.css".source = ./style.css;
environment.etc."home-assistant/www/floorplan/config.yaml".text = builtins.toJSON {
image = {
location = "/local/floorplan/beetham.svg";
cache = false;
};
stylesheet = {
location = "/local/floorplan/style.css";
cache = false;
};
defaults = {
hover_action = "hover-info";
hold_action = "toggle";
tap_action = "more-info";
};
rules = [
{
name = "Rooms";
entities = [
{
entity = "light.bedroom_lamps";
element = "area.bedroom";
}
{
entity = "light.hallway_spots";
element = "area.hallway";
}
{
entity = "light.living_room_lamps";
element = "area.livingroom";
}
{
entity = "light.office_lamps";
element = "area.office";
}
];
tap_action = "light.toggle";
state_action = {
service = "floorplan.class_set";
service_data = ''
if (entity.state === "on") {
return "light-on";
}
return "light-off";
'';
};
}
{
name = "Temperature";
entities = [
"sensor.motion_sensor_temperature"
];
state_action = [
{
service = "floorplan.text_set";
service_data = ''
if (!isNaN(entity.state)) {
return Math.round(entity.state * 10) / 10 + "°";
}
return "Unknown";
'';
}
{
service = "floorplan.class_set";
service_data = {
class = "static-temp";
};
}
];
}
];
};
};
}

View File

@ -0,0 +1,27 @@
#floorplan {
padding: 10px;
}
svg, svg * {
vector-effect: non-scaling-stroke !important;
pointer-events: all !important;
}
path[id*="area."].light-on {
opacity: 0 !important;
}
path[id*="area."] {
opacity: 0.5 !important;
transition: opacity .25s;
-moz-transition: opacity .25s;
-webkit-transition: opacity .25s;
}
svg tspan {
fill: var(--primary-text-color);
}
.static-temp, .static-temp tspan {
fill: #ffffff;
}

View File

@ -0,0 +1,92 @@
{
config,
lib,
pkgs,
self,
...
}:
let
cfg = config.modules.services.home-assistant;
in
{
config = lib.mkIf cfg.enable {
services.mosquitto = {
enable = true;
listeners = [
{
acl = [ "pattern readwrite #" ];
omitPasswordAuth = true;
port = 1883;
settings = {
allow_anonymous = true;
};
}
];
};
age.secrets."files/services/zigbee2mqtt/secret.yaml" = {
file = "${self.inputs.secrets}/files/services/zigbee2mqtt/secret.yaml.age";
path = "${config.services.zigbee2mqtt.dataDir}/secret.yaml";
owner = "zigbee2mqtt";
group = "zigbee2mqtt";
};
services.zigbee2mqtt = {
package = pkgs.unstable.zigbee2mqtt;
enable = true;
dataDir = "/var/lib/zigbee2mqtt";
settings = {
homeassistant = lib.optionalAttrs config.services.home-assistant.enable {
discovery_topic = "homeassistant";
status_topic = "hass/status";
};
availability = true;
frontend = true;
device_options = {
retain = true;
};
serial = {
port = "/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0";
adapter = "zstack";
};
advanced = {
channel = 20;
network_key = "!secret.yaml network_key";
pan_id = 13001;
ext_pan_id = [
79
1
73
47
250
136
124
222
];
transmit_power = 20;
};
mqtt = {
version = 5;
server = "mqtt://localhost:1883";
};
};
};
modules.services.borgmatic.directories = [
config.services.mosquitto.dataDir
config.services.zigbee2mqtt.dataDir
];
services.home-assistant = {
config.mqtt = { };
extraComponents = [
"mqtt"
"mqtt_eventstream"
"mqtt_json"
"mqtt_room"
"mqtt_statestream"
];
};
};
}

View File

@ -1,4 +1,9 @@
{ config, lib, self, ... }: {
config,
lib,
self,
...
}:
let let
cfg = config.modules.services.mail; cfg = config.modules.services.mail;
@ -14,7 +19,8 @@ let
"vimium.org" "vimium.org"
"vimium.xyz" "vimium.xyz"
]; ];
in { in
{
options.modules.services.mail = { options.modules.services.mail = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
@ -40,7 +46,10 @@ in {
services.nginx.enable = true; services.nginx.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [
80
443
];
mailserver = { mailserver = {
enable = true; enable = true;

View File

@ -0,0 +1,248 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.services.matrix;
in
{
options.modules.services.matrix = {
enable = lib.mkEnableOption "matrix";
element = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
};
bridges = {
signal = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Signal bridge.";
};
whatsapp = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable WhatsApp bridge.";
};
};
serverName = lib.mkOption {
type = lib.types.str;
default = "vimium.com";
example = "vimium.com";
};
usePostgresql = lib.mkEnableOption "postgresql";
};
config =
let
matrixSubdomain = "matrix.${cfg.serverName}";
elementSubdomain = "chat.${cfg.serverName}";
matrixClientConfig = {
"m.homeserver" = {
base_url = "https://${matrixSubdomain}";
server_name = cfg.serverName;
};
"m.identity_server" = {
"base_url" = "https://vector.im";
};
};
matrixServerConfig."m.server" = "${matrixSubdomain}:443";
commonBridgeSettings = bridge: {
appservice = {
database = lib.mkIf cfg.usePostgresql {
type = "postgres";
uri = "postgresql:///${bridge}?host=/run/postgresql";
};
};
bridge = {
encryption = {
allow = true;
default = true;
require = true;
};
permissions = {
"${cfg.serverName}" = "user";
"@jordan:${cfg.serverName}" = "admin";
};
provisioning = {
shared_secret = "disable";
};
};
homeserver = {
address = "https://${matrixSubdomain}";
domain = cfg.serverName;
};
};
in
lib.mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [
8448 # Matrix federation
];
security.acme.certs = {
"${matrixSubdomain}" = {
reloadServices = [ "matrix-synapse" ];
};
};
services.nginx.virtualHosts =
{
"${matrixSubdomain}" = {
forceSSL = true;
enableACME = true;
listen = [
{
addr = "0.0.0.0";
port = 443;
ssl = true;
}
{
addr = "0.0.0.0";
port = 80;
}
{
addr = "0.0.0.0";
port = 8448;
ssl = true;
}
{
addr = "[::1]";
port = 443;
ssl = true;
}
{
addr = "[::1]";
port = 80;
}
{
addr = "[::1]";
port = 8448;
ssl = true;
}
];
locations = {
"/" = {
proxyPass = "http://localhost:8008";
extraConfig = ''
proxy_set_header X-Forwarded-For $remote_addr;
'';
};
"/_matrix" = {
proxyPass = "http://localhost:8008";
extraConfig = ''
proxy_set_header X-Forwarded-For $remote_addr;
client_max_body_size 50M;
'';
};
"/_synapse/client".proxyPass = "http://localhost:8008";
};
};
"${cfg.serverName}" =
let
mkWellKnown = data: ''
more_set_headers 'Content-Type: application/json';
return 200 '${builtins.toJSON data}';
'';
in
{
locations."= /.well-known/matrix/server".extraConfig = (mkWellKnown matrixServerConfig);
locations."= /.well-known/matrix/client".extraConfig = (mkWellKnown matrixClientConfig);
};
}
// (
if cfg.element.enable then
{
"${elementSubdomain}" = {
forceSSL = true;
enableACME = true;
root = pkgs.unstable.element-web.override {
conf = {
default_server_config = matrixClientConfig;
brand = "Vimium Chat";
branding = {
auth_header_logo_url = "https://vimium.com/images/logo.svg";
auth_footer_links = [
{
"text" = "Vimium.com";
"url" = "https://vimium.com";
}
];
};
};
};
};
}
else
{ }
);
nixpkgs.config.permittedInsecurePackages = [
"jitsi-meet-1.0.8043"
"olm-3.2.16"
];
services.matrix-synapse = {
enable = true;
enableRegistrationScript = true;
settings = {
database.name = (if cfg.usePostgresql then "psycopg2" else "sqlite3");
enable_metrics = false;
enable_registration = false;
max_upload_size = "100M";
report_stats = false;
server_name = cfg.serverName;
};
};
systemd.services.matrix-synapse.serviceConfig.SupplementaryGroups = (
lib.optional cfg.bridges.whatsapp config.systemd.services.mautrix-whatsapp.serviceConfig.Group
);
services.postgresql = lib.mkIf cfg.usePostgresql {
ensureUsers =
[
{
name = "matrix-synapse";
ensureDBOwnership = true;
}
]
++ (lib.optional cfg.bridges.signal {
name = "mautrix-signal";
ensureDBOwnership = true;
})
++ (lib.optional cfg.bridges.whatsapp {
name = "mautrix-whatsapp";
ensureDBOwnership = true;
});
ensureDatabases =
[
"matrix-synapse"
]
++ (lib.optional cfg.bridges.signal "mautrix-signal")
++ (lib.optional cfg.bridges.whatsapp "mautrix-whatsapp");
};
services.mautrix-signal = lib.mkIf cfg.bridges.signal {
enable = true;
settings = commonBridgeSettings "mautrix-signal";
};
services.mautrix-whatsapp = lib.mkIf cfg.bridges.whatsapp {
enable = true;
settings = {
bridge = {
history_sync = {
backfill = true;
max_initial_conversations = -1;
message_count = 50;
request_full_sync = true;
};
mute_bridging = true;
};
} // commonBridgeSettings "mautrix-whatsapp";
};
};
}

View File

@ -0,0 +1,37 @@
{
config,
lib,
...
}:
let
inherit (lib)
mkEnableOption
mkIf
;
cfg = config.modules.services.music-assistant;
in
{
options.modules.services.music-assistant.enable = mkEnableOption "music-assistant";
config = mkIf cfg.enable {
services = {
nginx.virtualHosts."music-assistant.${config.networking.hostName}" = {
extraConfig = ''
proxy_buffering off;
'';
locations."/" = {
proxyPass = "http://[::1]:8095";
proxyWebsockets = true;
};
};
music-assistant = {
enable = true;
providers = [
"hass"
"jellyfin"
];
};
};
};
}

View File

@ -1,10 +1,15 @@
{ config, lib, self, ... }: {
config,
lib,
self,
...
}:
let let
cfg = config.modules.networking.netbird; cfg = config.modules.services.netbird;
hostname = config.networking.hostName; in
in { {
options.modules.networking.netbird = { options.modules.services.netbird = {
enable = lib.mkEnableOption "netbird"; enable = lib.mkEnableOption "netbird";
coordinatorDomain = lib.mkOption { coordinatorDomain = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@ -43,7 +48,9 @@ in {
HttpConfig = { HttpConfig = {
AuthAudience = "netbird"; AuthAudience = "netbird";
}; };
StoreConfig = { Engine = "sqlite"; }; StoreConfig = {
Engine = "sqlite";
};
TURNConfig = { TURNConfig = {
Secret._secret = config.age.secrets."passwords/services/coturn/static-auth-secret".path; Secret._secret = config.age.secrets."passwords/services/coturn/static-auth-secret".path;
TimeBasedCredentials = true; TimeBasedCredentials = true;

View File

@ -0,0 +1,193 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.services.nginx;
nginxErrorPages = ''
location @error_pages {
rewrite ^.*$ /''${status}.html break;
root "/var/www/html/errors";
}
'';
nginxEdgeHeaders = ''
more_set_headers 'Server: Vimium';
more_set_headers 'Access-Control-Allow-Origin: *';
add_header Expect-CT max-age=30 always;
add_header Referrer-Policy strict-origin-when-cross-origin always;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
add_header Vimium-Responding-Instance $hostname;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options nosniff always;
'';
nginxStrictHeaders = ''
add_header X-Frame-Options SAMEORIGIN always;
add_header Permissions-Policy "fullscreen=(self), sync-xhr=(self)" always;
'';
mkRedirect = from: to: {
"${from}" = {
forceSSL = true;
enableACME = true;
serverAliases = [ "www.${from}" ];
locations."/".return = "301 https://${to}$request_uri";
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
};
};
in
{
options.modules.services.nginx = {
enable = mkOption {
default = false;
example = true;
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [
80 # HTTP
443 # HTTPS
];
services.nginx = {
enable = true;
package = pkgs.openresty;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
clientMaxBodySize = "2G";
sslProtocols = "TLSv1.2 TLSv1.3";
sslCiphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
appendHttpConfig = ''
error_page 400 @error_pages;
error_page 401 @error_pages;
error_page 403 @error_pages;
error_page 404 @error_pages;
error_page 405 @error_pages;
error_page 429 @error_pages;
error_page 500 @error_pages;
error_page 501 @error_pages;
error_page 502 @error_pages;
error_page 503 @error_pages;
error_page 504 @error_pages;
client_body_buffer_size 16k;
client_header_buffer_size 8k;
'';
appendConfig = ''
worker_processes auto;
worker_cpu_affinity auto;
worker_rlimit_nofile 50000;
'';
eventsConfig = ''
worker_connections 20000;
multi_accept off;
'';
proxyCachePath = {
"skycam" = {
enable = true;
keysZoneName = "skycam_cache";
maxSize = "100m";
};
};
virtualHosts =
{
## Static sites
"jellyfin.vimium.com" = {
forceSSL = true;
enableACME = true;
extraConfig = nginxErrorPages + nginxEdgeHeaders;
locations."/" = {
proxyPass = "http://localhost:8000";
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
"jdholt.com" = {
forceSSL = true;
enableACME = true;
serverAliases = [ "www.jdholt.com" ];
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
locations."/skycam/snapshot.jpg" = {
extraConfig = ''
set $backend "skycam.mesh.vimium.net:8080";
resolver 100.100.100.100;
proxy_pass http://$backend/snapshot;
proxy_cache skycam_cache;
proxy_cache_valid any 10s;
proxy_ignore_headers Cache-Control Expires Set-Cookie;
'';
};
locations."/".return = "301 https://vimium.com$request_uri";
};
"pki.vimium.com" = {
addSSL = true;
forceSSL = false;
enableACME = true;
extraConfig = ''
${nginxErrorPages}
more_set_headers 'Server: Vimium';
'';
locations."/" = {
root = "/var/www/pki.vimium.com";
};
};
"suhailhussain.com" = {
forceSSL = true;
enableACME = true;
serverAliases = [ "www.suhailhussain.com" ];
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
locations."/" = {
root = "/var/www/suhailhussain.com";
};
};
"vimium.com" = {
default = true;
forceSSL = true;
enableACME = true;
serverAliases = [ "www.vimium.com" ];
extraConfig =
nginxErrorPages
+ nginxEdgeHeaders
+ nginxStrictHeaders
+ ''
add_header Content-Security-Policy "default-src 'self' https://vimium.com https://www.vimium.com; style-src 'unsafe-inline'; object-src 'none'; upgrade-insecure-requests" always;
'';
locations."/" = {
root = "/var/www/vimium.com";
};
};
}
## Redirects
// (mkRedirect "h0lt.com" "jdholt.com")
// (mkRedirect "jordanholt.xyz" "jdholt.com")
// (mkRedirect "omnimagic.com" "vimium.com")
// (mkRedirect "omnimagic.net" "vimium.com")
// (mkRedirect "thelostlegend.com" "suhailhussain.com")
// (mkRedirect "vimium.co" "vimium.com")
// (mkRedirect "vimium.co.uk" "vimium.com")
// (mkRedirect "vimium.info" "vimium.com")
// (mkRedirect "vimium.net" "vimium.com")
// (mkRedirect "vimium.org" "vimium.com")
// (mkRedirect "vimium.xyz" "vimium.com");
};
};
}

View File

@ -1,9 +1,16 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
self,
...
}:
with lib; with lib;
let cfg = config.modules.services.photoprism; let
in { cfg = config.modules.services.photoprism;
in
{
options.modules.services.photoprism = { options.modules.services.photoprism = {
enable = mkOption { enable = mkOption {
default = false; default = false;

View File

@ -5,9 +5,10 @@
}: }:
let let
cfg = config.modules.databases.postgresql; cfg = config.modules.services.postgresql;
in { in
options.modules.databases.postgresql = { {
options.modules.services.postgresql = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,11 +1,18 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
self,
...
}:
let let
cfg = config.modules.networking.tailscale; cfg = config.modules.services.tailscale;
headscale = "https://headscale.vimium.net"; headscale = "https://headscale.vimium.net";
hostname = config.networking.hostName; hostname = config.networking.hostName;
in { in
options.modules.networking.tailscale = { {
options.modules.services.tailscale = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,16 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
self,
...
}:
let cfg = config.modules.desktop.gnome; let
in { cfg = config.modules.system.desktop.gnome;
options.modules.desktop.gnome = { in
{
options.modules.system.desktop.gnome = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
@ -208,39 +216,47 @@ in {
}; };
home.configFile = { home.configFile = {
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} { "Kvantum/kvantum.kvconfig".text = lib.generators.toINI { } {
General.theme = "KvLibadwaitaDark"; General.theme = "KvLibadwaitaDark";
}; };
"Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita"; "Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita";
}; };
user.packages = with pkgs; [ user.packages =
authenticator with pkgs;
# bottles [
# bustle authenticator
celluloid # bottles
# d-spy # bustle
# drawing celluloid
# fragments # d-spy
dconf-editor # drawing
ghex # fragments
# gnome-builder dconf-editor
gnome-decoder ghex
gnome-firmware # gnome-builder
gnome-frog gnome-decoder
# gnome-obfuscate gnome-firmware
gnome-podcasts gnome-frog
identity # gnome-obfuscate
# mission-center gnome-podcasts
mousam identity
newsflash # mission-center
ptyxis mousam
# schemes newsflash
shortwave ptyxis
sysprof # schemes
] ++ (if config.virtualisation.podman.enable then [ shortwave
pods sysprof
] else []); ]
++ (
if config.virtualisation.podman.enable then
[
pods
]
else
[ ]
);
environment.systemPackages = with pkgs.unstable; [ environment.systemPackages = with pkgs.unstable; [
adw-gtk3 adw-gtk3

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.hyprland; let
in { cfg = config.modules.system.desktop.hyprland;
options.modules.desktop.hyprland = { in
{
options.modules.system.desktop.hyprland = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.modules.desktop.kde; let
in { cfg = config.modules.system.desktop.kde;
options.modules.desktop.kde = { in
{
options.modules.system.desktop.kde = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,11 +1,16 @@
{ config, lib, pkgs, ... }: {
config,
lib,
...
}:
let let
cfg = config.modules.desktop.mimeapps; cfg = config.modules.system.desktop.mimeapps;
avApp = "io.github.celluloid_player.Celluloid.desktop"; avApp = "io.github.celluloid_player.Celluloid.desktop";
imageApp = "org.gnome.eog.desktop"; imageApp = "org.gnome.eog.desktop";
in { in
options.modules.desktop.mimeapps = { {
options.modules.system.desktop.mimeapps = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;

View File

@ -1,17 +1,24 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
self,
...
}:
with lib; with lib;
let cfg = config.modules.networking.wireless; let
in { cfg = config.modules.system.wireless;
options.modules.networking.wireless = { in
{
options.modules.system.wireless = {
enable = mkOption { enable = mkOption {
default = false; default = false;
example = true; example = true;
description = mdDoc "Automatically connect to known networks"; description = mdDoc "Automatically connect to known networks";
}; };
interfaces = mkOption { interfaces = mkOption {
default = [ ]; # All interfaces default = [ ]; # All interfaces
example = [ "wlan0" ]; example = [ "wlan0" ];
description = mdDoc "Interfaces for `wpa_supplicant` to bind to"; description = mdDoc "Interfaces for `wpa_supplicant` to bind to";
}; };

View File

@ -1,82 +0,0 @@
{ config, options, lib, self, ... }:
with lib;
{
options = with types; {
user = mkOption { type = attrs; default = { }; };
home = {
configFile = mkOption { type = attrs; default = { }; description = "Files to place in $XDG_CONFIG_HOME"; };
dataFile = mkOption { type = attrs; default = { }; description = "Files to place in $XDG_DATA_HOME"; };
file = mkOption { type = attrs; default = { }; description = "Files to place directly in $HOME"; };
packages = mkOption { type = attrs; default = { }; description = "User-level installed packages"; };
programs = mkOption { type = attrs; default = { }; description = "Programs managed directly from home-manager"; };
services = mkOption { type = attrs; default = { }; description = "Services managed directly from home-manager"; };
};
dconf.settings = mkOption { type = attrs; default = { }; description = "dconf settings to enable"; };
env = mkOption {
type = attrsOf (oneOf [ str path (listOf (either str path)) ]);
apply = mapAttrs (n: v:
if isList v then
concatMapStringsSep ":" (x: toString x) v
else
(toString v));
default = { };
description = "";
};
};
config = {
age.secrets."passwords/users/jordan".file = "${self.inputs.secrets}/passwords/users/jordan.age";
user =
let user = builtins.getEnv "USER";
name = if elem user [ "" "root" ] then "jordan" else user;
in {
inherit name;
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "lxd" ];
description = "Jordan Holt";
useDefaultShell = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS jordan@vimium.com"
];
hashedPasswordFile = config.age.secrets."passwords/users/jordan".path;
home = "/home/${name}";
group = "users";
uid = 1000;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${config.user.name} = {
home = {
file = mkAliasDefinitions options.home.file;
stateVersion = config.system.stateVersion;
};
programs = mkAliasDefinitions options.home.programs;
services = mkAliasDefinitions options.home.services;
xdg = {
enable = true;
configFile = mkAliasDefinitions options.home.configFile;
dataFile = mkAliasDefinitions options.home.dataFile;
};
dconf.settings = mkAliasDefinitions options.dconf.settings;
};
sharedModules = [
self.inputs.nixvim.homeManagerModules.nixvim
self.inputs.plasma-manager.homeManagerModules.plasma-manager
];
};
users.users.${config.user.name} = mkAliasDefinitions options.user;
environment.extraInit =
concatStringsSep "\n"
(mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env);
};
}

Some files were not shown because too many files have changed in this diff Show More