tangled
alpha
login
or
join now
wiro.world
/
dotfiles
2
fork
atom
yep, more dotfiles
2
fork
atom
overview
issues
1
pulls
1
pipelines
weird-row-server: fix networking config
wiro.world
3 weeks ago
7037142c
2509ab43
verified
This commit was signed with the committer's
known signature
.
wiro.world
SSH Key Fingerprint:
SHA256:SmMcWpNAnL+VAgItSawvXgdPVn7f1rsyAuB/5VNclKY=
1/1
nix.yml
success
4s
+31
-39
3 changed files
expand all
collapse all
unified
split
Justfile
globals.nix
hosts
weird-row-server
default.nix
+6
Justfile
reviewed
···
26
26
--flake .#{{host}} \
27
27
--target-host {{host}} \
28
28
--sudo {{args}}
29
29
+
30
30
+
test-target host *args:
31
31
+
nixos-rebuild test \
32
32
+
--flake .#{{host}} \
33
33
+
--target-host {{host}} \
34
34
+
--sudo {{args}}
+1
-1
globals.nix
reviewed
···
35
35
hosts = {
36
36
weird-row-server = {
37
37
ip = "91.99.55.74";
38
38
-
ip-prefix-length = 1;
38
38
+
ip-prefix-length = 32;
39
39
ip6 = "2a01:4f8:c2c:76d2::1";
40
40
ip6-prefix-length = 64;
41
41
ip6-agnos = "2a01:4f8:c2c:76d2::2";
+24
-38
hosts/weird-row-server/default.nix
reviewed
···
6
6
7
7
let
8
8
inherit (self.inputs) srvos;
9
9
-
10
10
-
ext-if = "eth0";
11
11
-
external-gateway = "144.x.x.255";
12
12
-
external-gateway6 = "fe80::1";
13
9
in
14
10
{
15
11
imports = [
···
53
49
"ext4"
54
50
];
55
51
56
56
-
networking = {
57
57
-
# Single network card is `eth0`
58
58
-
usePredictableInterfaceNames = false;
52
52
+
networking.nameservers = [
53
53
+
"2001:4860:4860::8888"
54
54
+
"2001:4860:4860::8844"
55
55
+
];
56
56
+
57
57
+
# Single network card is `eth0`
58
58
+
networking.usePredictableInterfaceNames = false;
59
59
60
60
-
nameservers = [
61
61
-
"2001:4860:4860::8888"
62
62
-
"2001:4860:4860::8844"
60
60
+
systemd.network.networks."40-eth0" = {
61
61
+
matchConfig.Name = "eth0";
62
62
+
address = [
63
63
+
"${globals.hosts.weird-row-server.ip}/${toString globals.hosts.weird-row-server.ip-prefix-length}"
64
64
+
"${globals.hosts.weird-row-server.ip6}/${toString globals.hosts.weird-row-server.ip6-prefix-length}"
65
65
+
"${globals.hosts.weird-row-server.ip6-agnos}/${toString globals.hosts.weird-row-server.ip6-prefix-length}"
63
66
];
64
64
-
65
65
-
interfaces.${ext-if} = {
66
66
-
ipv4.addresses = [
67
67
-
{
68
68
-
address = globals.hosts.weird-row-server.ip;
69
69
-
prefixLength = globals.hosts.weird-row-server.ip-prefix-length;
70
70
-
}
71
71
-
];
72
72
-
ipv6.addresses = [
73
73
-
{
74
74
-
address = globals.hosts.weird-row-server.ip6;
75
75
-
prefixLength = globals.hosts.weird-row-server.ip6-prefix-length;
76
76
-
}
77
77
-
{
78
78
-
address = globals.hosts.weird-row-server.ip6-agnos;
79
79
-
prefixLength = globals.hosts.weird-row-server.ip6-prefix-length;
80
80
-
}
81
81
-
];
82
82
-
};
83
83
-
defaultGateway = {
84
84
-
interface = ext-if;
85
85
-
address = external-gateway;
86
86
-
};
87
87
-
defaultGateway6 = {
88
88
-
interface = ext-if;
89
89
-
address = external-gateway6;
90
90
-
};
67
67
+
routes = [
68
68
+
{
69
69
+
Gateway = "172.31.1.1";
70
70
+
GatewayOnLink = true;
71
71
+
}
72
72
+
{ Gateway = "fe80::1"; }
73
73
+
];
74
74
+
linkConfig.RequiredForOnline = "routable";
75
75
+
};
91
76
92
92
-
};
77
77
+
# wrote a file in /etc/systemd/networking/ that override networking.interfaces
78
78
+
services.cloud-init.network.enable = false;
93
79
94
80
services.qemuGuest.enable = true;
95
81