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