starlight: use openvswitch instead of stacked bridges

This commit is contained in:
Artemis Tosini 2023-11-13 23:19:11 +00:00
parent bc499e6ccc
commit f5374d2606
Signed by: artemist
GPG key ID: EE5227935FE3FF18
2 changed files with 29 additions and 41 deletions

View file

@ -201,11 +201,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1699368917, "lastModified": 1699783872,
"narHash": "sha256-nUtGIWf86BOkUbtksWtfglvCZ/otP0FTZlQH8Rzc7PA=", "narHash": "sha256-4zTwLT2LL45Nmo6iwKB3ls3hWodVP9DiSWxki/oewWE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "6a8444467c83c961e2f5ff64fb4f422e303c98d3", "rev": "280721186ab75a76537713ec310306f0eba3e407",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -250,11 +250,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1699156599, "lastModified": 1699760693,
"narHash": "sha256-Qk9ZE/pG9lNIGUVNArJxL0Hc0Soa92eQPPIhcDwWinU=", "narHash": "sha256-u/gkNUHQR/q23voqE5J4xmEWQIAqR+g3lUnCtzn0k7Y=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "5388a4002179d6778d212dc2fdcc7ac3fdbd5b65", "rev": "8aff4ca3dee60d1422489fe8d52c2f837b3ad113",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -265,11 +265,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1699159446, "lastModified": 1699701045,
"narHash": "sha256-cL63IjsbPl2otS7R4kdXbVOJOXYMpGw5KGZoWgdCuCM=", "narHash": "sha256-mDzUXK7jNO/utInWpSWEX1NgEEunVIpJg+LyPsDTfy0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "627bc9b88256379578885a7028c9e791c29fb581", "rev": "b689465d0c5d88e158e7d76094fca08cc0223aad",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -338,11 +338,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1699308475, "lastModified": 1699881763,
"narHash": "sha256-sFHOFiE+GV1JkwDmHi0LLJLSRyggdIK1Yra02oj2eZg=", "narHash": "sha256-3oky/Ye5JPIsPj77A7XGXFkAlhAV70N1pGoEkfZKQyA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "6b93c8fa6db999320d53f13e0ebd555e33f86577", "rev": "d748d9ea024c0ebe99996f71a534d2ebb12e5462",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -390,11 +390,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1698852633, "lastModified": 1699271226,
"narHash": "sha256-Hsc/cCHud8ZXLvmm8pxrXpuaPEeNaaUttaCvtdX/Wug=", "narHash": "sha256-8Jt1KW3xTjolD6c6OjJm9USx/jmL+VVmbooADCkdDfU=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "dec10399e5b56aa95fcd530e0338be72ad6462a0", "rev": "ea758da1a6dcde6dc36db348ed690d09b9864128",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -33,11 +33,20 @@
networking.useDHCP = false; networking.useDHCP = false;
networking.bridges.br0 = { networking.vswitches.vs0.interfaces = {
rstp = true; lan10g0 = { };
interfaces = [ "lan10g0" "lan10g1" "lan1g0" ]; lan10g1 = { };
lan1g0 = { vlan = 4; };
"vs0.4" = {
vlan = 4;
type = "internal";
}; };
networking.interfaces.br0 = { "vs0.1" = {
vlan = 1;
type = "internal";
};
};
networking.interfaces."vs0.1" = {
useDHCP = true; useDHCP = true;
ipv6.addresses = [{ ipv6.addresses = [{
address = "2001:470:8b04:6900:6969:1454:7749:e591"; address = "2001:470:8b04:6900:6969:1454:7749:e591";
@ -45,24 +54,6 @@
}]; }];
}; };
networking.vlans."br0.5" = {
id = 5;
interface = "br0";
};
networking.bridges.brvm = {
rstp = false;
interfaces = [ "br0.5" ];
};
networking.vlans."br0.4" = {
id = 4;
interface = "br0";
};
networking.bridges.briot = {
rstp = false;
interfaces = [ "br0.4" ];
};
services.openssh.extraConfig = '' services.openssh.extraConfig = ''
HostCertificate ${./starlight-cert.pub} HostCertificate ${./starlight-cert.pub}
''; '';
@ -81,7 +72,7 @@
}; };
# Packages # Packages
boot.binfmt.emulatedSystems = [ "aarch64-linux" "riscv64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
services.printing.drivers = [ services.printing.drivers = [
(pkgs.brlaser.overrideAttrs (old: { (pkgs.brlaser.overrideAttrs (old: {
@ -95,9 +86,6 @@
})) }))
]; ];
services.udev.packages =
[ (pkgs.callPackage ../../externals/rules/m1n1.nix { }) ];
hardware.opengl.extraPackages = with pkgs; [ vulkan-validation-layers ]; hardware.opengl.extraPackages = with pkgs; [ vulkan-validation-layers ];
# Home # Home