summaryrefslogtreecommitdiff
path: root/hosts/sif/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2024-08-01 10:48:06 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2024-08-01 10:48:06 +0200
commit0f06a86b1eaa99ff21cdce8c5f1c54b688cbbcf6 (patch)
tree41691fef5468c5efbc32c12cbacd55e97b23b0de /hosts/sif/default.nix
parent48f8d3c11d9117f10e6ca5b76a08b91cef5c861b (diff)
downloadnixos-0f06a86b1eaa99ff21cdce8c5f1c54b688cbbcf6.tar
nixos-0f06a86b1eaa99ff21cdce8c5f1c54b688cbbcf6.tar.gz
nixos-0f06a86b1eaa99ff21cdce8c5f1c54b688cbbcf6.tar.bz2
nixos-0f06a86b1eaa99ff21cdce8c5f1c54b688cbbcf6.tar.xz
nixos-0f06a86b1eaa99ff21cdce8c5f1c54b688cbbcf6.zip
...
Diffstat (limited to 'hosts/sif/default.nix')
-rw-r--r--hosts/sif/default.nix110
1 files changed, 52 insertions, 58 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix
index 96cd66cc..610d990d 100644
--- a/hosts/sif/default.nix
+++ b/hosts/sif/default.nix
@@ -187,12 +187,10 @@ in {
187 # FirewallMark = 1; 187 # FirewallMark = 1;
188 }; 188 };
189 wireguardPeers = [ 189 wireguardPeers = [
190 { wireguardPeerConfig = { 190 { AllowedIPs = [ "10.200.116.1/32" "10.163.88.40/32" ] ++ mwnSubnetsPrivate ++ mwnSubnetsPublic;
191 AllowedIPs = [ "10.200.116.1/32" "10.163.88.40/32" ] ++ mwnSubnetsPrivate ++ mwnSubnetsPublic; 191 PublicKey = "YlRFLc+rD2k2KXl7pIJbOKbcPgdJCl8ZTsv0xlK4VEI=";
192 PublicKey = "YlRFLc+rD2k2KXl7pIJbOKbcPgdJCl8ZTsv0xlK4VEI="; 192 PersistentKeepalive = 25;
193 PersistentKeepalive = 25; 193 Endpoint = "wg.math.lmu.de:51820";
194 Endpoint = "wg.math.lmu.de:51820";
195 };
196 } 194 }
197 ]; 195 ];
198 }; 196 };
@@ -211,43 +209,34 @@ in {
211 Name = "wgrz"; 209 Name = "wgrz";
212 }; 210 };
213 address = ["10.200.116.128/24"]; 211 address = ["10.200.116.128/24"];
214 routes = map (Destination: { routeConfig = { 212 routes = map (Destination: {
215 inherit Destination; 213 inherit Destination;
216 Gateway = "10.200.116.1"; 214 Gateway = "10.200.116.1";
217 GatewayOnLink = true; 215 GatewayOnLink = true;
218 Table = "wgrz"; 216 Table = "wgrz";
219 };}) (mwnSubnetsPrivate ++ mwnSubnetsPublic ++ ["10.163.88.40/32"]); 217 }) (mwnSubnetsPrivate ++ mwnSubnetsPublic ++ ["10.163.88.40/32"]);
220 routingPolicyRules = [ 218 routingPolicyRules = [
221 { routingPolicyRuleConfig = { 219 { Table = "main";
222 Table = "main"; 220 # FirewallMark = 1;
223 # FirewallMark = 1; 221 To = "129.187.111.225";
224 To = "129.187.111.225"; 222 Priority = 100;
225 Priority = 100;
226 };
227 } 223 }
228 { routingPolicyRuleConfig = { 224 { Table = "main";
229 Table = "main"; 225 To = "10.153.91.204";
230 To = "10.153.91.204"; 226 Priority = 100;
231 Priority = 100;
232 };
233 } 227 }
234 { routingPolicyRuleConfig = { 228 { Table = "wgrz";
235 Table = "wgrz"; 229 From = "10.200.116.128";
236 From = "10.200.116.128"; 230 Priority = 200;
237 Priority = 200;
238 };
239 } 231 }
240 { routingPolicyRuleConfig = { 232 { Table = "wgrz";
241 Table = "wgrz"; 233 To = "10.163.88.40";
242 To = "10.163.88.40"; 234 Priority = 200;
243 Priority = 200;
244 };
245 } 235 }
246 ] ++ map (To: { routingPolicyRuleConfig = { 236 ] ++ map (To: { Table = "wgrz";
247 Table = "wgrz"; 237 inherit To;
248 inherit To; 238 Priority = 200;
249 Priority = 200; 239 }) (mwnSubnetsPrivate ++ mwnSubnetsPublic);
250 };}) (mwnSubnetsPrivate ++ mwnSubnetsPublic);
251 linkConfig = { 240 linkConfig = {
252 RequiredForOnline = false; 241 RequiredForOnline = false;
253 }; 242 };
@@ -328,7 +317,7 @@ in {
328 }; 317 };
329 318
330 environment.systemPackages = with pkgs; [ 319 environment.systemPackages = with pkgs; [
331 nvtop brightnessctl config.boot.kernelPackages.v4l2loopback s-tui uhk-agent 320 nvtopPackages.full brightnessctl config.boot.kernelPackages.v4l2loopback s-tui uhk-agent
332 ]; 321 ];
333 322
334 services = { 323 services = {
@@ -375,9 +364,27 @@ in {
375 xserver = { 364 xserver = {
376 enable = true; 365 enable = true;
377 366
378 layout = "us"; 367 xkb = {
379 xkbVariant = "dvp"; 368 layout = "us";
380 xkbOptions = "compose:caps"; 369 variant = "dvp";
370 options = "compose:caps";
371 };
372
373 wacom.enable = true;
374
375 dpi = 282;
376
377 videoDrivers = [ "nvidia" ];
378
379 screenSection = ''
380 Option "metamodes" "nvidia-auto-select +0+0 { ForceCompositionPipeline = On }"
381 '';
382
383 deviceSection = ''
384 Option "TearFree" "True"
385 '';
386
387 exportConfiguration = true;
381 388
382 displayManager.lightdm = { 389 displayManager.lightdm = {
383 enable = true; 390 enable = true;
@@ -403,24 +410,8 @@ in {
403 ''; 410 '';
404 }; 411 };
405 }; 412 };
406
407 wacom.enable = true;
408 libinput.enable = true;
409
410 dpi = 282;
411
412 videoDrivers = [ "nvidia" ];
413
414 screenSection = ''
415 Option "metamodes" "nvidia-auto-select +0+0 { ForceCompositionPipeline = On }"
416 '';
417
418 deviceSection = ''
419 Option "TearFree" "True"
420 '';
421
422 exportConfiguration = true;
423 }; 413 };
414 libinput.enable = true;
424 }; 415 };
425 416
426 systemd.tmpfiles.rules = [ 417 systemd.tmpfiles.rules = [
@@ -549,9 +540,9 @@ in {
549 }; 540 };
550 }; 541 };
551 542
552 opengl = { 543 graphics = {
553 enable = true; 544 enable = true;
554 driSupport32Bit = true; 545 enable32Bit = true;
555 # setLdLibraryPath = true; 546 # setLdLibraryPath = true;
556 }; 547 };
557 548
@@ -647,7 +638,10 @@ in {
647 group = "users"; 638 group = "users";
648 }; 639 };
649 640
650 i18n.inputMethod.enabled = "ibus"; 641 i18n.inputMethod = {
642 enable = true;
643 type = "ibus";
644 };
651 645
652 environment.sessionVariables."GTK_USE_PORTAL" = "1"; 646 environment.sessionVariables."GTK_USE_PORTAL" = "1";
653 xdg.portal = { 647 xdg.portal = {