stream: skyflakify
This commit is contained in:
parent
d95e924778
commit
65a91dc324
|
@ -797,7 +797,7 @@
|
||||||
|
|
||||||
stream = nixosSystem' {
|
stream = nixosSystem' {
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.microvm
|
self.nixosModules.cluster-options
|
||||||
./hosts/stream
|
./hosts/stream
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,36 +1,16 @@
|
||||||
{ zentralwerk, config, pkgs, ... }:
|
{ zentralwerk, config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
authFile = pkgs.writeText "htpasswd" "k-ot:sawCOTsl/fIUY";
|
authFile = pkgs.writeText "htpasswd" "k-ot:sawCOTsl/fIUY";
|
||||||
mac = {
|
|
||||||
pub = "DE:91:C7:51:D1:C5";
|
|
||||||
serv = "C6:40:E0:21:9B:A4";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.hostName = "stream";
|
networking.hostName = "stream";
|
||||||
c3d2.hq.statistics.enable = true;
|
c3d2.hq.statistics.enable = true;
|
||||||
c3d2.deployment = {
|
deployment = {
|
||||||
server = "server9";
|
persistedShares = [ "/etc" "/home" "/var" ];
|
||||||
autoNetSetup = false;
|
storage = "big";
|
||||||
mounts = [];
|
mem = 2048;
|
||||||
|
networks = lib.mkForce [ "pub" "serv" ];
|
||||||
};
|
};
|
||||||
microvm.mem = 2048;
|
|
||||||
microvm.interfaces = [ {
|
|
||||||
type = "tap";
|
|
||||||
id = "pub-stream";
|
|
||||||
mac = mac.pub;
|
|
||||||
} {
|
|
||||||
type = "tap";
|
|
||||||
id = "serv-stream";
|
|
||||||
mac = mac.serv;
|
|
||||||
} ];
|
|
||||||
microvm.shares = map (name: {
|
|
||||||
source = "/tank/storage/stream/${name}";
|
|
||||||
mountPoint = "/${name}";
|
|
||||||
tag = name;
|
|
||||||
proto = "virtiofs";
|
|
||||||
socket = "${name}.socket";
|
|
||||||
}) [ "etc" "home" "var" ];
|
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -39,19 +19,14 @@ in
|
||||||
# rest of the network so that I am reachable by
|
# rest of the network so that I am reachable by
|
||||||
# public-access-proxy.
|
# public-access-proxy.
|
||||||
|
|
||||||
links."00-serv" = {
|
networks."30-serv" = {
|
||||||
matchConfig.MACAddress = mac.serv;
|
|
||||||
linkConfig.Name = "serv";
|
|
||||||
};
|
|
||||||
|
|
||||||
networks."00-serv" = {
|
|
||||||
matchConfig.MACAddress = mac.serv;
|
|
||||||
networkConfig.IPv6AcceptRA = false;
|
networkConfig.IPv6AcceptRA = false;
|
||||||
# try harder disabling global ipv6
|
# try harder disabling global ipv6
|
||||||
networkConfig.LinkLocalAddressing = "no";
|
networkConfig.LinkLocalAddressing = "no";
|
||||||
addresses = [ {
|
addresses = [ {
|
||||||
addressConfig.Address = "${config.c3d2.hosts.stream.ip4}/${toString zentralwerk.lib.config.site.net.serv.subnet4Len}";
|
addressConfig.Address = "${config.c3d2.hosts.stream.ip4}/${toString zentralwerk.lib.config.site.net.serv.subnet4Len}";
|
||||||
} ];
|
} ];
|
||||||
|
gateway = lib.mkForce [];
|
||||||
routes = [ {
|
routes = [ {
|
||||||
routeConfig = {
|
routeConfig = {
|
||||||
Destination = "172.20.0.0/14";
|
Destination = "172.20.0.0/14";
|
||||||
|
@ -61,14 +36,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# On the pub network I am a normal client.
|
# On the pub network I am a normal client.
|
||||||
|
networks."30-pub" = {
|
||||||
links."00-pub" = {
|
|
||||||
matchConfig.MACAddress = mac.pub;
|
|
||||||
linkConfig.Name = "pub";
|
|
||||||
};
|
|
||||||
|
|
||||||
networks."01-pub" = {
|
|
||||||
matchConfig.MACAddress = mac.pub;
|
|
||||||
networkConfig.DHCP = "ipv4";
|
networkConfig.DHCP = "ipv4";
|
||||||
networkConfig.IPv6AcceptRA = true;
|
networkConfig.IPv6AcceptRA = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue