bind: microvmify

This commit is contained in:
Astro 2022-06-18 02:43:11 +02:00
parent f45e3371a4
commit 1f6f4950e4
2 changed files with 6 additions and 8 deletions

View File

@ -598,7 +598,7 @@
bind = nixosSystem' {
modules = [
{ nixpkgs.overlays = with secrets.overlays; [ bind ]; }
./config/lxc-container.nix
self.nixosModules.microvm
./hosts/containers/bind
];
};

View File

@ -9,15 +9,13 @@ in
c3d2 = {
isInHq = false;
hq.statistics.enable = true;
deployment = {
server = "server10";
mounts = [ "etc" "home" "var"];
};
};
networking.hostName = "bind";
networking.useNetworkd = true;
networking.interfaces.eth0.ipv4.addresses = [{
address = config.c3d2.hosts."${config.networking.hostName}".ip4;
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
}];
networking.defaultGateway = "172.20.73.1";
networking.firewall.allowedTCPPorts = [
# DNS
@ -82,7 +80,7 @@ in
wantedBy = [ "multi-user.target" ];
before = [ "bind.service" ];
after = [ "network-online.target" ];
path = with pkgs; [ git nix curl ];
path = with pkgs; [ git nix curl openssh ];
script = ''
mkdir -p .ssh
cp ${builtins.toFile "id_ed25519" sshPrivkey} .ssh/id_ed25519