From 5a1c9eeacb306ae67c591948a31f49d29e5e7208 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 26 May 2025 14:44:16 +0200 Subject: [PATCH 01/12] 25.05 xps --- configuration.nix | 2 +- flake-modules/rice.nix | 2 +- flake.lock | 229 +++++++++------------- flake.nix | 6 +- home-modules/fish.nix | 2 +- home-modules/helix.nix | 2 +- home-modules/mako.nix | 20 +- home-modules/nh.nix | 2 +- home-modules/vscode.nix | 159 +++++++-------- home.nix | 2 +- system-modules/fonts.nix | 15 +- system-modules/hardware-configuration.nix | 2 +- 12 files changed, 198 insertions(+), 245 deletions(-) diff --git a/configuration.nix b/configuration.nix index 6dc0e36..c116dfc 100644 --- a/configuration.nix +++ b/configuration.nix @@ -134,7 +134,7 @@ systemd.extraConfig = "DefaultLimitNOFILE=2048"; boot.tmp.useTmpfs = false; - system.stateVersion = "24.11"; + system.stateVersion = "25.05"; nixpkgs.config.allowUnfree = true; diff --git a/flake-modules/rice.nix b/flake-modules/rice.nix index c5daa53..039d362 100644 --- a/flake-modules/rice.nix +++ b/flake-modules/rice.nix @@ -42,7 +42,7 @@ pkgs: rec { font = { code = { name = "JetBrainsMono Nerd Font"; - package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }); + package = pkgs.nerd-fonts.jetbrains-mono; # name = "CascadiaCove-NF"; # package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; }); }; diff --git a/flake.lock b/flake.lock index 62797f7..adf40a1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,5 @@ { "nodes": { - "Hyprspace": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1742767019, - "narHash": "sha256-FdyHDbf31jl5rIU7IQtBVTbZ1ojGrrp5aFaRrE2819s=", - "owner": "KZDKM", - "repo": "Hyprspace", - "rev": "5b62529c2011ede6069445de9b5b3f8a1f10ecfe", - "type": "github" - }, - "original": { - "owner": "KZDKM", - "repo": "Hyprspace", - "type": "github" - } - }, "aquamarine": { "inputs": { "hyprutils": [ @@ -41,11 +20,11 @@ ] }, "locked": { - "lastModified": 1742213273, - "narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=", + "lastModified": 1747864449, + "narHash": "sha256-PIjVAWghZhr3L0EFM2UObhX84UQxIACbON0IC0zzSKA=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf", + "rev": "389372c5f4dc1ac0e7645ed29a35fd6d71672ef5", "type": "github" }, "original": { @@ -176,7 +155,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems" }, "locked": { "lastModified": 1731533236, @@ -216,7 +195,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_4" + "systems": "systems_3" }, "locked": { "lastModified": 1681202837, @@ -234,7 +213,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_5" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -281,11 +260,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1743191728, - "narHash": "sha256-LrQd2IkfcmHdBh+pwPEPXzcosBerIEFzz/DbVNzBqig=", + "lastModified": 1748207486, + "narHash": "sha256-4kR7VyauWpNMrBePHMM8yzQvUzHHGRVkQpJ3DyoKcH0=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "1067cd3d8a061eb5b23bc1a4c46ca10af4481941", + "rev": "3f6c02b49e08aed51e4be85d87b79b9dbea34a85", "type": "github" }, "original": { @@ -367,16 +346,16 @@ ] }, "locked": { - "lastModified": 1742655702, - "narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=", + "lastModified": 1748226808, + "narHash": "sha256-GaBRgxjWO1bAQa8P2+FDxG4ANBVhjnSjBms096qQdxo=", "owner": "nix-community", "repo": "home-manager", - "rev": "0948aeedc296f964140d9429223c7e4a0702a1ff", + "rev": "83665c39fa688bd6a1f7c43cf7997a70f6a109f9", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } @@ -397,11 +376,11 @@ ] }, "locked": { - "lastModified": 1742215578, - "narHash": "sha256-zfs71PXVVPEe56WEyNi2TJQPs0wabU4WAlq0XV7GcdE=", + "lastModified": 1745948457, + "narHash": "sha256-lzTV10FJTCGNtMdgW5YAhCAqezeAzKOd/97HbQK8GTU=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "2fd36421c21aa87e2fe3bee11067540ae612f719", + "rev": "ac903e80b33ba6a88df83d02232483d99f327573", "type": "github" }, "original": { @@ -426,11 +405,11 @@ ] }, "locked": { - "lastModified": 1739049071, - "narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=", + "lastModified": 1745015490, + "narHash": "sha256-apEJ9zoSzmslhJ2vOKFcXTMZLUFYzh1ghfB6Rbw3Low=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73", + "rev": "60754910946b4e2dc1377b967b7156cb989c5873", "type": "github" }, "original": { @@ -451,15 +430,15 @@ "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": "nixpkgs", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_3", + "systems": "systems_2", "xdph": "xdph" }, "locked": { - "lastModified": 1743297135, - "narHash": "sha256-4JgyJLuHxeoeSsSbi4MkpVYsI4R74Trov33sIg1fa/0=", + "lastModified": 1748191712, + "narHash": "sha256-mcTcxv85ljvg49blvLM/xmRtyyLyorpZZJ2ZAZYrYzg=", "ref": "refs/heads/main", - "rev": "da2d7c3971d40f841f2afd7def8e4bad9a351e41", - "revCount": 5948, + "rev": "2347050285920925db8bc844e3232bc932eef21e", + "revCount": 6137, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -487,11 +466,11 @@ ] }, "locked": { - "lastModified": 1743339740, - "narHash": "sha256-G6a7R/gb1xH0yI2uevTmDpxZf6rvMh1lOu0gYrqVu5U=", + "lastModified": 1748206008, + "narHash": "sha256-fSQLQXzvw6SLYZ6IUjiZhmTm5oSM/A3llOGo8dudWfE=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "6dca4ece21864e329394b81cfc767778089097e2", + "rev": "a2157f8da740aa7d2909f7e9414f46097d4cd66d", "type": "github" }, "original": { @@ -512,11 +491,11 @@ ] }, "locked": { - "lastModified": 1738422629, - "narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", + "lastModified": 1743714874, + "narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", + "rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2", "type": "github" }, "original": { @@ -580,11 +559,11 @@ ] }, "locked": { - "lastModified": 1739048983, - "narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=", + "lastModified": 1745951494, + "narHash": "sha256-2dModE32doiyQMmd6EDAQeZnz+5LOs6KXyE0qX76WIg=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8", + "rev": "4be1d324faf8d6e82c2be9f8510d299984dfdd2e", "type": "github" }, "original": { @@ -609,11 +588,11 @@ ] }, "locked": { - "lastModified": 1741191527, - "narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=", + "lastModified": 1747484975, + "narHash": "sha256-+LAQ81HBwG0lwshHlWe0kfWg4KcChIPpnwtnwqmnoEU=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "72df3861f1197e41b078faa3e38eedd60e00018d", + "rev": "163c83b3db48a17c113729c220a60b94596c9291", "type": "github" }, "original": { @@ -629,11 +608,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1741036724, - "narHash": "sha256-nCsqa5dXW1Qja+smRkVpNkGAHfYkBFJ6U3bVilY5pDo=", + "lastModified": 1745860672, + "narHash": "sha256-tJKLjWaOcJW4Ttu1noSY+lddlJvyX2eonTrgR5IycZo=", "owner": "h3rmt", "repo": "hyprswitch", - "rev": "3feeccf2f1d3d6c0fb7c79b965ccf382118651d2", + "rev": "313e7d5730af2e37ab73fe238b1bd3a2d3e5552f", "type": "github" }, "original": { @@ -655,11 +634,11 @@ ] }, "locked": { - "lastModified": 1741534688, - "narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=", + "lastModified": 1746635225, + "narHash": "sha256-W9G9bb0zRYDBRseHbVez0J8qVpD5QbizX67H/vsudhM=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3", + "rev": "674ea57373f08b7609ce93baff131117a0dfe70d", "type": "github" }, "original": { @@ -680,11 +659,11 @@ ] }, "locked": { - "lastModified": 1739870480, - "narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=", + "lastModified": 1747584298, + "narHash": "sha256-PH9qZqWLHvSBQiUnA0NzAyQA3tu2no2z8kz0ZeHWj4w=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b", + "rev": "e511882b9c2e1d7a75d45d8fddd2160daeafcbc3", "type": "github" }, "original": { @@ -720,11 +699,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1742669843, - "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", + "lastModified": 1748026106, + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e5b653dff12029333a6546c11e108ede13052eb", + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", "type": "github" }, "original": { @@ -736,11 +715,11 @@ }, "nixpkgs-latest": { "locked": { - "lastModified": 1743346368, - "narHash": "sha256-DJv361yCiMiMyKA1elFtgJ9CbK/nEXLKj7vY0zUBmTk=", + "lastModified": 1748252565, + "narHash": "sha256-fM7t3DtPmu2Gl+gBsTUmaM/TB304HYBmqqRxTunKZq0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e68c2965da5c7f149dd8543c63d7217753e00c32", + "rev": "03033743f9afc2593dd354c68d7295f946cda6db", "type": "github" }, "original": { @@ -812,11 +791,11 @@ }, "nixpkgs-unstable_2": { "locked": { - "lastModified": 1743095683, - "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", + "lastModified": 1748026106, + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", "type": "github" }, "original": { @@ -858,26 +837,26 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1743231893, - "narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=", + "lastModified": 1748162331, + "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c570c1f5304493cafe133b8d843c7c1c4a10d3a6", + "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.11", + "ref": "nixos-25.05", "type": "indirect" } }, "nixpkgs_5": { "locked": { - "lastModified": 1737003892, - "narHash": "sha256-RCzJE9wKByLCXmRBp+z8LK9EgdW+K+W/DXnJS4S/NVo=", + "lastModified": 1747312588, + "narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae06b9c2d83cb5c8b12d7d0e32692e93d1379713", + "rev": "b1bebd0fe266bbd1820019612ead889e96a8fa2d", "type": "github" }, "original": { @@ -913,11 +892,11 @@ ] }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1747372754, + "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", "type": "github" }, "original": { @@ -959,7 +938,6 @@ }, "root": { "inputs": { - "Hyprspace": "Hyprspace", "ghostty": "ghostty", "home-manager": "home-manager", "hyprland": "hyprland", @@ -1029,11 +1007,11 @@ ] }, "locked": { - "lastModified": 1737080704, - "narHash": "sha256-n+J2h9GM9ZpFOQUmtZoCr1+DFF/iO5UlmLJeHIxbZGY=", + "lastModified": 1747363019, + "narHash": "sha256-N4dwkRBmpOosa4gfFkFf/LTD8oOcNkAyvZ07JvRDEf0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "f9953fe89f8b65401fc4d4a288940bc2cb072949", + "rev": "0e624f2b1972a34be1a9b35290ed18ea4b419b6f", "type": "github" }, "original": { @@ -1049,11 +1027,11 @@ ] }, "locked": { - "lastModified": 1743305778, - "narHash": "sha256-Ux/UohNtnM5mn9SFjaHp6IZe2aAnUCzklMluNtV6zFo=", + "lastModified": 1747603214, + "narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", "owner": "Mic92", "repo": "sops-nix", - "rev": "8e873886bbfc32163fe027b8676c75637b7da114", + "rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", "type": "github" }, "original": { @@ -1063,21 +1041,6 @@ } }, "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1092,7 +1055,7 @@ "type": "github" } }, - "systems_3": { + "systems_2": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1107,6 +1070,21 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_4": { "locked": { "lastModified": 1681028828, @@ -1137,21 +1115,6 @@ "type": "github" } }, - "systems_6": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, "xdph": { "inputs": { "hyprland-protocols": [ @@ -1180,11 +1143,11 @@ ] }, "locked": { - "lastModified": 1741934139, - "narHash": "sha256-ZhTcTH9FoeAtbPfWGrhkH7RjLJZ7GeF18nygLAMR+WE=", + "lastModified": 1745871725, + "narHash": "sha256-M24SNc2flblWGXFkGQfqSlEOzAGZnMc9QG3GH4K/KbE=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "150b0b6f52bb422a1b232a53698606fe0320dde0", + "rev": "76bbf1a6b1378e4ab5230bad00ad04bc287c969e", "type": "github" }, "original": { @@ -1200,11 +1163,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1743344227, - "narHash": "sha256-Lp1JUMrhvAmCzftOSQ2Sr0+svemxSxcLeZ4HkmdLXbE=", + "lastModified": 1748249183, + "narHash": "sha256-I+JvW3752iZq4QrTOUDvhVA++0LHq974XxHjQrjA6lM=", "owner": "sxyazi", "repo": "yazi", - "rev": "1765aba68440f73c590cedac14ece6778fe88ff5", + "rev": "74a8ea9bc0289f093c34b15755c05fa25a1c5ace", "type": "github" }, "original": { @@ -1221,14 +1184,14 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_6" + "systems": "systems_5" }, "locked": { - "lastModified": 1742573336, - "narHash": "sha256-7cVQTyMA9V1YqqVXwaxmrsUKE8LjnBdIj6fvpKKuAxo=", + "lastModified": 1747505540, + "narHash": "sha256-wJTXPH8VellWNupRxMvv9kkIo+271t4XVupgvT1RkTU=", "owner": "lordkekz", "repo": "nix-yazi-plugins", - "rev": "76e0104f5bfc2517d86cae0332ede54c6d5ba4e8", + "rev": "f3daa56d0f9ea29bd1ecff557f3604ada00fbe31", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5a73b4e..ede63e3 100644 --- a/flake.nix +++ b/flake.nix @@ -2,16 +2,16 @@ description = "Multisystem NixOS Flake of Lennart J. Kurzweg"; inputs = { - nixpkgs = { url = "nixpkgs/nixos-24.11"; }; + nixpkgs = { url = "nixpkgs/nixos-25.05"; }; nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; }; nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; }; - home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; }; hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; - Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; }; + # Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; }; hyprswitch = { url = "github:h3rmt/hyprswitch/release"; }; yazi.url = "github:sxyazi/yazi"; diff --git a/home-modules/fish.nix b/home-modules/fish.nix index bfecb3b..c749406 100644 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -17,7 +17,7 @@ ⠀⠀⠀⠀⠀⣰⣿⣿⣿⡄⠉⠉⢻⣿⣏⠉⠉⠀⠀⠀ TFM ⠀⠀⠀⠀⠰⣿⠟⠀⢻⣿⣆⠀⠀⠻⣿⠆⠀⠀⠀⠀ PROMPT - " | lolcat --force) + " | lolcat --force 2> /dev/null) msg=" $(echo -e "$logo" | sed -n 3p): $(cat /etc/*-release | grep PRETTY_NAME | cut -c 14- | rev | cut -c 2- | rev) diff --git a/home-modules/helix.nix b/home-modules/helix.nix index 24add18..84c330e 100644 --- a/home-modules/helix.nix +++ b/home-modules/helix.nix @@ -10,7 +10,7 @@ python311Packages.python-lsp-server jdt-language-server ruff - ruff-lsp + # ruff-lsp pyright lldb # debugger for llvm stuff yaml-language-server # yaml diff --git a/home-modules/mako.nix b/home-modules/mako.nix index 67d8c67..298516e 100644 --- a/home-modules/mako.nix +++ b/home-modules/mako.nix @@ -3,14 +3,16 @@ home.packages = with pkgs; [ libnotify ]; services.mako = with rice; { enable = true; - defaultTimeout = 10000; # in ms - backgroundColor = color.background; - textColor = color.foreground; - borderColor = color.border; - borderSize = border-width; - font = font.code.name; - borderRadius = rounding; - anchor = "top-right"; - margin = builtins.toString (gap-size * 2) ; + settings = { + defaultTimeout = 10000; # in ms + backgroundColor = color.background; + textColor = color.foreground; + borderColor = color.border; + borderSize = border-width; + font = font.code.name; + borderRadius = rounding; + anchor = "top-right"; + margin = builtins.toString (gap-size * 2) ; + }; }; } diff --git a/home-modules/nh.nix b/home-modules/nh.nix index b03c1b5..737ace7 100644 --- a/home-modules/nh.nix +++ b/home-modules/nh.nix @@ -7,7 +7,7 @@ nvd ]; sessionVariables = { - FLAKE = "${config.home.homeDirectory}/nix-dots"; + NH_FLAKE = "${config.home.homeDirectory}/nix-dots"; }; }; } diff --git a/home-modules/vscode.nix b/home-modules/vscode.nix index 6ef5d6d..6a3fa2c 100644 --- a/home-modules/vscode.nix +++ b/home-modules/vscode.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, user, host, rice, allowed, ... }: +{ config, pkgs, lib, host, rice, ... }: { config = lib.mkIf (host != "NxACE") { home.packages = [ @@ -8,91 +8,80 @@ programs.vscode = { enable = true; package = pkgs.vscodium; - extensions = with pkgs.vscode-extensions; [ - jnoortheen.nix-ide - ms-python.python - ms-python.black-formatter - redhat.vscode-yaml - redhat.vscode-xml - ms-python.python - mhutchie.git-graph - github.vscode-pull-request-github - esbenp.prettier-vscode - gencer.html-slim-scss-css-class-completion - donjayamanne.githistory - mads-hartmann.bash-ide-vscode - bungcip.better-toml - arrterian.nix-env-selector - # ms-vscode-remote.remote-ssh - - ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "just-black"; - publisher = "nur"; - version = "3.1.1"; - sha256 = "sha256-fatJZquCDsLDFGVzBol2D6LIZUbZ6GzqcVEFAwLodW0="; - } - { - name = "vscode-sshfs"; - publisher = "Kelvin"; - version = "1.26.1"; - sha256 = "sha256-WO9vYELNvwmuNeI05sUBE969KAiKYtrJ1fRfdZx3OYU="; - } - { - name = "color-highlight"; - publisher = "naumovs"; - version = "2.8.0"; - sha256 = "sha256-mT2P1lEdW66YkDRN6fi0rmmvvyBfXiJjAUHns8a8ipE="; - } - { - name = "dancehelix"; - publisher = "silverquark"; - version = "0.5.16"; - sha256 = "sha256-oHwtlbB18ctEnfStDOpJ+2/Kq41JZog8FVhTa1/s7m0="; - } - # { - # name = "remote-ssh-edit"; - # publisher = "ms-vscode-remote"; - # version = "0.86.0"; - # sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g"; - # } - # { - # name = "remote-ssh"; - # publisher = "ms-vscode-remote"; - # version = "0.110.2024030715"; - # sha256 = "sha256-gkxrBwPRDdLFaxc1/vYFBsv4Z0JOhDzb8LrLhkToC/g="; - # } - ]; - userSettings = { - workbench.colorTheme = "Just Black"; - editor.fontFamily = "'${rice.font.code.name}', 'monospace', monospace"; - remote.SSH.useLocalServer = false; + profiles.default ={ + userSettings = { + workbench.colorTheme = "Just Black"; + editor.fontFamily = "'${rice.font.code.name}', 'monospace', monospace"; + remote.SSH.useLocalServer = false; + }; + keybindings = [ + { + key = "ctrl+d"; + command = "editor.action.deleteLines"; + when = "textInputFocus"; + } + { + key = "ctrl+shift+d"; + command = "editor.action.duplicateSelection"; + when = "textInputFocus"; + } + { + # unset so that ctrl d is not set twice + key = ""; + command = "editor.action.addSelectionToNextFindMatch"; + when = "editorFocus"; + } + { + # unset so that ctrl shift d is not set twice + key = ""; + command = "workbench.view.debug"; + } + ]; + + extensions = with pkgs.vscode-extensions; [ + jnoortheen.nix-ide + ms-python.python + ms-python.black-formatter + redhat.vscode-yaml + redhat.vscode-xml + ms-python.python + mhutchie.git-graph + github.vscode-pull-request-github + esbenp.prettier-vscode + gencer.html-slim-scss-css-class-completion + donjayamanne.githistory + mads-hartmann.bash-ide-vscode + bungcip.better-toml + arrterian.nix-env-selector + ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + { + name = "just-black"; + publisher = "nur"; + version = "3.1.1"; + sha256 = "sha256-fatJZquCDsLDFGVzBol2D6LIZUbZ6GzqcVEFAwLodW0="; + } + { + name = "vscode-sshfs"; + publisher = "Kelvin"; + version = "1.26.1"; + sha256 = "sha256-WO9vYELNvwmuNeI05sUBE969KAiKYtrJ1fRfdZx3OYU="; + } + { + name = "color-highlight"; + publisher = "naumovs"; + version = "2.8.0"; + sha256 = "sha256-mT2P1lEdW66YkDRN6fi0rmmvvyBfXiJjAUHns8a8ipE="; + } + { + name = "dancehelix"; + publisher = "silverquark"; + version = "0.5.16"; + sha256 = "sha256-oHwtlbB18ctEnfStDOpJ+2/Kq41JZog8FVhTa1/s7m0="; + } + ]; + enableUpdateCheck = false; + enableExtensionUpdateCheck = false; }; - enableUpdateCheck = false; - enableExtensionUpdateCheck = false; - keybindings = [ - { - key = "ctrl+d"; - command = "editor.action.deleteLines"; - when = "textInputFocus"; - } - { - key = "ctrl+shift+d"; - command = "editor.action.duplicateSelection"; - when = "textInputFocus"; - } - { - # unset so that ctrl d is not set twice - key = ""; - command = "editor.action.addSelectionToNextFindMatch"; - when = "editorFocus"; - } - { - # unset so that ctrl shift d is not set twice - key = ""; - command = "workbench.view.debug"; - } - ]; }; }; diff --git a/home.nix b/home.nix index b77d179..5386476 100644 --- a/home.nix +++ b/home.nix @@ -115,7 +115,7 @@ wl-clipboard xclip xfce.thunar - xournal + # xournal yt-dlp inputs.zen-browser.packages."${system}".default diff --git a/system-modules/fonts.nix b/system-modules/fonts.nix index 9c88a2e..4b237d2 100644 --- a/system-modules/fonts.nix +++ b/system-modules/fonts.nix @@ -1,9 +1,4 @@ -{ - pkgs, - # pkgs-unstable, - rice, - ... -}: +{ pkgs, rice, ... }: { fonts.packages = with pkgs; [ noto-fonts @@ -12,10 +7,14 @@ noto-fonts-emoji newcomputermodern atkinson-hyperlegible - (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + nerd-fonts.jetbrains-mono + nerd-fonts.zed-mono + nerd-fonts.profont + nerd-fonts.proggy-clean-tt + nerd-fonts.heavy-data + nerd-fonts._3270 ] ++ (with rice.font; [ base.package code.package - # ]) ++ (with pkgs-unstable; [ ]); } diff --git a/system-modules/hardware-configuration.nix b/system-modules/hardware-configuration.nix index 86e2351..dfa9c5e 100644 --- a/system-modules/hardware-configuration.nix +++ b/system-modules/hardware-configuration.nix @@ -46,7 +46,7 @@ } else {}; hardware.graphics.extraPackages = if host == "NxXPS" then with pkgs; [ - (if (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") then vaapiIntel else intel-vaapi-driver) + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "25.05") then vaapiIntel else intel-vaapi-driver) libvdpau-va-gl intel-media-driver ] else []; From d3b5bb0d602d293cf444eef7cfb65add8bbfc051 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 26 May 2025 14:44:28 +0200 Subject: [PATCH 02/12] chatterino new --- git-crypt/secrets.nix | Bin 3490 -> 3490 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/git-crypt/secrets.nix b/git-crypt/secrets.nix index 04e30d37e99c1e58a3508f07aa03c3fad4c3bcda..8260cd78ad26437fe5cd771078e969e7e0c7508d 100644 GIT binary patch literal 3490 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 From 0a52deb024d41f06d6bb0fd3525fa71ca98416cf Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 26 May 2025 14:44:39 +0200 Subject: [PATCH 03/12] js lsp --- home-modules/programming/js.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-modules/programming/js.nix b/home-modules/programming/js.nix index e2decfd..603de44 100644 --- a/home-modules/programming/js.nix +++ b/home-modules/programming/js.nix @@ -3,5 +3,6 @@ lib.mkIf (host != "NxACE") { home.packages = with pkgs; [ nodejs + typescript-language-server ]; } From b36e420e89dac04e068b128c251da8411b5a9475 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 26 May 2025 14:45:18 +0200 Subject: [PATCH 04/12] yazi js edit --- home-modules/yazi.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index 3a2268d..26cb6ed 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -268,6 +268,7 @@ { mime = "audio/*"; use = "play"; } { mime = "application/x-httpd-php"; use = [ "edit" "browser" ]; } + { mime = "application/javascript"; use = "edit"; } { mime = "application/json"; use = "edit"; } { mime = "application/ld+json"; use = "edit"; } { mime = "application/pdf"; use = "document"; } From 031215cb4f127770010f6c3ff56bb0fd1baee9b6 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 26 May 2025 14:45:40 +0200 Subject: [PATCH 05/12] waybar fix center, no event --- home-modules/waybar.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/home-modules/waybar.nix b/home-modules/waybar.nix index b4de74f..befc2b3 100644 --- a/home-modules/waybar.nix +++ b/home-modules/waybar.nix @@ -166,6 +166,7 @@ if __name__ == "__main__": margin-bottom = 0; margin-right = 0; spacing = 10; + fixed-center = true; modules-left = [ # "cpu" # "memory" @@ -180,7 +181,7 @@ if __name__ == "__main__": ]; modules-right = [ "custom/mode" - "custom/caldav_event" + # "custom/caldav_event" "custom/cclock" "tray" ]; @@ -203,6 +204,7 @@ if __name__ == "__main__": format = "󰃰${sep}{}"; exec = "caldav_event"; restart-interval = 60; + max-width = 60; }; "custom/mode" = { exec = "cat /tmp/waybar-mode"; @@ -302,6 +304,10 @@ if __name__ == "__main__": color: rgb(${f accent.bright}); } + #workspaces { + font-family: ${rice.font.code.name}; + } + #workspaces button { color: rgb(${f accent.base}); padding-left: 15px; @@ -326,7 +332,7 @@ if __name__ == "__main__": color: rgb(${f red.base}); } - #window, #custom-ctimeremaining { + #window, #custom-caldav_event { font-family: ${rice.font.base.name}, ${rice.font.code.name}; color: rgb(${f tertiary.bright}); } From a769f9eb1f1fc049cd99da5c1770c446fcd48d86 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 26 May 2025 14:46:13 +0200 Subject: [PATCH 06/12] zathura hotkey --- home-modules/hyprland.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index 52b1222..40c50f7 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -409,8 +409,7 @@ in { # "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace"" "SUPER, T, exec, SESSION_FROM_DE=TRUE ${terminal}" "SUPER SHIFT, T, exec, ${terminal-exec}'ssh nxace'" - "SUPER, Z, exec, waybar_mode set ' '" - "SUPER, Z, submap, tuda" + "SUPER, Z, exec, zathura" "SUPER, U, exec, [tile] thunderbird " "SUPER, I, exec, ${terminal-exec}'hx ~/nix-dots/ && fish'" "SUPER SHIFT, I, exec, ${terminal-exec}'nh home switch || read'" @@ -564,8 +563,12 @@ in { ${action_simple { key = "X"; cmd = "exec,firefox https://nx2.site";}} ${action_simple { key = "Y"; cmd = "exec,firefox https://youtube.com";}} ${action_simple { key = "P"; cmd = "exec,firefox https://pw.nx2.site";}} - bind = , Escape, exec, waybar_mode unset - bind = , Escape, submap, reset + ${action_simple { key = "P"; cmd = "exec,firefox https://pw.nx2.site";}} + bind=,Z,exec,waybar_mode set ' ' + bind=,Z,submap,tuda + bind=,Z,submap,reset + bind=,Escape,exec,waybar_mode unset + bind=,Escape,submap,reset submap = reset From 09837534eade51f05eb8a803ead8b9aec813ef41 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 26 May 2025 14:46:42 +0200 Subject: [PATCH 07/12] fix vesktop multi gpu --- home-modules/hyprland.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index 40c50f7..0f4971e 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -427,7 +427,7 @@ in { "SUPER, A, execr, waybar_mode set ' 󰹑 '" "SUPER, A, submap, scrL" "SUPER, S, exec, spotify" - "SUPER, D, exec, vesktop" + "SUPER, D, exec, vesktop --disable-gpu-compositing" "SUPER, F, fullscreen" # "SUPER, G," "SUPER, H, movefocus, l" From a60e90ab8f28521eed245db8b90315a7df24f93f Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Tue, 27 May 2025 07:15:44 +0000 Subject: [PATCH 08/12] New Flake Style + WSL + NixOnDroid --- flake.lock | 236 +++++++++++++++- flake.nix | 126 ++++++--- home-modules/bitwarden.nix | 29 +- home-modules/calendar.nix | 12 +- home-modules/direnv.nix | 2 +- home-modules/discord.nix | 4 +- home-modules/email.nix | 6 +- home-modules/firefox.nix | 426 +++++++++++++++-------------- home-modules/games.nix | 6 +- home-modules/gestures.nix | 4 +- home-modules/ghostty.nix | 2 +- home-modules/gpg.nix | 7 +- home-modules/helix.nix | 12 +- home-modules/latex.nix | 4 +- home-modules/nh.nix | 6 +- home-modules/pkgs-list/shell.nix | 37 +++ home-modules/programming/gleam.nix | 7 +- home-modules/programming/js.nix | 3 +- home-modules/sops.nix | 4 +- home-modules/ssh.nix | 6 +- home-modules/starship.nix | 7 +- home-modules/yazi.nix | 10 +- home.nix | 21 +- nixos-wsl.nix | 22 ++ shell-only.nix | 44 +++ system-modules/adb.nix | 2 +- system-modules/docker.nix | 4 +- system-modules/networking.nix | 14 +- system-modules/sshd.nix | 8 +- system-modules/tuda.nix | 13 + system-modules/users.nix | 5 +- 31 files changed, 717 insertions(+), 372 deletions(-) create mode 100644 home-modules/pkgs-list/shell.nix create mode 100644 nixos-wsl.nix create mode 100644 shell-only.nix create mode 100644 system-modules/tuda.nix diff --git a/flake.lock b/flake.lock index 62797f7..97e5949 100644 --- a/flake.lock +++ b/flake.lock @@ -135,6 +135,22 @@ "type": "github" } }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -381,6 +397,27 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nix-on-droid", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709445365, + "narHash": "sha256-DVv6nd9FQBbMWbOmhq0KVqmlc3y3FMSYl49UXmMcO+0=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "4de84265d7ec7634a69ba75028696d74de9a44a7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -718,6 +755,75 @@ "type": "github" } }, + "nix-formatter-pack": { + "inputs": { + "nixpkgs": [ + "nix-on-droid", + "nixpkgs" + ], + "nmd": "nmd", + "nmt": "nmt" + }, + "locked": { + "lastModified": 1705252799, + "narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=", + "owner": "Gerschtli", + "repo": "nix-formatter-pack", + "rev": "2de39dedd79aab14c01b9e2934842051a160ffa5", + "type": "github" + }, + "original": { + "owner": "Gerschtli", + "repo": "nix-formatter-pack", + "type": "github" + } + }, + "nix-on-droid": { + "inputs": { + "home-manager": "home-manager_2", + "nix-formatter-pack": "nix-formatter-pack", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-docs": "nixpkgs-docs", + "nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap", + "nmd": "nmd_2" + }, + "locked": { + "lastModified": 1720396533, + "narHash": "sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q=", + "owner": "nix-community", + "repo": "nix-on-droid", + "rev": "f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.05", + "repo": "nix-on-droid", + "type": "github" + } + }, + "nixos-wsl": { + "inputs": { + "flake-compat": "flake-compat_4", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1746453552, + "narHash": "sha256-r66UGha+7KVHkI7ksrcMjnw/mm9Sg4l5bQlylxHwdGU=", + "owner": "nix-community", + "repo": "NixOS-WSL", + "rev": "be618645aa0adf461f778500172b6896d5ab2d01", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "main", + "repo": "NixOS-WSL", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1742669843, @@ -734,6 +840,38 @@ "type": "github" } }, + "nixpkgs-docs": { + "locked": { + "lastModified": 1705957679, + "narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9a333eaa80901efe01df07eade2c16d183761fa3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-for-bootstrap": { + "locked": { + "lastModified": 1720244366, + "narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", + "type": "github" + } + }, "nixpkgs-latest": { "locked": { "lastModified": 1743346368, @@ -857,6 +995,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1742937945, + "narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1743231893, "narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=", @@ -871,7 +1025,7 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1737003892, "narHash": "sha256-RCzJE9wKByLCXmRBp+z8LK9EgdW+K+W/DXnJS4S/NVo=", @@ -887,7 +1041,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1727348695, "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", @@ -903,6 +1057,60 @@ "type": "github" } }, + "nmd": { + "flake": false, + "locked": { + "lastModified": 1666190571, + "narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=", + "owner": "rycee", + "repo": "nmd", + "rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169", + "type": "gitlab" + }, + "original": { + "owner": "rycee", + "repo": "nmd", + "type": "gitlab" + } + }, + "nmd_2": { + "inputs": { + "nixpkgs": [ + "nix-on-droid", + "nixpkgs-docs" + ], + "scss-reset": "scss-reset" + }, + "locked": { + "lastModified": 1705050560, + "narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=", + "owner": "~rycee", + "repo": "nmd", + "rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3", + "type": "sourcehut" + }, + "original": { + "owner": "~rycee", + "repo": "nmd", + "type": "sourcehut" + } + }, + "nmt": { + "flake": false, + "locked": { + "lastModified": 1648075362, + "narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=", + "owner": "rycee", + "repo": "nmt", + "rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae", + "type": "gitlab" + }, + "original": { + "owner": "rycee", + "repo": "nmt", + "type": "gitlab" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_2", @@ -966,7 +1174,9 @@ "hyprland-plugins": "hyprland-plugins", "hyprswitch": "hyprswitch", "lanzaboote": "lanzaboote", - "nixpkgs": "nixpkgs_4", + "nix-on-droid": "nix-on-droid", + "nixos-wsl": "nixos-wsl", + "nixpkgs": "nixpkgs_5", "nixpkgs-latest": "nixpkgs-latest", "nixpkgs-unstable": "nixpkgs-unstable_2", "sops-nix": "sops-nix", @@ -1042,6 +1252,22 @@ "type": "github" } }, + "scss-reset": { + "flake": false, + "locked": { + "lastModified": 1631450058, + "narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=", + "owner": "andreymatin", + "repo": "scss-reset", + "rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91", + "type": "github" + }, + "original": { + "owner": "andreymatin", + "repo": "scss-reset", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": [ @@ -1196,7 +1422,7 @@ "yazi": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_3" }, "locked": { @@ -1239,7 +1465,7 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1727721329, diff --git a/flake.nix b/flake.nix index 5a73b4e..db82a6e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,72 +1,116 @@ -{ +rec { description = "Multisystem NixOS Flake of Lennart J. Kurzweg"; inputs = { - nixpkgs = { url = "nixpkgs/nixos-24.11"; }; - nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; }; - nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; }; - home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; - sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; }; - hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; - hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; - Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; }; - hyprswitch = { url = "github:h3rmt/hyprswitch/release"; }; + nixpkgs = { url = "nixpkgs/nixos-24.11"; }; + nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; }; + nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; }; - yazi.url = "github:sxyazi/yazi"; - yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; }; - zen-browser.url = "github:MarceColl/zen-browser-flake"; - ghostty.url = "github:ghostty-org/ghostty"; + home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nixos-wsl = { url = "github:nix-community/NixOS-WSL/main"; }; + nix-on-droid = { url = "github:nix-community/nix-on-droid/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + + sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; }; + + hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; + hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; + Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; }; + hyprswitch = { url = "github:h3rmt/hyprswitch/release"; }; + + yazi = { url = "github:sxyazi/yazi"; }; + yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; }; + zen-browser = { url = "github:MarceColl/zen-browser-flake"; }; + ghostty = { url = "github:ghostty-org/ghostty"; }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let - system = "x86_64-linux"; - user = "nx2"; - domain = "nx2.site"; + outputs = { self, ... }@inputs: with inputs; let - config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; + system = "x86_64-linux"; + # config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; + config = {}; + + hyper-base = rec { + inherit system; + user = "nx2"; + domain = "nx2.site"; + home = "/home/${user}"; # no tailing slash! + }; - pkgs = import nixpkgs { inherit system config; }; - pkgs-unstable = import nixpkgs-unstable { inherit system config; }; - pkgs-latest = import nixpkgs-latest { inherit system config; }; + pkgs = import nixpkgs { inherit system config; } // { + unstable = import nixpkgs-unstable { inherit system config; }; + latest = import nixpkgs-latest { inherit system config; }; + version = "24.11"; + }; nvidia-set = import ./flake-modules/nvidia.nix; secrets = import ./git-crypt/secrets.nix; rice = import ./flake-modules/rice.nix pkgs; + in { nixosConfigurations = let - make-nixos-system = host: nixpkgs.lib.nixosSystem { + make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem { inherit system; modules = [ ./configuration.nix ]; specialArgs = let - nvidia = nvidia-set // { - enable = if (host == "NxXPS" || host == "NxNORTH") then true else false; - prime = if (host == "NxXPS") then true else false; - }; - in { inherit inputs user host domain pkgs-unstable pkgs-latest secrets rice nvidia; }; + nvidia = nvidia-set // nvidia-settings; + hyper = hyper-base // { inherit host; }; + in { inherit pkgs inputs hyper rice secrets nvidia; }; + }; + make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem { + inherit system; + modules = [ ./nixos-wsl.nix ]; + specialArgs = let + hyper = hyper-base // { inherit host; }; + in { inherit pkgs inputs hyper rice; }; + }; + make-nixondroid-system = host: nixpkgs.lib.nixosSystem { + inherit system; + modules = [ ./nix-on-droid.nix ]; + specialArgs = let + hyper = hyper-base // { + inherit host; + system = "aarch64-linux"; + home = assert 1 == 2; ""; + }; + in { inherit pkgs inputs hyper rice; }; }; in { - NxXPS = make-nixos-system "NxXPS"; - NxNORTH = make-nixos-system "NxNORTH"; - NxACE = make-nixos-system "NxACE"; + NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; }; + NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; }; + NxACE = make-nixos-system "NxACE" { enable = false; }; + + NxWSL = make-nixos-wsl-system "NxWSL"; + + NxS23U = make-nixondroid-system "NxS23U"; }; homeConfigurations = let - make-home-configuration = host: user: home-manager.lib.homeManagerConfiguration { + make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ ./home.nix ]; extraSpecialArgs = let - nvidia = nvidia-set // { - enable = if (host == "NxXPS" || host == "NxNORTH") then true else false; - prime = if (host == "NxXPS") then true else false; - }; - in { inherit inputs system user host domain pkgs-unstable pkgs-latest rice secrets nvidia; }; + hyper = hyper-base // { inherit host; }; + nvidia = nvidia-set // nvidia-settings; + in { inherit pkgs inputs hyper rice secrets nvidia; }; + }; + make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ ./shell-only.nix ]; + extraSpecialArgs = let + hyper = hyper-base // { inherit host; }; + in { inherit pkgs inputs hyper rice secrets; }; }; in { - "${user}@NxXPS" = make-home-configuration "NxXPS" user; - "${user}@NxNORTH" = make-home-configuration "NxNORTH" user; - "${user}@NxACE" = make-home-configuration "NxACE" user; + "${hyper-base.user}@NxXPS" = make-home-configuration "NxXPS" hyper-base.user { enable = true; prime = true; }; + "${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; }; + "${hyper-base.user}@NxACE" = make-home-configuration "NxACE" hyper-base.user { enable = false; }; + + "${hyper-base.user}@NxS23U" = make-shell-configuration "NxS23U" hyper-base.user; + + "${hyper-base.user}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user; }; }; } diff --git a/home-modules/bitwarden.nix b/home-modules/bitwarden.nix index b5414d8..5834d90 100644 --- a/home-modules/bitwarden.nix +++ b/home-modules/bitwarden.nix @@ -1,33 +1,8 @@ -{ config, pkgs, lib, host, secrets, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper ... }: +lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ bitwarden bitwarden-cli ]; - - # home.file.".config/Bitwarden CLI/data.json".text = '' - # { - # "stateVersion": 9, - # "global": { - # "theme": "system", - # "window": {}, - # "environmentUrls": { - # "base": "https://pw.nx2.site", - # "api": null, - # "identity": null, - # "webVault": null, - # "icons": null, - # "notifications": null, - # "events": null, - # "keyConnector": null - # }, - # "region": "Self-hosted", - # "installedVersion": "2023.12.0" - # } - # } - # ''; - - # home.sessionVariables.BW_SESSION = secrets.bitwarden.env.bw-session; - } diff --git a/home-modules/calendar.nix b/home-modules/calendar.nix index d185cf2..6a43682 100644 --- a/home-modules/calendar.nix +++ b/home-modules/calendar.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, user, secrets, domain, ... }: let - calendars = [ +{ pkgs, hyper, secrets, ... }: let + calendars = with hyper; [ { name = "Preservation"; primary = true; @@ -82,10 +82,10 @@ in { inherit primary; remote = { inherit url name; - userName = user; # my globally set username + userName = hyper.user; # my globally set username }; }; - in lib.attrsets.mergeAttrsList ( + in pkgs.lib.attrsets.mergeAttrsList ( map (calendar: { "${calendar.name}" = transform_caledar_set ( default_set // calendar ); }) calendars @@ -93,7 +93,7 @@ in { programs.thunderbird.settings = let to_safe_name = name: (builtins.replaceStrings ["."] ["-"]) name; - in (lib.attrsets.mergeAttrsList ( + in (pkgs.lib.attrsets.mergeAttrsList ( map (calendar: with ( default_set // calendar ); { "calendar.registry.${to_safe_name calendar.name}.cache.enabled" = true; "calendar.registry.${to_safe_name calendar.name}.calendar-main-default" = primary; @@ -106,7 +106,7 @@ in { "calendar.registry.${to_safe_name calendar.name}.readOnly" = read-only; }) calendars ) // { - "calendar.list.sortOrder" = lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars; + "calendar.list.sortOrder" = pkgs.lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars; "calendar.week.start" = 1; }); } diff --git a/home-modules/direnv.nix b/home-modules/direnv.nix index 3cd677c..7f2470b 100644 --- a/home-modules/direnv.nix +++ b/home-modules/direnv.nix @@ -1,4 +1,4 @@ -{ lib, user, ... }: +{ ... }: { programs = { direnv = { diff --git a/home-modules/discord.nix b/home-modules/discord.nix index 6134473..d3810f9 100644 --- a/home-modules/discord.nix +++ b/home-modules/discord.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home = { packages = with pkgs; [ diff --git a/home-modules/email.nix b/home-modules/email.nix index 374837d..417e51b 100644 --- a/home-modules/email.nix +++ b/home-modules/email.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, user, rice, secrets, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, rice, secrets, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ thunderbird @@ -13,7 +13,7 @@ lib.mkIf (host != "NxACE") in { enable = true; profiles = { - "${user}" = { + "${hyepr.user}" = { isDefault = true; settings = with rice.color; { "calendar.alarms.showmissed" = false; diff --git a/home-modules/firefox.nix b/home-modules/firefox.nix index 7524dd9..313231a 100644 --- a/home-modules/firefox.nix +++ b/home-modules/firefox.nix @@ -1,258 +1,262 @@ -# { pkgs-unstable, secrets, user, system, inputs, ...}: -{ rice, user, ... }: +{ pkgs, hyper, ... }: # browser.tabs.allow_transparent_browser # https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/ { - home.file = with rice.color; let - blur = builtins.toString 20; - in { - ".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ '' - :root{ - /* Popup panels */ - --arrowpanel-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --arrowpanel-border-color : ${border} !important; - --arrowpanel-color : ${secondary.base} !important; - --arrowpanel-dimmed : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important; - --arrowpanel-dimmed-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.6) !important; - --arrowpanel-dimmed-even-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.8) !important; + home = { + packages = with pkgs; [ + firefox + ]; + file = with rice.color; let + blur = builtins.toString 20; + in { + ".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ '' + :root{ + /* Popup panels */ + --arrowpanel-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --arrowpanel-border-color : ${border} !important; + --arrowpanel-color : ${secondary.base} !important; + --arrowpanel-dimmed : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important; + --arrowpanel-dimmed-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.6) !important; + --arrowpanel-dimmed-even-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.8) !important; - /* Autocomplete */ - --autocomplete-popup-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --autocomplete-popup-color : ${foreground} !important; - --autocomplete-popup-highlight-background: ${accent.base} !important; - --autocomplete-popup-highlight-color : ${foreground} !important; + /* Autocomplete */ + --autocomplete-popup-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --autocomplete-popup-color : ${foreground} !important; + --autocomplete-popup-highlight-background: ${accent.base} !important; + --autocomplete-popup-highlight-color : ${foreground} !important; - /* Toolbar background */ - --toolbar-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important; - --toolbar-non-lwt-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --toolbar-non-lwt-bgimage : none !important; - --toolbar-color : ${foreground} !important; + /* Toolbar background */ + --toolbar-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important; + --toolbar-non-lwt-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --toolbar-non-lwt-bgimage : none !important; + --toolbar-color : ${foreground} !important; - /* Tabs */ - --tab-selected-bgcolor : ${accent.base} !important; - --tabs-border-color : ${border} !important; - --tab-line-color : ${accent.base} !important; - --tab-loader-size : 16px !important; + /* Tabs */ + --tab-selected-bgcolor : ${accent.base} !important; + --tabs-border-color : ${border} !important; + --tab-line-color : ${accent.base} !important; + --tab-loader-size : 16px !important; - /* Sidebar */ - --lwt-sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --lwt-sidebar-text-color : ${foreground} !important; - --sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --sidebar-text-color : ${foreground} !important; - --sidebar-border-color : ${border} !important; + /* Sidebar */ + --lwt-sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --lwt-sidebar-text-color : ${foreground} !important; + --sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --sidebar-text-color : ${foreground} !important; + --sidebar-border-color : ${border} !important; - /* URL bar */ - --urlbar-popup-url-color : ${foreground} !important; - --urlbar-popup-action-color : ${secondary.base} !important; - --toolbar-field-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --toolbar-field-focus-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --toolbar-field-color : ${accent.base} !important; - --toolbar-field-focus-color : ${foreground} !important; - --toolbar-field-focus-border-color : ${accent.base} !important; + /* URL bar */ + --urlbar-popup-url-color : ${foreground} !important; + --urlbar-popup-action-color : ${secondary.base} !important; + --toolbar-field-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --toolbar-field-focus-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --toolbar-field-color : ${accent.base} !important; + --toolbar-field-focus-color : ${foreground} !important; + --toolbar-field-focus-border-color : ${accent.base} !important; - /* Buttons */ - --toolbarbutton-icon-fill : ${foreground} !important; - --toolbarbutton-hover-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.2) !important; - --toolbarbutton-active-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.4) !important; + /* Buttons */ + --toolbarbutton-icon-fill : ${foreground} !important; + --toolbarbutton-hover-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.2) !important; + --toolbarbutton-active-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.4) !important; - /* Notification and panel */ - --panel-disabled-color : rgba(${rice.lib.hex-to-rgb-comma-string foreground},0.3) !important; - --panel-separator-color : ${border} !important; + /* Notification and panel */ + --panel-disabled-color : rgba(${rice.lib.hex-to-rgb-comma-string foreground},0.3) !important; + --panel-separator-color : ${border} !important; - /* New tab page */ - --newtab-background-color : ${background} !important; - --newtab-background-color-secondary : ${background} !important; - --newtab-text-primary-color : ${foreground} !important; - --newtab-text-secondary-color : ${secondary.base} !important; - --newtab-search-icon-color : ${accent.base} !important; + /* New tab page */ + --newtab-background-color : ${background} !important; + --newtab-background-color-secondary : ${background} !important; + --newtab-text-primary-color : ${foreground} !important; + --newtab-text-secondary-color : ${secondary.base} !important; + --newtab-search-icon-color : ${accent.base} !important; - --tabpanel-background-color : transparent !important; - background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - } - .tabbrowser-tab[selected="true"] { - color: ${background} !important; - } + --tabpanel-background-color : transparent !important; + background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + } + .tabbrowser-tab[selected="true"] { + color: ${background} !important; + } - #appcontent { - background: transparent !important; - } - #navigator-toolbox { - --tabs-border-color: transparent !important; - } - #toolbar-menubar, #TabsToolbar, #PersonalToolbar, #navigator-toolbox, #sidebar-box { - background-color: transparent !important; - -moz-appearance: none !important; - background-image: none !important; - } - - window, #nav-bar{ - background-color: transparent !important; - -moz-appearance: none !important; - background-image: none !important; - } - ''; - - ".mozilla/firefox/${user}/chrome/userContent.css".text = /* css */ '' - /* Removes the white loading page */ - /* url(about:newtab), url(about:home) */ - @-moz-document url(about:blank) { - html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay { - background: ${background} !important; - } - } - - /* Sets up minimal incognito scrollbar */ - @-moz-document url(about:privatebrowsing) { - :root{ - scrollbar-width: thin !important; - scrollbar-color: rgb(161, 161, 161) transparent !important; - } - } - - /* new-tab */ - @-moz-document url-prefix(about:home), url-prefix(about:newtab) { - :root{ - --newtab-background-color-secondary: ${background} !important; - } - body, html { + #appcontent { background: transparent !important; + } + #navigator-toolbox { + --tabs-border-color: transparent !important; + } + #toolbar-menubar, #TabsToolbar, #PersonalToolbar, #navigator-toolbox, #sidebar-box { + background-color: transparent !important; + -moz-appearance: none !important; + background-image: none !important; } - .tile, .search-handoff-button { - border: ${builtins.toString rice.border-width}px solid ${border} !important; - } - } - @-moz-document domain(reddit.com) { - header { - background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; - backdrop-filter: blur(${blur}px); - } - body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree{ + window, #nav-bar{ background-color: transparent !important; - } - } + -moz-appearance: none !important; + background-image: none !important; + } + ''; - @-moz-document domain(reddit.com) { - header { - background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; - } - body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{ - background-color: transparent !important; + ".mozilla/firefox/${user}/chrome/userContent.css".text = /* css */ '' + /* Removes the white loading page */ + /* url(about:newtab), url(about:home) */ + @-moz-document url(about:blank) { + html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay { + background: ${background} !important; + } } - } - @-moz-document domain(google.com) { - .sfbg { - background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; - backdrop-filter: blur(${blur}px); + /* Sets up minimal incognito scrollbar */ + @-moz-document url(about:privatebrowsing) { + :root{ + scrollbar-width: thin !important; + scrollbar-color: rgb(161, 161, 161) transparent !important; + } } - body, html, div#search > * { - background-color: transparent !important; - border: ${builtins.toString rice.border-width} solid ${border}; + + /* new-tab */ + @-moz-document url-prefix(about:home), url-prefix(about:newtab) { + :root{ + --newtab-background-color-secondary: ${background} !important; + } + body, html { + background: transparent !important; + } + .tile, .search-handoff-button { + border: ${builtins.toString rice.border-width}px solid ${border} !important; + } } - .g, .appbar { - background-color: transparent !important; - border: ${builtins.toString rice.border-width} solid ${border}; + + @-moz-document domain(reddit.com) { + header { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + backdrop-filter: blur(${blur}px); + } + body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree{ + background-color: transparent !important; + } } - div#rso { - * { + + @-moz-document domain(reddit.com) { + header { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + } + body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{ + background-color: transparent !important; + } + } + + @-moz-document domain(google.com) { + .sfbg { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + backdrop-filter: blur(${blur}px); + } + body, html, div#search > * { background-color: transparent !important; border: ${builtins.toString rice.border-width} solid ${border}; } - } - div#cnt > div { + .g, .appbar { + background-color: transparent !important; + border: ${builtins.toString rice.border-width} solid ${border}; + } + div#rso { + * { + background-color: transparent !important; + border: ${builtins.toString rice.border-width} solid ${border}; + } + } + div#cnt > div { + } } - } - @media (prefers-color-scheme: dark) { - :root .theme-system { - --color-bg: transtparent !important; - --color-text: ${rice.color.foreground} + @media (prefers-color-scheme: dark) { + :root .theme-system { + --color-bg: transtparent !important; + --color-text: ${rice.color.foreground} + } } - } - @-moz-document domain(developer.mozilla.org) { - html, body { - background-color: transparent !important; + @-moz-document domain(developer.mozilla.org) { + html, body { + background-color: transparent !important; + } + .top-navigation, .article-actions-container { + background-color: rgba(0,0,0,1) !important; + backdrop-filter: blur(100px); + border-radius: ${builtins.toString rice.rounding}px; + } } - .top-navigation, .article-actions-container { - background-color: rgba(0,0,0,1) !important; - backdrop-filter: blur(100px); - border-radius: ${builtins.toString rice.rounding}px; - } - } - @-moz-document domain(github.com) { - body, html, header, #repository-container-header, .bgColor-muted, section { - background-color: transparent !important; + @-moz-document domain(github.com) { + body, html, header, #repository-container-header, .bgColor-muted, section { + background-color: transparent !important; + } } - } - @-moz-document domain(mynixos.com) { - body, html { - background-color: transparent !important; + @-moz-document domain(mynixos.com) { + body, html { + background-color: transparent !important; + } + header, footer { + background-color: rgba(0,0,0,1) !important; + backdrop-filter: blur(100px); + border-radius: ${builtins.toString rice.rounding}px; + } } - header, footer { - background-color: rgba(0,0,0,1) !important; - backdrop-filter: blur(100px); - border-radius: ${builtins.toString rice.rounding}px; - } - } - @-moz-document domain(moodle.informatik.tu-darmstadt.de) { - body, html , .main-inner, .main-inner * { - background-color: transparent !important; + @-moz-document domain(moodle.informatik.tu-darmstadt.de) { + body, html , .main-inner, .main-inner * { + background-color: transparent !important; + } + .bg-primary { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.5) !important! + } } - .bg-primary { - background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.5) !important! - } - } - @-moz-document url-prefix("https://nx2.site/") { - html { - background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; - background-repeat: repeat !important; - background-size: 2vmin 2vmin !important; + @-moz-document url-prefix("https://nx2.site/") { + html { + background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; + background-repeat: repeat !important; + background-size: 2vmin 2vmin !important; + } } - } - @-moz-document url-prefix("pw.nx2.site") { - html { - background: black; + @-moz-document url-prefix("pw.nx2.site") { + html { + background: black; + } } - } - @-moz-document url-prefix("pw.nx2.site") { - html { - background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; - background-repeat: repeat !important; - background-size: 2vmin 2vmin !important; - } - body, .tw-bg-background-alt3, main, .card-header, .card-body, .modal-body { - background-color: transparent !important; - } - .modal-open, .modal-header, form.modal-content, .modal-footer { - background-color: rgba(0,0,0,0.8) !important; - backdrop-filter: blur(5px); - } - .cdk-virtual-scroll-content-wrapper, .card, .tw-bg-background, .modal-content { - background-color: rgba(0,0,0,0.8) !important; - border-radius: 10px !important; - border: ${toString rice.border-width}px solid ${border} !important; - } - } + @-moz-document url-prefix("pw.nx2.site") { + html { + background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; + background-repeat: repeat !important; + background-size: 2vmin 2vmin !important; + } + body, .tw-bg-background-alt3, main, .card-header, .card-body, .modal-body { + background-color: transparent !important; + } + .modal-open, .modal-header, form.modal-content, .modal-footer { + background-color: rgba(0,0,0,0.8) !important; + backdrop-filter: blur(5px); + } + .cdk-virtual-scroll-content-wrapper, .card, .tw-bg-background, .modal-content { + background-color: rgba(0,0,0,0.8) !important; + border-radius: 10px !important; + border: ${toString rice.border-width}px solid ${border} !important; + } + } - @-moz-document domain(chatgpt.com) { - body, html , .bg-token-sidebar-surface-primary { - background-color: transparent !important; + @-moz-document domain(chatgpt.com) { + body, html , .bg-token-sidebar-surface-primary { + background-color: transparent !important; + } + .bg-token-main-surface-primary { + background-color: rgba(0,0,0,1) !important; + backdrop-filter: blur(100px) !important; + border-radius: ${builtins.toString rice.rounding}px !important; + } } - .bg-token-main-surface-primary { - background-color: rgba(0,0,0,1) !important; - backdrop-filter: blur(100px) !important; - border-radius: ${builtins.toString rice.rounding}px !important; - } - } - ''; + ''; + }; }; } diff --git a/home-modules/games.nix b/home-modules/games.nix index 17a14cb..6cdb11a 100644 --- a/home-modules/games.nix +++ b/home-modules/games.nix @@ -1,9 +1,9 @@ -{ pkgs-unstable, pkgs, lib, host, ... }: +{ pkgs, hyper, ... }: # lib.mkIf (host == "NxNORTH" || host == "NxACE") -lib.mkIf (host == "NxNORTH") +pkgs.lib.mkIf (host == "NxNORTH") { home = { - packages = (with pkgs-unstable; [ + packages = (with pkgs.unstable; [ protonup mangohud diff --git a/home-modules/gestures.nix b/home-modules/gestures.nix index 5dea219..c025d97 100644 --- a/home-modules/gestures.nix +++ b/home-modules/gestures.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host == "NxXPS") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host == "NxXPS") { home.packages = with pkgs; [ libinput-gestures diff --git a/home-modules/ghostty.nix b/home-modules/ghostty.nix index 5dffc84..c23b406 100644 --- a/home-modules/ghostty.nix +++ b/home-modules/ghostty.nix @@ -1,4 +1,4 @@ -{ config, rice, inputs, system, ... }: +{ config, rice, hyper, inputs, ... }: { home = { packages = [ inputs.ghostty.packages.${system}.default ]; diff --git a/home-modules/gpg.nix b/home-modules/gpg.nix index 234c761..7a9878f 100644 --- a/home-modules/gpg.nix +++ b/home-modules/gpg.nix @@ -1,12 +1,11 @@ -{ pkgs, pkgs-unstable, ... }: +{ pkgs, ... }: { # there also is a system module - home.packages = (with pkgs; [ + home.packages = with pkgs; [ gnupg gpg-tui - ]) ++ ( with pkgs-unstable; [ pinentry-all - ]); + ]; # services.pcscd.enable = true; services.gpg-agent = let diff --git a/home-modules/helix.nix b/home-modules/helix.nix index 24add18..162a9b9 100644 --- a/home-modules/helix.nix +++ b/home-modules/helix.nix @@ -1,4 +1,4 @@ -{ pkgs, pkgs-unstable, lib, rice, ... }: +{ pkgs, hyper, rice, ... }: { home = { packages = with pkgs; [ @@ -18,10 +18,8 @@ vale-ls # style-checker lsp (needs vale) ltex-ls # Ltex (language tool) vscode-langservers-extracted - ] ++ (with pkgs-unstable; [ bash-language-server - helix - ]); + ]; sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; @@ -30,7 +28,7 @@ programs.helix = { enable = true; defaultEditor = true; - package = pkgs-unstable.helix; + package = pkgs.unstable.helix; settings = { # theme = "base16_terminal"; theme = "base16"; @@ -274,7 +272,7 @@ command = "nixd"; }; "style-check" = { - command = lib.getExe pkgs.vale-ls; + command = pkgs.lib.getExe pkgs.vale-ls; }; "language-tool" = { command = "${pkgs.ltex-ls}/bin/ltex-ls"; @@ -290,7 +288,7 @@ ]; }; "llm" = { - command = lib.getExe pkgs.helix-gpt; + command = pkgs.lib.getExe pkgs.helix-gpt; args = [ "--handler" "ollama" diff --git a/home-modules/latex.nix b/home-modules/latex.nix index 3c43050..a40c574 100644 --- a/home-modules/latex.nix +++ b/home-modules/latex.nix @@ -1,5 +1,5 @@ -{ config, pkgs, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ texlab # LSP diff --git a/home-modules/nh.nix b/home-modules/nh.nix index b03c1b5..00db414 100644 --- a/home-modules/nh.nix +++ b/home-modules/nh.nix @@ -1,13 +1,13 @@ -{ config, pkgs-unstable, ... }: +{ pkgs, hyper, ... }: { home = { - packages = with pkgs-unstable; [ + packages = with pkgs; [ nh nix-output-monitor nvd ]; sessionVariables = { - FLAKE = "${config.home.homeDirectory}/nix-dots"; + FLAKE = "${hyper.home}/nix-dots"; }; }; } diff --git a/home-modules/pkgs-list/shell.nix b/home-modules/pkgs-list/shell.nix new file mode 100644 index 0000000..bdd67fa --- /dev/null +++ b/home-modules/pkgs-list/shell.nix @@ -0,0 +1,37 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + bat + browsh + cmake + dig + du-dust + exiftool + eza + ffmpeg + figlet + fzf + glib + glow + gnumake + imagemagick + jq + lolcat + lynx + mediainfo + mpv + neofetch + pdfgrep + pipes + pv + reflex + ripgrep + screen + speedtest-go + sssnake + systemctl-tui + tldr + w3m + yt-dlp + ]; +} diff --git a/home-modules/programming/gleam.nix b/home-modules/programming/gleam.nix index c4dd691..f4a826c 100644 --- a/home-modules/programming/gleam.nix +++ b/home-modules/programming/gleam.nix @@ -1,10 +1,9 @@ -{ pkgs, pkgs-unstable, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ erlang rebar3 - ] ++ (with pkgs-unstable; [ gleam - ]); + ]; } diff --git a/home-modules/programming/js.nix b/home-modules/programming/js.nix index e2decfd..8360c5d 100644 --- a/home-modules/programming/js.nix +++ b/home-modules/programming/js.nix @@ -1,5 +1,4 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, ... }: { home.packages = with pkgs; [ nodejs diff --git a/home-modules/sops.nix b/home-modules/sops.nix index 23468d8..8973679 100644 --- a/home-modules/sops.nix +++ b/home-modules/sops.nix @@ -1,4 +1,4 @@ -{ user, inputs, ... }: +{ hyper, inputs, ... }: { imports = [ inputs.sops-nix.homeManagerModules.sops @@ -6,7 +6,7 @@ sops = { # age.keyFile = "/home/${user}/.config/sops/age/keys.txt"; - gnupg.home = "/home/${user}/.gnupg"; + gnupg.home = "${hyper.home}/.gnupg"; defaultSopsFile = ../sops-secrets.yaml; # %r is $XDG_RUNTIME_DIR diff --git a/home-modules/ssh.nix b/home-modules/ssh.nix index 5811c21..37d0c5e 100644 --- a/home-modules/ssh.nix +++ b/home-modules/ssh.nix @@ -1,10 +1,10 @@ -{ pkgs, domain, ... }: +{ pkgs, hyper, ... }: { home = { packages = with pkgs; [ sshfs ]; file.".ssh/config".text = '' HOST nxace - HostName ssh.${domain} + HostName ssh.${hyper.domain} User nx2 Port 50022 @@ -19,7 +19,7 @@ Port 22 HOST nxgit - HostName ssh.${domain} + HostName ssh.${hyper.domain} User git Port 50022 ''; diff --git a/home-modules/starship.nix b/home-modules/starship.nix index d48815a..46c23b5 100644 --- a/home-modules/starship.nix +++ b/home-modules/starship.nix @@ -1,12 +1,13 @@ -{ lib, rice, ... }: +{ pkgs, rice, ... }: { programs.starship = { enable = true; + package = pkgs.starship; # enableBashIntegration = true; enableFishIntegration = true; settings = with rice.color; { add_newline = false; - format = lib.strings.concatMapStrings (x: "$" + x) [ + format = pkgs.lib.strings.concatMapStrings (x: "$" + x) [ "jobs" "battery" "username" @@ -154,5 +155,5 @@ vlang.format = "[\\[$symbol($version)\\]](fg:${foreground})"; zig.format = "[\\[$symbol($version)\\]](fg:${foreground})"; }; - }; + }; } diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index b60aa46..f389913 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -1,18 +1,16 @@ -{ pkgs, system, rice, inputs, ... }: +{ pkgs, hyper, rice, inputs, ... }: { home.packages = with pkgs; [ - # yazi - # dragon unar - ]; + ]; programs.yazi = { enable = true; # package = pkgs.yazi; - package = inputs.yazi.packages.${system}.default; + package = inputs.yazi.packages.${hyper.system}.default; enableFishIntegration = true; shellWrapperName = "ya"; - plugins = with inputs.yazi-plugins.packages.${system}; { + plugins = with inputs.yazi-plugins.packages.${hyper.system}; { inherit # chmod starship; diff --git a/home.nix b/home.nix index b77d179..e3dc5af 100644 --- a/home.nix +++ b/home.nix @@ -67,7 +67,7 @@ ] else []); home.username = user; home.homeDirectory = "/home/${user}"; - home.stateVersion = "24.05"; + home.stateVersion = pkgs.version; home.packages = with pkgs; [ bat brightnessctl @@ -110,6 +110,8 @@ swww systemctl-tui tldr + unstable.firefox + unstable.spotify w3m wev wl-clipboard @@ -120,9 +122,6 @@ inputs.zen-browser.packages."${system}".default - ] ++ (with pkgs-unstable; [ - firefox - spotify ]) ++ (if host != "NxACE" then (with pkgs; [ signal-desktop obsidian @@ -134,17 +133,15 @@ xdg = { enable = true; - configHome = /home/${user}/.config; - cacheHome = /home/${user}/.cache; - dataHome = /home/${user}/.local/share; - stateHome = /home/${user}/.local/state; + configHome = "${hyper.home}.config"; + cacheHome = "${hyper.home}.cache"; + dataHome = "${hyper.home}.local/share"; + stateHome = "${hyper.home}.local/state"; mimeApps = { enable = true; - defaultApplications = - let + defaultApplications = let browser = "firefox.desktop"; - in - { + in { "default-web-browser" = [ browser ]; "text/html" = [ browser ]; "text/htm" = [ browser ]; diff --git a/nixos-wsl.nix b/nixos-wsl.nix new file mode 100644 index 0000000..c4f003d --- /dev/null +++ b/nixos-wsl.nix @@ -0,0 +1,22 @@ +{ pkgs, hyper, inputs, ... }: +{ + imports = [ + inputs.nixos-wsl.nixosModules.default + ./system-modules/users.nix + ./system-modules/gc.nix + ./system-modules/docker.nix + ./system-modules/gpg.nix + ./system-modules/networking.nix + ./system-modules/nixd.nix + # ./system-modules/sops.nix + # ./system-modules/sshd.nix + # ./system-modules/syncthing.nix + ]; + system.stateVersion = pkgs.version; + # system.stateVersion = "24.11"; + wsl = { + defaultUser = hyper.user; + enable = true; + }; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; +} diff --git a/shell-only.nix b/shell-only.nix new file mode 100644 index 0000000..1a14784 --- /dev/null +++ b/shell-only.nix @@ -0,0 +1,44 @@ +{ pkgs, hyper, ... }: +{ + imports = [ + ./home-modules/bash.nix + ./home-modules/color-pallete.nix + ./home-modules/direnv.nix + ./home-modules/fish.nix + ./home-modules/git.nix + ./home-modules/gpg.nix + ./home-modules/helix.nix + ./home-modules/latex.nix + ./home-modules/nh.nix + ./home-modules/nixd.nix + ./home-modules/nxgs.nix + ./home-modules/pandoc.nix + ./home-modules/programming/c.nix + ./home-modules/programming/gleam.nix + ./home-modules/programming/go.nix + ./home-modules/programming/java.nix + ./home-modules/programming/js.nix + ./home-modules/programming/python.nix + # ./home-modules/sops.nix + ./home-modules/ssh.nix + ./home-modules/starship.nix + ./home-modules/vale.nix + ./home-modules/yazi.nix + ./home-modules/zoxide.nix + + ./home-modules/pkgs-list/shell.nix + ]; + home.username = hyper.user; + # home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here + home.homeDirectory = "/home/${hyper.user}"; + home.stateVersion = pkgs.version; + xdg = { + enable = true; + configHome = "${hyper.home}/.config"; + cacheHome = "${hyper.home}/.cache"; + dataHome = "${hyper.home}/.local/share"; + stateHome = "${hyper.home}/.local/state"; + }; + programs.home-manager.enable = true; +} + diff --git a/system-modules/adb.nix b/system-modules/adb.nix index 5378460..eeb06e1 100644 --- a/system-modules/adb.nix +++ b/system-modules/adb.nix @@ -1,4 +1,4 @@ -{ pkgs, host, lib, ... }: +{ pkgs, hyper, lib, ... }: lib.mkIf (host != "NxACE") { environment.systemPackages = with pkgs; [ diff --git a/system-modules/docker.nix b/system-modules/docker.nix index 26b310e..7d9d8f7 100644 --- a/system-modules/docker.nix +++ b/system-modules/docker.nix @@ -1,4 +1,4 @@ -{ config, pkgs, user, ... }: +{ pkgs, hyper, ... }: { environment.systemPackages = with pkgs; [ @@ -12,7 +12,7 @@ # vpnKitMaxPortIdleTime = 0; # }; }; - users.users."${user}".extraGroups = [ "docker" ]; + users.users."${hyper.user}".extraGroups = [ "docker" ]; networking.firewall.allowedTCPPorts = [ 80 443 diff --git a/system-modules/networking.nix b/system-modules/networking.nix index d922517..9224f26 100644 --- a/system-modules/networking.nix +++ b/system-modules/networking.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, host, secrets, ... }: +{ pkgs, hyper, secrets, ... }: { # sops.secrets = { # "wireless-networking.env" = {}; @@ -9,7 +9,7 @@ "1.1.1.1" "8.8.8.8" ]; - hostName = host; + hostName = hyper.host; networkmanager = { enable = true; }; @@ -21,14 +21,4 @@ 8080 ]; }; - environment.etc = { - "ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt"; - }; - sops.secrets = { - "eduroam/tuda_nmconnection" = { - mode = "0600"; - owner = "root"; - path = "/etc/NetworkManager/system-connections/eduroam.nmconnection"; - }; - }; } diff --git a/system-modules/sshd.nix b/system-modules/sshd.nix index 7bdd4b3..5566b3d 100644 --- a/system-modules/sshd.nix +++ b/system-modules/sshd.nix @@ -1,13 +1,13 @@ -{ host, secrets, ... }: +{ hyper, secrets, ... }: { - environment.etc."ssh/ssh_host_ed25519_key.pub".text = if (host == "NxNORTH") then + environment.etc."ssh/ssh_host_ed25519_key.pub".text = if (hyper.host == "NxNORTH") then "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF1r5gUQPPS/dGB0SsvWtP6WdNWoxMwhhHRrqlO19cJt root@NxNORTH" - else if ( host == "NxXPS" ) then + else if ( hyper.host == "NxXPS" ) then "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPf+08+t8a0lY2+nR1mhIU3vuksStiJOlojJjzCwFk7r root@NxXPS" else "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBFfZpWVPlujsz3FklSVAM+tuYn4pzDSijhp5CeYNOZk root@NxACE"; - sops.secrets."ssh/${host}-ssh_host_ed25519_key" = { + sops.secrets."ssh/${hyper.host}-ssh_host_ed25519_key" = { mode = "0600"; path = "/etc/ssh/ssh_host_ed25519_key.shadow"; }; diff --git a/system-modules/tuda.nix b/system-modules/tuda.nix new file mode 100644 index 0000000..e4f3674 --- /dev/null +++ b/system-modules/tuda.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: +{ + environment.etc = { + "ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt"; + }; + sops.secrets = { + "eduroam/tuda_nmconnection" = { + mode = "0600"; + owner = "root"; + path = "/etc/NetworkManager/system-connections/eduroam.nmconnection"; + }; + }; +} diff --git a/system-modules/users.nix b/system-modules/users.nix index aa67651..361d09b 100644 --- a/system-modules/users.nix +++ b/system-modules/users.nix @@ -1,9 +1,8 @@ -{ pkgs, user, ... }: - +{ pkgs, hyper, ... }: { users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish - users.users."${user}" = { + users.users."${hyper.user}" = { isNormalUser = true; extraGroups = [ # TODO: actually put the groups into the relevant files From 68cb4377b7924fac21ecb2cd66869fec5c6c864f Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Tue, 27 May 2025 12:12:36 +0200 Subject: [PATCH 09/12] New Flake Style XPS fix --- configuration.nix | 4 +-- flake-modules/colors.json | 16 ++++----- flake.nix | 17 ++++----- home-modules/bitwarden.nix | 4 +-- home-modules/calendar.nix | 2 +- home-modules/email.nix | 4 +-- home-modules/firefox.nix | 6 ++-- home-modules/games.nix | 2 +- home-modules/ghostty.nix | 2 +- home-modules/gimp.nix | 4 +-- home-modules/git.nix | 4 +-- home-modules/hyprland.nix | 24 ++++++------- home-modules/matrix.nix | 4 +-- home-modules/nvidia.nix | 4 +-- home-modules/obs.nix | 4 +-- home-modules/office.nix | 2 +- home-modules/ollama.nix | 1 + home-modules/pnx.nix | 6 ++-- home-modules/sent.nix | 2 -- home-modules/ssh.nix | 6 ++-- home-modules/tts.nix | 3 +- home-modules/virt-manager.nix | 4 +-- home-modules/vscode.nix | 34 +++++++++--------- home-modules/wallpaper-to-colors.nix | 4 +-- home-modules/waybar.nix | 6 ++-- home.nix | 17 +++++---- sops-secrets.yaml | 10 ++---- system-modules/adb.nix | 2 +- system-modules/boot.nix | 16 ++++----- system-modules/calendar-lec.nix | 6 ++-- system-modules/calendar-lr.nix | 6 ++-- system-modules/calendar-publish.nix | 14 ++++---- system-modules/dm.nix | 4 +-- system-modules/games.nix | 4 +-- system-modules/hardware-configuration.nix | 24 ++++++------- system-modules/health_reminder.nix | 6 ++-- system-modules/hugo.nix | 6 ++-- system-modules/nvidia.nix | 8 ++--- system-modules/nx2site.nix | 16 ++++----- system-modules/nx2site/dyn_dns.nix | 9 ++--- system-modules/nx2site/gitea.nix | 14 ++++---- system-modules/nx2site/nextcloud.nix | 4 +-- system-modules/nx2site/open-web-calendar.nix | 7 ++-- system-modules/nx2site/paperless.nix | 6 ++-- system-modules/nx2site/proxy.nix | 38 ++++++++++---------- system-modules/nx2site/radicale.nix | 4 +-- system-modules/nx2site/vaultwarden.nix | 4 +-- system-modules/ollama.nix | 14 +++----- system-modules/sops.nix | 9 ++--- system-modules/syncthing.nix | 38 +++++++++----------- system-modules/virtualisation.nix | 6 ++-- system-modules/ydotool.nix | 4 +-- 52 files changed, 220 insertions(+), 245 deletions(-) diff --git a/configuration.nix b/configuration.nix index c116dfc..8069dd8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, host, ... }: +{ pkgs, hyper, inputs, ... }: { imports = ([ inputs.sops-nix.nixosModules.sops @@ -40,7 +40,7 @@ ./system-modules/users.nix ./system-modules/virtualisation.nix ./system-modules/ydotool.nix - ]) ++ (if (host == "NxACE") then [ + ]) ++ (if (hyper.host == "NxACE") then [ ./system-modules/nx2site.nix ./system-modules/hugo.nix ./system-modules/postgres.nix diff --git a/flake-modules/colors.json b/flake-modules/colors.json index bf6fbec..a1a7862 100644 --- a/flake-modules/colors.json +++ b/flake-modules/colors.json @@ -1,13 +1,13 @@ { "base": { - "foreground": "#dddddd", - "background": "#000000" + "foreground": "#dbd2f8", + "background": "#0f062c" }, "to_alter": { - "accent": "#8888ff", - "secondary": "#4444ff", - "tertiary": "#44ff88", - "special": "#ff6666", - "weird": "#ff66ff" + "accent": "#724ce5", + "secondary": "#ff3271", + "tertiary": "#ffc932", + "special": "#bfe54b", + "weird": "#e54b8b" } -} +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 6cef2ae..5f06978 100644 --- a/flake.nix +++ b/flake.nix @@ -27,14 +27,13 @@ outputs = { self, ... }@inputs: with inputs; let system = "x86_64-linux"; - # config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; - config = {}; + config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; hyper-base = rec { inherit system; user = "nx2"; domain = "nx2.site"; - home = "/home/${user}"; # no tailing slash! + home = "/home/${user}/"; }; pkgs = import nixpkgs { inherit system config; } // { @@ -43,7 +42,7 @@ version = "25.05"; }; - nvidia-set = import ./flake-modules/nvidia.nix; + nvidia-base = import ./flake-modules/nvidia.nix; secrets = import ./git-crypt/secrets.nix; rice = import ./flake-modules/rice.nix pkgs; @@ -53,9 +52,8 @@ inherit system; modules = [ ./configuration.nix ]; specialArgs = let - nvidia = nvidia-set // nvidia-settings; - hyper = hyper-base // { inherit host; }; - in { inherit pkgs inputs hyper rice secrets nvidia; }; + hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; }; + in { inherit pkgs inputs hyper rice secrets; }; }; make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem { inherit system; @@ -91,9 +89,8 @@ inherit pkgs; modules = [ ./home.nix ]; extraSpecialArgs = let - hyper = hyper-base // { inherit host; }; - nvidia = nvidia-set // nvidia-settings; - in { inherit pkgs inputs hyper rice secrets nvidia; }; + hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; }; + in { inherit pkgs inputs hyper rice secrets; }; }; make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration { inherit pkgs; diff --git a/home-modules/bitwarden.nix b/home-modules/bitwarden.nix index 5834d90..5bf042d 100644 --- a/home-modules/bitwarden.nix +++ b/home-modules/bitwarden.nix @@ -1,8 +1,6 @@ -{ pkgs, hyper ... }: -lib.mkIf (hyper.host != "NxACE") +{ pkgs, hyper, ... }: { home.packages = with pkgs; [ bitwarden - bitwarden-cli ]; } diff --git a/home-modules/calendar.nix b/home-modules/calendar.nix index 6a43682..946e6dd 100644 --- a/home-modules/calendar.nix +++ b/home-modules/calendar.nix @@ -102,7 +102,7 @@ in { "calendar.registry.${to_safe_name calendar.name}.name" = name; "calendar.registry.${to_safe_name calendar.name}.type" = type; "calendar.registry.${to_safe_name calendar.name}.uri" = url; - "calendar.registry.${to_safe_name calendar.name}.username" = user; + "calendar.registry.${to_safe_name calendar.name}.username" = hyper.user; "calendar.registry.${to_safe_name calendar.name}.readOnly" = read-only; }) calendars ) // { diff --git a/home-modules/email.nix b/home-modules/email.nix index 417e51b..32ca800 100644 --- a/home-modules/email.nix +++ b/home-modules/email.nix @@ -6,14 +6,14 @@ pkgs.lib.mkIf (hyper.host != "NxACE") ]; programs.thunderbird = let - inherit (lib.generators) toJSON; + inherit (pkgs.lib.generators) toJSON; extensions = toJSON {} { "addon@darkreader.org" = "71d6c69d-55f9-4c56-888c-abdcf6efd73d"; }; in { enable = true; profiles = { - "${hyepr.user}" = { + "${hyper.user}" = { isDefault = true; settings = with rice.color; { "calendar.alarms.showmissed" = false; diff --git a/home-modules/firefox.nix b/home-modules/firefox.nix index 313231a..21e76eb 100644 --- a/home-modules/firefox.nix +++ b/home-modules/firefox.nix @@ -1,4 +1,4 @@ -{ pkgs, hyper, ... }: +{ pkgs, hyper, rice, ... }: # browser.tabs.allow_transparent_browser # https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/ { @@ -9,7 +9,7 @@ file = with rice.color; let blur = builtins.toString 20; in { - ".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ '' + ".mozilla/firefox/${hyper.user}/chrome/userChrome.css".text = /* css */ '' :root{ /* Popup panels */ --arrowpanel-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; @@ -95,7 +95,7 @@ } ''; - ".mozilla/firefox/${user}/chrome/userContent.css".text = /* css */ '' + ".mozilla/firefox/${hyper.user}/chrome/userContent.css".text = /* css */ '' /* Removes the white loading page */ /* url(about:newtab), url(about:home) */ @-moz-document url(about:blank) { diff --git a/home-modules/games.nix b/home-modules/games.nix index 6cdb11a..0b97d35 100644 --- a/home-modules/games.nix +++ b/home-modules/games.nix @@ -1,6 +1,6 @@ { pkgs, hyper, ... }: # lib.mkIf (host == "NxNORTH" || host == "NxACE") -pkgs.lib.mkIf (host == "NxNORTH") +pkgs.lib.mkIf (hyper.host == "NxNORTH") { home = { packages = (with pkgs.unstable; [ diff --git a/home-modules/ghostty.nix b/home-modules/ghostty.nix index c23b406..493e713 100644 --- a/home-modules/ghostty.nix +++ b/home-modules/ghostty.nix @@ -1,7 +1,7 @@ { config, rice, hyper, inputs, ... }: { home = { - packages = [ inputs.ghostty.packages.${system}.default ]; + packages = [ inputs.ghostty.packages.${hyper.system}.default ]; file."${config.xdg.configHome}/ghostty/config".text = with rice.color; /* ini */ '' font-family="${rice.font.code.name}" clipboard-read=allow diff --git a/home-modules/gimp.nix b/home-modules/gimp.nix index b9ebf9a..666c41d 100644 --- a/home-modules/gimp.nix +++ b/home-modules/gimp.nix @@ -1,6 +1,6 @@ -{ pkgs-latest, ... }: +{ pkgs, ... }: { - home.packages = with pkgs-latest; [ + home.packages = with pkgs; [ # (gimp-with-plugins.override { # plugins = with gimpPlugins; [ bimp ]; # }) diff --git a/home-modules/git.nix b/home-modules/git.nix index 2f14d6a..1e54806 100644 --- a/home-modules/git.nix +++ b/home-modules/git.nix @@ -1,4 +1,4 @@ -{ pkgs, rice, ... }: +{ pkgs, hyper, rice, ... }: { home.packages = with pkgs; [ git @@ -36,7 +36,7 @@ programs.git = { enable = true; userName = ''Lennart J. Kurzweg (Nx2)''; - userEmail = "git@nx2.site"; + userEmail = "git@${hyper.domain}"; delta = { enable = true; options = { diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index 9be707d..2198d7b 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -1,4 +1,4 @@ -{config, pkgs, pkgs-unstable, inputs, host, user, nvidia, rice, lib, ... }: +{ config, pkgs, hyper, inputs, rice, ... }: let animation-speed = "5"; transparency = builtins.toString rice.transparency; @@ -83,10 +83,10 @@ in { settings = { monitor = - if host == "NxXPS" then (with monitors.xps; [ + if hyper.host == "NxXPS" then (with monitors.xps; [ "${main.name}, ${main.resolution}, ${main.position}, ${main.scale}" "${second.name}, ${second.resolution}, ${second.position}, ${second.scale}" - ]) else (if host == "NxNORTH" then (with monitors.north; [ + ]) else (if hyper.host == "NxNORTH" then (with monitors.north; [ "${main.name}, ${main.resolution}, ${main.position}, ${main.scale}" "${left.name}, ${left.resolution}, ${left.position}, ${left.scale}" # "${right.name}, ${right.resolution}, ${right.position}, ${right.scale}" @@ -95,10 +95,10 @@ in { ])); workspace = let - d1 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); - d2 = if host == "NxXPS" then monitors.xps.second.name else (if host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name); - d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); - # d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.right.name else monitors.ace.main.name); + d1 = if hyper.host == "NxXPS" then monitors.xps.main.name else (if hyper.host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); + d2 = if hyper.host == "NxXPS" then monitors.xps.second.name else (if hyper.hyper.host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name); + d3 = if hyper.host == "NxXPS" then monitors.xps.main.name else (if hyper.host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); + # d3 = if hyper.host == "NxXPS" then monitors.xps.main.name else (if hyper.hyper.host == "NxNORTH" then monitors.north.right.name else monitors.ace.main.name); compact = "gapsin:0, gapsout:0, bordersize:1, rounding:false"; in [ "11, monitor:${d1}, default:true" @@ -122,7 +122,7 @@ in { "28, monitor:${d2}" "29, monitor:${d2}" "20, monitor:${d2}" - "31, monitor:${d3}, default:${let x = if host == "NxNORTH" then "true" else "false"; in x}" + "31, monitor:${d3}, default:${let x = if hyper.host == "NxNORTH" then "true" else "false"; in x}" "32, monitor:${d3}" "33, monitor:${d3}" "34, monitor:${d3}" @@ -143,7 +143,7 @@ in { # }; - env = if nvidia.enable == true then [ + env = if hyper.nvidia.enable == true then [ "LIBVA_DRIVER_NAME,nvidia" "XDG_SESSION_TYPE,wayland" "GBM_BACKEND,nvidia-drm" @@ -209,7 +209,7 @@ in { # bezier = "myBezier, 0.01, 0.9, 0.1, 1.0"; #o # bezier = "myBezier, 0.83, 0, 0.17, 1"; # io bezier = "myBezier, 0.33, 1, 0.68, 1"; - animation = let direction = if host == "NxXPS" then "slide" else "slidevert"; in [ + animation = let direction = if hyper.host == "NxXPS" then "slide" else "slidevert"; in [ "windows, 1, ${animation-speed}, myBezier, slide" "border, 1, ${animation-speed}, myBezier" "fade, 1, ${animation-speed}, myBezier" @@ -591,7 +591,7 @@ in { submap = color ${action_simple { key = "W"; cmd = ''exec,swww query | sed -n 1p | sed -E 's-.*image: (.*)-"\1"-g' | xargs change_colors_json img && notify-send 'change_colors_json img successfull' ''; }} ${action_simple { key = "M"; cmd = ''exec,change_colors_json manual && notify-send 'change_colors_json manual successfull' ''; }} - ${action_simple { key = "D"; cmd = ''exec,firefox /home/${user}/.config/color-pallete.html''; }} + ${action_simple { key = "D"; cmd = ''exec,firefox ${hyper.home}/.config/color-pallete.html''; }} bind = , Escape, execr, waybar_mode unset bind = , Escape, submap, reset submap = reset @@ -609,7 +609,7 @@ in { }; home.file = let - m = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name; + m = if hyper.host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name; in { ".config/hypr/hyprlock.conf".text = '' background { diff --git a/home-modules/matrix.nix b/home-modules/matrix.nix index 8d8408c..0968292 100644 --- a/home-modules/matrix.nix +++ b/home-modules/matrix.nix @@ -1,4 +1,4 @@ -{ pkgs, host, ... }: +{ pkgs, hyper, ... }: { home.packages = with pkgs; [ # cinny-desktop @@ -79,7 +79,7 @@ nx2site.ssl_verify = on nx2site.username = "nx2" nx2site.password = "''${sec.data.matrix_nx2site_password}" - nx2site.device_name = "Weechat@${host}" + nx2site.device_name = "Weechat@${hyper.host}" nx2site.autoreconnect_delay = 10 nx2site.sso_helper_listening_port = 0 ''; diff --git a/home-modules/nvidia.nix b/home-modules/nvidia.nix index 9539b37..fb75673 100644 --- a/home-modules/nvidia.nix +++ b/home-modules/nvidia.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, nvidia, ... }: -lib.mkIf (nvidia.enable == true) +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.nvidia.enable == true) { home = { packages = with pkgs; [ diff --git a/home-modules/obs.nix b/home-modules/obs.nix index 73fea59..eea25f6 100644 --- a/home-modules/obs.nix +++ b/home-modules/obs.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { # home.packages = with pkgs; [ # obs-studio diff --git a/home-modules/office.nix b/home-modules/office.nix index 830f7c2..cc9b604 100644 --- a/home-modules/office.nix +++ b/home-modules/office.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, user, ... }: +{ pkgs, ... }: { home.packages = with pkgs; [ libreoffice diff --git a/home-modules/ollama.nix b/home-modules/ollama.nix index d9dc5fa..5b32507 100644 --- a/home-modules/ollama.nix +++ b/home-modules/ollama.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { home.packages = with pkgs; [ + ollama (writers.writePython3Bin "ooo" { libraries = [ pkgs.python3Packages.ollama ]; flakeIgnore = [ "E501" "E305" "E701" "E704" "E302" "E114" "F841" "E121" ]; diff --git a/home-modules/pnx.nix b/home-modules/pnx.nix index a6533ab..ea976f5 100644 --- a/home-modules/pnx.nix +++ b/home-modules/pnx.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, secrets, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, secrets, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home.packages = [ pkgs.remmina @@ -7,7 +7,7 @@ lib.mkIf (host != "NxACE") (pkgs.writeShellScriptBin "connect_to_pnx" '' pushd ~/.vpn/ - sudo openvpn --config /home/nx2/.vpn/ljk-pnx.ovpn --auth-user-pass ~/.vpn/ljk-pnx-pass.txt #gets put there by home-manager + sudo openvpn --config ${hyper.home}/.vpn/ljk-pnx.ovpn --auth-user-pass ~/.vpn/ljk-pnx-pass.txt #gets put there by home-manager popd '') diff --git a/home-modules/sent.nix b/home-modules/sent.nix index 39d355a..ec9d731 100644 --- a/home-modules/sent.nix +++ b/home-modules/sent.nix @@ -3,8 +3,6 @@ let my-sent = pkgs.sent.override { patches = [ ./sent.patch - # /home/${user}/.local/share/sent.patch - # (builtins.toFile "/home/${user}/ ]; }; in diff --git a/home-modules/ssh.nix b/home-modules/ssh.nix index 37d0c5e..f4936ed 100644 --- a/home-modules/ssh.nix +++ b/home-modules/ssh.nix @@ -5,17 +5,17 @@ file.".ssh/config".text = '' HOST nxace HostName ssh.${hyper.domain} - User nx2 + User ${hyper.user} Port 50022 HOST nxacel HostName 10.0.1.1 - User nx2 + User ${hyper.user} Port 50022 HOST nxrpil HostName 10.0.1.31 - User nx2 + User ${hyper.user} Port 22 HOST nxgit diff --git a/home-modules/tts.nix b/home-modules/tts.nix index ebd8755..a454241 100644 --- a/home-modules/tts.nix +++ b/home-modules/tts.nix @@ -1,5 +1,4 @@ -{ pkgs, lib, user, ... }: -lib.mkIf (user != "tv") +{ pkgs, ... }: { home.packages = with pkgs; [ (writeShellApplication { diff --git a/home-modules/virt-manager.nix b/home-modules/virt-manager.nix index 9e72bee..882b953 100644 --- a/home-modules/virt-manager.nix +++ b/home-modules/virt-manager.nix @@ -1,5 +1,5 @@ -{ config, pkgs, lib, host, ... }: -lib.mkIf (host == "NxNORTH") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host == "NxNORTH") { home.packages = with pkgs; [ virt-manager diff --git a/home-modules/vscode.nix b/home-modules/vscode.nix index 6a3fa2c..abef521 100644 --- a/home-modules/vscode.nix +++ b/home-modules/vscode.nix @@ -1,6 +1,6 @@ -{ config, pkgs, lib, host, rice, ... }: +{ config, pkgs, hyper, rice, ... }: { - config = lib.mkIf (host != "NxACE") { + config = pkgs.lib.mkIf (hyper.host != "NxACE") { home.packages = [ pkgs.vscodium pkgs.nixpkgs-fmt @@ -85,20 +85,20 @@ }; }; - imports = if host != "NxACE" then [ - # Make vscode settings writable - (import - (builtins.fetchurl { - url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix"; - sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8"; - }) - { inherit config lib; }) + # imports = if hyper.host != "NxACE" then [ + # # Make vscode settings writable + # (import + # (builtins.fetchurl { + # url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix"; + # sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8"; + # }) + # { inherit config pkgs; lib = pkgs.lib; }) - (import - (builtins.fetchurl { - url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix"; - sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f"; - }) - { inherit config lib pkgs; }) - ] else []; + # (import + # (builtins.fetchurl { + # url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix"; + # sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f"; + # }) + # { inherit config pkgs; lib = pkgs.lib; }) + # ] else []; } diff --git a/home-modules/wallpaper-to-colors.nix b/home-modules/wallpaper-to-colors.nix index fb53f88..98744dd 100644 --- a/home-modules/wallpaper-to-colors.nix +++ b/home-modules/wallpaper-to-colors.nix @@ -1,6 +1,6 @@ -{ pkgs-unstable, ... }: +{ pkgs, ... }: { - home.packages = with pkgs-unstable; [ + home.packages = with pkgs; [ (writers.writePython3Bin "change_colors_json" { libraries = with python3Packages; [ numpy pillow scikit-learn ]; flakeIgnore = [ "E302" "E305" "E226" "E501" ]; diff --git a/home-modules/waybar.nix b/home-modules/waybar.nix index e142715..ab3b8b9 100644 --- a/home-modules/waybar.nix +++ b/home-modules/waybar.nix @@ -1,4 +1,4 @@ -{ config, pkgs, rice, domain, user, ... }: +{ pkgs, hyper, rice, ... }: let sep = " "; in { @@ -121,8 +121,8 @@ def get_ongoing_or_next_event(url, username, password): if __name__ == "__main__": password_file = "/home/nx2/.config/sops-nix/secrets/nx2site/radicale/password" # Path to password file cache_file = "/tmp/caldav_event_cache.json" # Path to cache file - url = "https://dav.${domain}/" - username = "${user}" + url = "https://dav.${hyper.domain}/" + username = "${hyper.user}" password = get_password(password_file) event_dict = load_cache(cache_file) diff --git a/home.nix b/home.nix index e089093..c1d8e30 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,4 @@ -{ pkgs, pkgs-unstable, lib, host, user, inputs, ... }: +{ pkgs, hyper, inputs, ... }: { imports = [ ./home-modules/auto-mount.nix @@ -12,7 +12,6 @@ ./home-modules/email.nix ./home-modules/firefox.nix ./home-modules/fish.nix - # ./home-modules/foot.nix ./home-modules/games.nix ./home-modules/gestures.nix ./home-modules/ghostty.nix @@ -32,7 +31,6 @@ ./home-modules/nixd.nix ./home-modules/nvidia.nix ./home-modules/nxgs.nix - # ./home-modules/nx-gcal-event.nix ./home-modules/obs.nix ./home-modules/office.nix ./home-modules/ollama.nix @@ -61,12 +59,13 @@ ./home-modules/yazi.nix ./home-modules/zathura.nix ./home-modules/zoxide.nix - ] ++ (if (host == "NxACE") then [ + ] ++ (if (hyper.host == "NxACE") then [ ./home-modules/nx2site.nix ./home-modules/nx2site-backup.nix ] else []); - home.username = user; - home.homeDirectory = "/home/${user}"; + home.username = hyper.user; + # home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here + home.homeDirectory = "/home/${hyper.user}"; home.stateVersion = pkgs.version; home.packages = with pkgs; [ bat @@ -122,14 +121,14 @@ inputs.zen-browser.packages."${system}".default - ]) ++ (if host != "NxACE" then (with pkgs; [ + ] ++ (if hyper.host != "NxACE" then [ signal-desktop obsidian zoom-us inkscape - ]) else (with pkgs-unstable; [ + ] else { - ])); + }); xdg = { enable = true; diff --git a/sops-secrets.yaml b/sops-secrets.yaml index a90532c..e76b7e4 100644 --- a/sops-secrets.yaml +++ b/sops-secrets.yaml @@ -47,10 +47,6 @@ eduroam: hsmw-vpn-secret: ENC[AES256_GCM,data:3bKxRGTQcbhRjzARSpYBW5ekQW/U/ixzNiFmO36gw0NKyDMLlbVbJBqXvi71M0GXgmo/FA==,iv:7bVDA8u9apDNXFY/vEMbz/0HywG5Pyrl5JfZrcNCr8w=,tag:xz4j7cEc5hvLwrItWjkx0Q==,type:str] postgres-pw: ENC[AES256_GCM,data:D9b7IbvLshmRuSyF9+V3WqVf/95+OhCJm0g=,iv:D4tpzEBzcCatbnQwtOGn8X0QSrXOye20rXaw8TSB7Gk=,tag:Q0B/86eDKkhu0Jnln1sUyg==,type:str] sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] age: - recipient: age1vkqn2nars5qmpr35tac0x9vshphrq6nnzjfyxwusgn27kt3zualssv0u8e enc: | @@ -88,8 +84,8 @@ sops: SHJLR3lvdlFiRmJuU25RUHFFTmpjamMKbzycdDvQBAuOiRROTZEQSnaXoPapz73L yVS9EUP25FSx/sGqRqaCefbeaybuM1aso6LDnlomv4Bib7zjugWKSw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-03-07T17:02:01Z" - mac: ENC[AES256_GCM,data:js375bjy8Z4ApUXbw4eIqNl5BBgeX2bwMFBCx63LNCsb56OlHyYobQGtL1CwcDGW/+hwVLJSxbEDwqzJiu5vQ/2Cp00nVwvumHrvqZi/Ka4r87uNd6psE4nMq6ROHP0kJm6STKqd6MDyuLRjfX5zrki7ZhYTWsYS90/d9SUHUj8=,iv:W3w1f7lkL3fuOWmNhLUsOTKG18+wLhWA04GjygDIUEc=,tag:AYy9O7OcsY2W4VbOzyM5oA==,type:str] + lastmodified: "2025-05-27T09:47:30Z" + mac: ENC[AES256_GCM,data:B+XFym/hSq5ntjm7N2b2026tyX8jVfUcHBIbe+UIPtVNoT9Mx95vlcBnF/6+KrsI1VIe2x1rraIt0KyVVg6g3S0LVfDZumMvgjTtGQIJsLwz0UOOnkX1CBJYpca+Ec1ojtp/7xKFxBuBTuQIPsrDWF+myqvdkYF9Gb0mjMvGbdo=,iv:WAGuWuFBVwY39SBoW5JXtZMAKmzqaQSV7rBcWYQzQ1s=,tag:rQuoAh22DgFTx7iilgT74A==,type:str] pgp: - created_at: "2024-06-09T19:44:41Z" enc: |- @@ -104,4 +100,4 @@ sops: -----END PGP MESSAGE----- fp: 22FB2CC03DC5292AB81CF67D0AF27B383170E634 unencrypted_suffix: _unencrypted - version: 3.9.4 + version: 3.10.2 diff --git a/system-modules/adb.nix b/system-modules/adb.nix index eeb06e1..39f2268 100644 --- a/system-modules/adb.nix +++ b/system-modules/adb.nix @@ -1,5 +1,5 @@ { pkgs, hyper, lib, ... }: -lib.mkIf (host != "NxACE") +lib.mkIf (hyper.host != "NxACE") { environment.systemPackages = with pkgs; [ adbfs-rootless diff --git a/system-modules/boot.nix b/system-modules/boot.nix index fd5f90c..ee76877 100644 --- a/system-modules/boot.nix +++ b/system-modules/boot.nix @@ -1,7 +1,7 @@ -{ config, pkgs, pkgs-unstable, lib, host, domain, inputs, ... }: +{ config, pkgs, hyper, inputs, ... }: let grub-theme-ascii-diana = (pkgs.fetchFromGitea { - domain = "git.${domain}"; + domain = "git.${hyper.domain}"; owner = "nx2"; repo = "grub-theme-ascii-diana"; rev = "0.5.0"; @@ -9,10 +9,10 @@ let }); in { - imports = if host == "NxNORTH" then [ + imports = if hyper.host == "NxNORTH" then [ inputs.lanzaboote.nixosModules.lanzaboote ] else []; - config = if host == "NxNORTH" then { + config = if hyper.host == "NxNORTH" then { # I have to boot with secureboot becasue of the chinese spyware called Vanguard environment.systemPackages = with pkgs; [ sbctl ]; @@ -22,7 +22,7 @@ in in { enable = true; pkiBundle = "/etc/secureboot"; - package = lib.mkForce (pkgs.writeShellApplication { + package = pkgs.lib.mkForce (pkgs.writeShellApplication { name = "lzbt"; runtimeInputs = [ inputs.lanzaboote.packages.x86_64-linux.tool @@ -74,13 +74,13 @@ in # ''; # }; }; - kernelPackages = pkgs-unstable.linuxPackages_zen; + kernelPackages = pkgs.linuxPackages_zen; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; kernelModules = [ "v4l2loopback" ]; extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1''; }; security.polkit.enable = true; - } else if host == "NxXPS" then { + } else if hyper.host == "NxXPS" then { boot = { loader = { efi.canTouchEfiVariables = true; @@ -103,7 +103,7 @@ in ''; }; }; - kernelPackages = pkgs-unstable.linuxPackages_latest; + kernelPackages = pkgs.linuxPackages_latest; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; kernelModules = [ "v4l2loopback" ]; extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1''; diff --git a/system-modules/calendar-lec.nix b/system-modules/calendar-lec.nix index 280c13a..3e3998b 100644 --- a/system-modules/calendar-lec.nix +++ b/system-modules/calendar-lec.nix @@ -1,4 +1,4 @@ -{ config, pkgs, user, domain, ... }: +{ config, pkgs, hyper, ... }: { systemd.timers."nx_cal_lec" = { enable = true; @@ -74,7 +74,7 @@ def fetch_and_save_ical_events(ical_url, save_path): if __name__ == "__main__": # Replace with your iCal URL and target file path ICAL_URL = "https://zlypher.github.io/lol-events/cal/league-of-legends-lec.ical" - SAVE_PATH = "${config.services.nginx.virtualHosts."${domain}".root}/lec.ics" + SAVE_PATH = "${config.services.nginx.virtualHosts."${hyper.domain}".root}/lec.ics" fetch_and_save_ical_events(ICAL_URL, SAVE_PATH) ''); @@ -83,7 +83,7 @@ if __name__ == "__main__": ''; serviceConfig = { Type = "oneshot"; - User = "nx2"; + User = hyper.user; }; }; } diff --git a/system-modules/calendar-lr.nix b/system-modules/calendar-lr.nix index d9678ed..bb707b2 100644 --- a/system-modules/calendar-lr.nix +++ b/system-modules/calendar-lr.nix @@ -1,4 +1,4 @@ -{ config, pkgs, domain, ... }: +{ config, pkgs, hyper, ... }: { systemd.timers."nx_cal_lr" = { enable = true; @@ -59,7 +59,7 @@ def fetch_and_save_ical_events(ical_url, save_path): if __name__ == "__main__": # Replace with your iCal URL and target file path ICAL_URL = "https://zlypher.github.io/lol-events/cal/league-of-legends-nlc.ical" - SAVE_PATH = "${config.services.nginx.virtualHosts."${domain}".root}/lr.ics" + SAVE_PATH = "${config.services.nginx.virtualHosts."${hyper.domain}".root}/lr.ics" fetch_and_save_ical_events(ICAL_URL, SAVE_PATH) ''); @@ -68,7 +68,7 @@ if __name__ == "__main__": ''; serviceConfig = { Type = "oneshot"; - User = "nx2"; + User = hyper.user; }; }; } diff --git a/system-modules/calendar-publish.nix b/system-modules/calendar-publish.nix index 0a60d97..68c648e 100644 --- a/system-modules/calendar-publish.nix +++ b/system-modules/calendar-publish.nix @@ -1,4 +1,4 @@ -{ config, pkgs, user, ... }: +{ pkgs, hyper, ... }: let radicale-root = "/var/lib/radicale"; web-root = "/var/nginx/webroot"; @@ -115,11 +115,11 @@ def combine_ics_from_directories(directories, output_file): if __name__ == "__main__": # List of directories containing .ics files DIRECTORIES = [ - "${radicale-root}/collections/collection-root/${user}/preservation", - "${radicale-root}/collections/collection-root/${user}/effort", - "${radicale-root}/collections/collection-root/${user}/experience", - "${radicale-root}/collections/collection-root/${user}/exposure", - "${radicale-root}/collections/collection-root/${user}/engagement", + "${radicale-root}/collections/collection-root/${hyper.user}/preservation", + "${radicale-root}/collections/collection-root/${hyper.user}/effort", + "${radicale-root}/collections/collection-root/${hyper.user}/experience", + "${radicale-root}/collections/collection-root/${hyper.user}/exposure", + "${radicale-root}/collections/collection-root/${hyper.user}/engagement", ] # Path to the output .ics file @@ -132,7 +132,7 @@ if __name__ == "__main__": ''; serviceConfig = { Type = "oneshot"; - User = "nx2"; + User = hyper.user; }; }; } diff --git a/system-modules/dm.nix b/system-modules/dm.nix index 3cf01d5..ba22c88 100644 --- a/system-modules/dm.nix +++ b/system-modules/dm.nix @@ -1,11 +1,11 @@ -{ pkgs, user, ... }: +{ pkgs, hyper, ... }: { services.greetd = { enable = true; settings = rec { hyprland = { command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland --remember-user-session --window-padding 5"; - user = user; + user = hyper.user; }; default_session = hyprland; vt = 2; diff --git a/system-modules/games.nix b/system-modules/games.nix index 2a203b6..c503521 100644 --- a/system-modules/games.nix +++ b/system-modules/games.nix @@ -1,6 +1,6 @@ -{ lib, host, ... }: +{ pkgs, hyper, ... }: # lib.mkIf (host == "NxNORTH" || host == "NxACE") -lib.mkIf (host == "NxNORTH") +pkgs.lib.mkIf (hyper.host == "NxNORTH") { programs = { steam = { diff --git a/system-modules/hardware-configuration.nix b/system-modules/hardware-configuration.nix index dfa9c5e..5159e42 100644 --- a/system-modules/hardware-configuration.nix +++ b/system-modules/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, user, host, pkgs, modulesPath, ... }: +{ config, pkgs, hyper, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") @@ -13,10 +13,10 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems = if host != "NxACE" then { + fileSystems = if hyper.host != "NxACE" then { "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; }; - "/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; }; + "/home/${hyper.user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; }; } else { "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; }; @@ -29,23 +29,23 @@ { device = "/dev/disk/by-label/swap"; } ]; - networking.useDHCP = lib.mkDefault true; + networking.useDHCP = pkgs.lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + nixpkgs.hostPlatform = pkgs.lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = pkgs.lib.mkDefault config.hardware.enableRedistributableFirmware; # from nixos-hardware - services.thermald.enable = lib.mkDefault true; - boot.extraModprobeConfig = if host == "NxXPS" then '' + services.thermald.enable = pkgs.lib.mkDefault true; + boot.extraModprobeConfig = if hyper.host == "NxXPS" then '' options iwlwifi 11n_disable=8 '' else ""; - boot.initrd.kernelModules = if host == "NxXPS" then [ "i915" ] else []; + boot.initrd.kernelModules = if hyper.host == "NxXPS" then [ "i915" ] else []; - environment.variables = if host == "NxXPS" then { - VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl"); + environment.variables = if hyper.host == "NxXPS" then { + VDPAU_DRIVER = pkgs.lib.mkIf config.hardware.graphics.enable (pkgs.lib.mkDefault "va_gl"); } else {}; - hardware.graphics.extraPackages = if host == "NxXPS" then with pkgs; [ + hardware.graphics.extraPackages = if hyper.host == "NxXPS" then with pkgs; [ (if (lib.versionOlder (lib.versions.majorMinor lib.version) "25.05") then vaapiIntel else intel-vaapi-driver) libvdpau-va-gl intel-media-driver diff --git a/system-modules/health_reminder.nix b/system-modules/health_reminder.nix index a18e43e..e7f0f17 100644 --- a/system-modules/health_reminder.nix +++ b/system-modules/health_reminder.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { systemd.timers."health_reminder" = { enable = true; @@ -56,7 +56,7 @@ lib.mkIf (host != "NxACE") ''; serviceConfig = { Type = "oneshot"; - User = "nx2"; + User = hyper.user; }; }; } diff --git a/system-modules/hugo.nix b/system-modules/hugo.nix index 713662a..0c1ee73 100644 --- a/system-modules/hugo.nix +++ b/system-modules/hugo.nix @@ -1,5 +1,5 @@ -{ pkgs-unstable, user, ... }: -let p = pkgs-unstable; in +{ pkgs, hyper, ... }: +let p = pkgs; in { environment.systemPackages = with p; [ hugo @@ -11,7 +11,7 @@ let p = pkgs-unstable; in "hugo".name = "hugo"; }; users = { - "${user}".extraGroups = [ "hugo" ]; + "${hyper.user}".extraGroups = [ "hugo" ]; "nginx".extraGroups = [ "hugo" ]; "hugo" = { isSystemUser = true; diff --git a/system-modules/nvidia.nix b/system-modules/nvidia.nix index e346349..6df57ec 100644 --- a/system-modules/nvidia.nix +++ b/system-modules/nvidia.nix @@ -1,5 +1,5 @@ -{ config, pkgs, lib, nvidia, ... }: -lib.mkIf nvidia.enable +{ config, pkgs, hyper, ... }: +pkgs.lib.mkIf hyper.nvidia.enable { environment.systemPackages = with pkgs; [ lshw @@ -21,7 +21,7 @@ lib.mkIf nvidia.enable hardware = { nvidia = { - prime = lib.mkIf nvidia.prime { + prime = pkgs.lib.mkIf hyper.nvidia.prime { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; offload = { @@ -41,7 +41,7 @@ lib.mkIf nvidia.enable # Fine-grained power management. Turns off GPU when not in use. # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = nvidia.prime; + powerManagement.finegrained = hyper.nvidia.prime; # Use the NVidia open source kernel module (not to be confused with the # independent third-party "nouveau" open source driver). diff --git a/system-modules/nx2site.nix b/system-modules/nx2site.nix index 7022dd4..1fadf6e 100644 --- a/system-modules/nx2site.nix +++ b/system-modules/nx2site.nix @@ -1,4 +1,4 @@ -{ config, pkgs, user, domain, secrets, ... }: +{ config, pkgs, hyper, secrets, ... }: let dns-user = "cloudflare"; in { sops.secrets = { @@ -15,7 +15,7 @@ let dns-user = "cloudflare"; in isSystemUser = true; group = dns-user; }; - "${user}".extraGroups = [ dns-user ]; + "${hyper.user}".extraGroups = [ dns-user ]; }; groups."${dns-user}" = {}; }; @@ -84,13 +84,13 @@ def main(): # Perform DNS updates # https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record - print(f"${domain}: {update_record(record_id="${record_id.base}", record_name="${domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}") - print(f"*.${domain}: {update_record(record_id="${record_id.sub}", record_name="*.${domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}") - print(f"ssh.${domain}: {update_record(record_id="${record_id.ssh}", record_name="ssh.${domain}", ip=my_ip, type="A", proxied=False, pw=pw).status_code}") + print(f"${hyper.domain}: {update_record(record_id="${record_id.base}", record_name="${hyper.domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}") + print(f"*.${hyper.domain}: {update_record(record_id="${record_id.sub}", record_name="*.${hyper.domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}") + print(f"ssh.${hyper.domain}: {update_record(record_id="${record_id.ssh}", record_name="ssh.${hyper.domain}", ip=my_ip, type="A", proxied=False, pw=pw).status_code}") - print(f"${domain}: {update_record(record_id="${record_id.base6}", record_name="${domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}") - print(f"*.${domain}: {update_record(record_id="${record_id.sub6}", record_name="*.${domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}") - print(f"ssh.${domain}: {update_record(record_id="${record_id.ssh6}", record_name="ssh.${domain}", ip=my_ip6, type="AAAA", proxied=False, pw=pw).status_code}") + print(f"${hyper.domain}: {update_record(record_id="${record_id.base6}", record_name="${hyper.domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}") + print(f"*.${hyper.domain}: {update_record(record_id="${record_id.sub6}", record_name="*.${hyper.domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}") + print(f"ssh.${hyper.domain}: {update_record(record_id="${record_id.ssh6}", record_name="ssh.${hyper.domain}", ip=my_ip6, type="AAAA", proxied=False, pw=pw).status_code}") if __name__ == "__main__": main() diff --git a/system-modules/nx2site/dyn_dns.nix b/system-modules/nx2site/dyn_dns.nix index 6663a22..4b66574 100644 --- a/system-modules/nx2site/dyn_dns.nix +++ b/system-modules/nx2site/dyn_dns.nix @@ -1,4 +1,4 @@ -{ config, pkgs, domain, ... }: +{ config, pkgs, hyper, ... }: { sops.secrets = { # "nx2site/namecheap.pw" = { }; @@ -8,13 +8,14 @@ }; }; services.cloudflare-dyndns = { + pkgs = pkgs.cloudflare-dyndns; enable = true; ipv4 = true; ipv6 = config.networking.enableIPv6; domains = [ - "${domain}" - "*.${domain}" - "ssh.${domain}" + "${hyper.domain}" + "*.${hyper.domain}" + "ssh.${hyper.domain}" ]; proxied = true; apiTokenFile = config.sops.secrets."nx2site/cloudflare/global-api-key-env".path; diff --git a/system-modules/nx2site/gitea.nix b/system-modules/nx2site/gitea.nix index d6ea24e..9276ff5 100644 --- a/system-modules/nx2site/gitea.nix +++ b/system-modules/nx2site/gitea.nix @@ -1,4 +1,4 @@ -{ config, pkgs, secrets, user, domain, ... }: +{ config, pkgs, hyper, secrets, ... }: let git-user = "git"; in { sops.secrets = { @@ -7,13 +7,13 @@ let git-user = "git"; in users = { users = { - "${user}".extraGroups = [ git-user ]; + "${hyper.user}".extraGroups = [ git-user ]; "${git-user}" = { isSystemUser = true; group = git-user; useDefaultShell = true; home = config.services.gitea.stateDir; - openssh.authorizedKeys.keys = config.users.users."${user}".openssh.authorizedKeys.keys; + openssh.authorizedKeys.keys = config.users.users."${hyper.user}".openssh.authorizedKeys.keys; }; }; groups."${git-user}" = {}; @@ -63,12 +63,12 @@ let git-user = "git"; in START_SSH_SERVER = false; # default SSH_LISTEN_HOST = "0.0.0.0"; SSH_PORT = secrets.ssh.port; - DOMAIN = "git.${domain}"; - SSH_DOMAIN = "ssh.${domain}"; + DOMAIN = "git.${hyper.domain}"; + SSH_DOMAIN = "ssh.${hyper.domain}"; # HTTP_ADDR = "${config.services.gitea.settings.server.DOMAIN}"; # HTTP_PORT = 3000; # default # PROTOCOL = "http"; # default - ROOT_URL = "https://git.${domain}/"; # default + ROOT_URL = "https://git.${hyper.domain}/"; # default }; session = { COOKIE_SECURE = true; @@ -90,7 +90,7 @@ let git-user = "git"; in # hash = "sha256-Eibgoc3BJUXWdq8irgXea09fAvfKx2eQrJotp3P5DTg="; # }; theme = pkgs.fetchFromGitea { - domain = "git.${domain}"; + domain = "git.${hyper.domain}"; owner = "nx2"; repo = "Gitea-Pitch-Black"; rev = "0.1.0"; diff --git a/system-modules/nx2site/nextcloud.nix b/system-modules/nx2site/nextcloud.nix index 4f5ef82..37d067c 100644 --- a/system-modules/nx2site/nextcloud.nix +++ b/system-modules/nx2site/nextcloud.nix @@ -1,4 +1,4 @@ -{ config, domain, ... }: +{ config, hyper, ... }: { sops.secrets = { "nx2site/nextcloud/admin-pass" = { owner = "nextcloud"; }; @@ -9,7 +9,7 @@ services = { nextcloud = { enable = true; - hostName = "nc.${domain}"; + hostName = "nc.${hyper.domain}"; https = true; configureRedis = true; config = { diff --git a/system-modules/nx2site/open-web-calendar.nix b/system-modules/nx2site/open-web-calendar.nix index 056f663..756aa7b 100644 --- a/system-modules/nx2site/open-web-calendar.nix +++ b/system-modules/nx2site/open-web-calendar.nix @@ -1,15 +1,14 @@ -{ pkgs, domain, ... }: +{ pkgs, hyper, ... }: { services = { open-web-calendar = { enable = true; - domain = "cal.${domain}"; + domain = "cal.${hyper.domain}"; package = pkgs.open-web-calendar; settings = { # PORT = 21342; }; - calendarSettings = { - }; + calendarSettings = { }; }; }; } diff --git a/system-modules/nx2site/paperless.nix b/system-modules/nx2site/paperless.nix index 45e3157..7ff6604 100644 --- a/system-modules/nx2site/paperless.nix +++ b/system-modules/nx2site/paperless.nix @@ -1,4 +1,4 @@ -{ pkgs, config, secrets, domain, user, ... }: +{ config, pkgs, hyper, secrets, ... }: let paperless-user = "paperless"; in { sops.secrets = { @@ -8,7 +8,7 @@ let paperless-user = "paperless"; in }; users.users = { - "${user}".extraGroups = [ paperless-user ]; + "${hyper.user}".extraGroups = [ paperless-user ]; "${paperless-user}".extraGroups = [ "redis-paperless" ]; }; @@ -64,7 +64,7 @@ let paperless-user = "paperless"; in # PAPERLESS_LOGROTATE_MAX_SIZE= 1 MiB. # PAPERLESS_LOGROTATE_MAX_BACKUPS= 20. # PAPERLESS_SECRET_KEY= - PAPERLESS_URL = "https://doc.${domain}"; + PAPERLESS_URL = "https://doc.${hyper.domain}"; # PAPERLESS_CSRF_TRUSTED_ORIGINS= # PAPERLESS_ALLOWED_HOSTS= # PAPERLESS_CORS_ALLOWED_HOSTS= diff --git a/system-modules/nx2site/proxy.nix b/system-modules/nx2site/proxy.nix index a8e85ec..8be91bc 100644 --- a/system-modules/nx2site/proxy.nix +++ b/system-modules/nx2site/proxy.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, domain, ... }: +{ config, hyper, pkgs, ... }: { sops.secrets = { "nx2site/sslCertificate.pem" = { owner = config.services.nginx.user; }; @@ -8,13 +8,13 @@ security.acme = { acceptTerms = true; defaults = { - email = "acme@${domain}"; + email = "acme@${hyper.domain}"; webroot = "/var/nginx/webroot"; group = "nginx"; }; certs = { - "${domain}" = { - extraDomainNames = builtins.map (subd: "${subd}.${domain}") [ "sync" "dev" ]; + "${hyper.domain}" = { + extraDomainNames = builtins.map (subd: "${subd}.${hyper.domain}") [ "sync" "dev" ]; }; }; }; @@ -76,7 +76,7 @@ enableACME = true; }; in { - "${domain}" = vh // { + "${hyper.domain}" = vh // { root = "/var/nginx/webroot"; default = true; listen = dl; @@ -95,11 +95,11 @@ "/.well-known/matrix/server" = { return = "502"; }; }; }; - "matrix.${domain}" = { + "matrix.${hyper.domain}" = { listen = dl; locations = { "~.*" = { return = "502"; }; }; }; - # "pw.${domain}" = vh // { + # "pw.${hyper.domain}" = vh // { # listen = dl; # locations = let d = "pw.docker:80"; in { # "/" = { proxyPass = "http://${d}"; }; @@ -108,7 +108,7 @@ # "/notifications/hub/negotiate" = { proxyPass = "http://${d}"; }; # }; # }; - "pw.${domain}" = vh // { + "pw.${hyper.domain}" = vh // { listen = dl; locations = let d = with config.services.vaultwarden.config; "${ROCKET_ADDRESS}:${builtins.toString ROCKET_PORT}"; @@ -119,38 +119,38 @@ "/notifications/hub/negotiate" = { proxyPass = "http://${d}"; }; }; }; - "sync.${domain}" = vh // { + "sync.${hyper.domain}" = vh // { listen = dl; locations = { "/" = { proxyPass = "http://127.0.0.1:11434"; }; }; }; - # "git.${domain}" = vh // { + # "git.${hyper.domain}" = vh // { # listen = dl; # locations = { "/" = { proxyPass = "http://git.docker:3000"; }; }; # }; - "git.${domain}" = vh // { + "git.${hyper.domain}" = vh // { http2 = false; listen = dl; locations = { "/" = { proxyPass = "http://127.0.0.1:3000"; }; }; }; - "doc.${domain}" = vh // { + "doc.${hyper.domain}" = vh // { listen = dl; locations = { "/" = { proxyPass = "http://127.0.0.1:8441"; }; }; }; - "dav.${domain}" = lib.mkIf config.services.radicale.enable (vh // { + "dav.${hyper.domain}" = lib.mkIf config.services.radicale.enable (vh // { listen = dl; locations = { "/" = { proxyPass = "http://127.0.0.1:5232"; }; }; }); - # "nc.${domain}" = vh // { + # "nc.${hyper.domain}" = vh // { # # directly to nc # }; - "abs.${domain}" = vh // { + "abs.${hyper.domain}" = vh // { listen = dl; locations."/" = { proxyPass = "http://127.0.0.1:${builtins.toString config.services.audiobookshelf.port}"; proxyWebsockets = true; }; }; - "dev.${domain}" = vh // { + "dev.${hyper.domain}" = vh // { listen = dl ++ [ # { addr = "0.0.0.0"; port = 8000; ssl = true; } # { addr = "[::0]"; port = 8000; ssl = true; } @@ -162,17 +162,17 @@ # }; }; # is done atomatically - # "cal.${domain}" = vh // { + # "cal.${hyper.domain}" = vh // { # listen = dl; # locations = { "/" = { # proxyPass = "http://unix:///run/open-web-calendar/socket"; # proxyWebsockets = true; # }; }; # }; - "~^(.*).${domain}$" = { + "~^(.*).${hyper.domain}$" = { listen = dl; root = "/var/nginx/webroot"; - locations = { "~.*" = { return = "301 https://${domain}/502.html"; }; }; + locations = { "~.*" = { return = "301 https://${hyper.domain}/502.html"; }; }; }; }; }; diff --git a/system-modules/nx2site/radicale.nix b/system-modules/nx2site/radicale.nix index b98635d..56861df 100644 --- a/system-modules/nx2site/radicale.nix +++ b/system-modules/nx2site/radicale.nix @@ -1,4 +1,4 @@ -{ config, domain, ... }: +{ config, hyper, ... }: { sops.secrets = { "nx2site/radicale/htpasswd" = { @@ -15,7 +15,7 @@ port = builtins.toString 5232; in [ "0.0.0.0:${port}" - "${domain}:${port}" + "${hyper.domain}:${port}" # "192.168.178.32:${port}" ]; auth = { diff --git a/system-modules/nx2site/vaultwarden.nix b/system-modules/nx2site/vaultwarden.nix index d5e5546..8917ca6 100644 --- a/system-modules/nx2site/vaultwarden.nix +++ b/system-modules/nx2site/vaultwarden.nix @@ -1,4 +1,4 @@ -{ config, pkgs, secrets, domain, ... }: +{ config, pkgs, hyper, secrets, ... }: { sops.secrets = { "nx2site/vaultwarden.env" = { @@ -27,7 +27,7 @@ SMTP_PASSWORD = "@SMTP_PASSWORD@"; LOGIN_RATELIMIT_MAX_BURST = 10; LOGIN_RATELIMIT_SECONDS = 60; - DOMAIN = "https://pw.${domain}"; + DOMAIN = "https://pw.${hyper.domain}"; INVITATION_ORG_NAME = "NxPW"; INVITATIONS_ALLOWED = true; ADMIN_TOKEN = "@ADMIN_TOKEN@"; diff --git a/system-modules/ollama.nix b/system-modules/ollama.nix index c642bc8..3c9c9c6 100644 --- a/system-modules/ollama.nix +++ b/system-modules/ollama.nix @@ -1,14 +1,10 @@ -{ pkgs, lib, host, nvidia, ... }: -let - p = if nvidia.enable then pkgs.ollama-cuda else pkgs.ollama; -in { - environment.systemPackages = [ p ]; - +{ pkgs, hyper, ... }: +{ services.ollama = { - package = p; + package = if hyper.nvidia.enable then pkgs.ollama-cuda else pkgs.ollama; enable = true; - acceleration = lib.mkIf nvidia.enable "cuda"; - host = if host == "NxACE" then "0.0.0.0" else "127.0.0.1"; + acceleration = pkgs.lib.mkIf hyper.nvidia.enable "cuda"; + host = if hyper.host == "NxACE" then "0.0.0.0" else "127.0.0.1"; port = 11434; environmentVariables = { OLLAMA_ORIGINS = "*"; diff --git a/system-modules/sops.nix b/system-modules/sops.nix index 717f9ff..f3271ac 100644 --- a/system-modules/sops.nix +++ b/system-modules/sops.nix @@ -1,4 +1,4 @@ -{ pkgs, user, ... }: +{ pkgs, ... }: { environment.systemPackages = with pkgs; [ age @@ -8,15 +8,10 @@ sops = { defaultSopsFile = ../sops-secrets.yaml; defaultSopsFormat = "yaml"; - # age = { - # sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - # generateKey = true; - # }; # gnupg = { # sshKeyPaths = []; - # home = "/home/${user}/.gnupg"; + # home = "${hyper.user}/.gnupg"; # }; - secrets.example = {}; }; } diff --git a/system-modules/syncthing.nix b/system-modules/syncthing.nix index 9c316c9..bfcadbd 100644 --- a/system-modules/syncthing.nix +++ b/system-modules/syncthing.nix @@ -1,10 +1,5 @@ -{ - config, - lib, - user, - host, - secrets, -... }: let +{ config, pkgs, hyper, secrets, ... }: +let # helper funcitons conv = _: device: with device; { "${name}" = {id = id;};}; justname = devices: (builtins.map (device: device.name)) devices; @@ -22,7 +17,7 @@ }; dirs = { - default = { name = "sync"; path = "/home/${user}/sync"; }; + default = { name = "sync"; path = "/home/${hyper.user}/sync"; }; s21u-dcim = { name = "s21u-dcim"; path = "/vault/Pictures/Lennart"; }; diane-dcim = { name = "diane-dcim"; path = "/vault/Pictures/Diane"; }; dianesd-dcim = { name = "dianesd-dcim"; path = "/vault/Pictures/Diane-SD"; }; @@ -31,34 +26,35 @@ }; in { sops.secrets = { - "syncthing/${host}/cert.pem" = { owner = user; }; - "syncthing/${host}/key.pem" = { owner = user; }; + "syncthing/${hyper.host}/cert.pem" = { owner = hyper.user; }; + "syncthing/${hyper.host}/key.pem" = { owner = hyper.user; }; }; services.syncthing = with (builtins.mapAttrs conv devices); { enable = true; - user = "${user}"; - dataDir = "/home/${user}/.local/share/syncthing"; # useless ? - configDir = "/home/${user}/.config/syncthing"; - key = config.sops.secrets."syncthing/${host}/key.pem".path; - cert = config.sops.secrets."syncthing/${host}/cert.pem".path; + user = "${hyper.user}"; + package = pkgs.syncthing; + dataDir = "/home/${hyper.user}/.local/share/syncthing"; # useless ? + configDir = "/home/${hyper.user}/.config/syncthing"; + key = config.sops.secrets."syncthing/${hyper.host}/key.pem".path; + cert = config.sops.secrets."syncthing/${hyper.host}/cert.pem".path; overrideDevices = true; overrideFolders = true; # guiAddress = "127.0.0.1:8384"; - guiAddress = if ( host == "NxACE" ) then "0.0.0.0:8384" else "127.0.0.1:8384"; + guiAddress = if ( hyper.host == "NxACE" ) then "0.0.0.0:8384" else "127.0.0.1:8384"; settings = { - devices = with (builtins.mapAttrs conv devices); if (host == "NxXPS") then ( + devices = with (builtins.mapAttrs conv devices); if (hyper.host == "NxXPS") then ( north // ace // s21u - ) else if (host == "NxNORTH") then ( + ) else if (hyper.host == "NxNORTH") then ( xps // ace // s21u ) else ( north // xps // s21u // diane // daniel // tessa // georg ); - folders = with dirs; if (host == "NxXPS") then { + folders = with dirs; if (hyper.host == "NxXPS") then { "${default.name}" = { path = default.path; devices = with devices; (justname [ north ace s21u ]); }; - } else if (host == "NxNORTH") then { + } else if (hyper.host == "NxNORTH") then { "${default.name}" = { path = default.path; devices = with devices; (justname [ xps ace s21u ]); @@ -91,7 +87,7 @@ in { }; gui = { theme = "black"; - user = user; + user = hyper.user; password = secrets.syncthing.gui-password; # option to use a file is till in the works... https://github.com/NixOS/nixpkgs/issues/85336 }; }; diff --git a/system-modules/virtualisation.nix b/system-modules/virtualisation.nix index 6a8e6db..9fa1b9e 100644 --- a/system-modules/virtualisation.nix +++ b/system-modules/virtualisation.nix @@ -1,12 +1,12 @@ -{ config, pkgs, lib, user, host, ... }: +{ pkgs, hyper, ... }: { - config = lib.mkIf (host == "NxNORTH") { + config = pkgs.lib.mkIf (hyper.host == "NxNORTH") { environment.systemPackages = with pkgs; [ virtiofsd ]; virtualisation.libvirtd.enable = true; programs.virt-manager.enable = true; - users.users."${user}".extraGroups = [ "libvirtd" ]; + users.users."${hyper.user}".extraGroups = [ "libvirtd" ]; }; } \ No newline at end of file diff --git a/system-modules/ydotool.nix b/system-modules/ydotool.nix index 01e4c23..98d213a 100644 --- a/system-modules/ydotool.nix +++ b/system-modules/ydotool.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host == "NxXPS") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host == "NxXPS") { programs.ydotool.enable = true; } From 9d3418bec24388acb88ee33be43f953e4324aac7 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 28 May 2025 14:48:08 +0000 Subject: [PATCH 10/12] htop --- home-modules/pkgs-list/shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-modules/pkgs-list/shell.nix b/home-modules/pkgs-list/shell.nix index bdd67fa..bd00f5c 100644 --- a/home-modules/pkgs-list/shell.nix +++ b/home-modules/pkgs-list/shell.nix @@ -14,6 +14,7 @@ glib glow gnumake + htop imagemagick jq lolcat From 8be84ff0a99182803d4a5429702f3e1ae663f294 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 28 May 2025 14:49:09 +0000 Subject: [PATCH 11/12] dicos git --- home-modules/git.nix | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/home-modules/git.nix b/home-modules/git.nix index 1e54806..33920f4 100644 --- a/home-modules/git.nix +++ b/home-modules/git.nix @@ -1,40 +1,13 @@ { pkgs, hyper, rice, ... }: { home.packages = with pkgs; [ - git delta - - (pkgs.writeShellScriptBin "git_monitor" '' - #!/bin/bash - - # List of directories to check - directories=( - "$HOME/nix-dots" - "$HOME/obsidian-vault" - "$HOME/Pictures/wallpapers" - ) - echo "" - for dir in "''${directories[@]}"; do - if [ -d "$dir" ]; then - cd "$dir" || { echo "Cannot change directory to $dir"; exit 1; } - echo "$(echo $dir | rev | cut -f 1 -d'/' | rev):" - if [[ $* == *--fetch* ]]; then - git fetch - fi - gst - echo "" - cd - > /dev/null || { echo "Cannot change back to the original directory"; exit 1; } - else - echo "Directory $dir does not exist." - fi - done - '') - (writeShellScriptBin "gst" "awk -vOFS='' 'NR==FNR {all[i++] = $0; difffiles[$1] = $0; next;} ! ($2 in difffiles) {print; next;} {gsub($2, difffiles[$2]); print;} END {if (NR != FNR) {exit;} for (i in all) {print all[i];}}' <(git diff --color --stat=$(($(tput cols) - 3)) HEAD | sed '$d; s/^ //') <(git -c color.status=always status -sb)") ]; programs.git = { enable = true; + package = pkgs.gitFull; userName = ''Lennart J. Kurzweg (Nx2)''; userEmail = "git@${hyper.domain}"; delta = { @@ -46,6 +19,14 @@ whitespace-error-style = "22 reverse"; }; }; + extraConfig = { + credential = { + "https://git.da.dicos.de".username = pkgs.lib.mkIf (hyper.host =="NxWSL") "lkurzweg"; + "https://git.da.dicos.de".password = pkgs.lib.mkIf (hyper.host =="NxWSL") "Test"; + }; + url."ssh://git@git.da.dicos.de/".insteadOf = pkgs.lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/"; + pull.rebase = false; # true + }; }; programs.lazygit = { enable = true; From 88e73a3ea844a308413e94e22059b838ab1fb2ac Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 28 May 2025 14:49:20 +0000 Subject: [PATCH 12/12] helix colors for windows terminal --- home-modules/helix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-modules/helix.nix b/home-modules/helix.nix index e1e6b7f..869043e 100644 --- a/home-modules/helix.nix +++ b/home-modules/helix.nix @@ -51,7 +51,7 @@ preview-completion-insert = true; completion-trigger-len = 1; auto-info = true; - true-color = false; # is detected automatically if set to false + true-color = true; # is detected automatically if set to false undercurl = false; # is detected automatically if set to false rulers = []; bufferline = "always";