Skip to content

Commit 0ef03eb

Browse files
[READY] nixos: repo sync and disable gw on backdoor0 (#1105)
2 parents b1c7971 + d549662 commit 0ef03eb

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

nix/nixos-configurations/router-border/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
LLDP = true;
5252
EmitLLDP = true;
5353
};
54+
dhcpV4Config = {
55+
UseGateway = false;
56+
UseRoutes = false;
57+
};
5458
linkConfig.RequiredForOnline = "no";
5559
};
5660
};

nix/nixos-configurations/router-expo/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
LLDP = true;
5151
EmitLLDP = true;
5252
};
53+
dhcpV4Config = {
54+
UseGateway = false;
55+
UseRoutes = false;
56+
};
5357
linkConfig.RequiredForOnline = "no";
5458
};
5559
};

nix/nixos-modules/base.nix

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ in
2222
# default to stateVersion for current lock
2323
system.stateVersion = config.system.nixos.release;
2424

25+
system.activationScripts.syncRepo = {
26+
# will run after "etc" (which updates /etc symlinks).
27+
deps = [ "etc" ];
28+
29+
# ensure we have a local copy of scale-network and fetch
30+
# this does not update the local branch in the repo, it
31+
# only updates the local remote refs
32+
text = ''
33+
REPO_URL="https://github.com/socallinuxexpo/scale-network"
34+
REPO_DIR="/root/scale-network"
35+
36+
if [ ! -d "$REPO_DIR" ]; then
37+
echo "Cloning repository..."
38+
${lib.getExe pkgs.git} clone "$REPO_URL" "$REPO_DIR"
39+
else
40+
echo "Repository exists. Fetching updates..."
41+
${lib.getExe pkgs.git} -C "$REPO_DIR" fetch --all --prune
42+
fi
43+
'';
44+
};
45+
2546
# remove the annoying experimental warnings
2647
nix.extraOptions = ''
2748
experimental-features = nix-command flakes

nix/nixos-modules/routers/conference.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ in
230230
nameValuePair "30-${interface}" {
231231
matchConfig.Name = "${interface}";
232232
linkConfig = {
233-
RequiredForOnline = "carrier";
233+
RequiredForOnline = "no-carrier";
234234
};
235235
networkConfig = {
236236
LinkLocalAddressing = "no";

nix/nixos-modules/routers/expo.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ in
226226
nameValuePair "30-${interface}" {
227227
matchConfig.Name = "${interface}";
228228
linkConfig = {
229-
RequiredForOnline = "carrier";
229+
RequiredForOnline = "no-carrier";
230230
};
231231
networkConfig = {
232232
LinkLocalAddressing = "no";

0 commit comments

Comments
 (0)