Compare commits

...

2 Commits

Author SHA1 Message Date
557aa480ee
hosts: server: make runner persistent 2024-01-21 14:16:39 +01:00
853ee2a917
hosts: server: switch runner to user networking 2024-01-21 14:01:57 +01:00
3 changed files with 24 additions and 63 deletions

View File

@ -24,7 +24,7 @@ in
networking = {
hostName = "${name}";
firewall = {
firewall = {
enable = true;
allowedUDPPorts = [ ];
allowedTCPPorts = [ ];
@ -78,6 +78,7 @@ in
directories = [
"/var/lib/nixos"
"/var/log"
"/var/lib/gitea-runner"
];
files = [

View File

@ -3,42 +3,6 @@ let
name = "gitea-runner";
in
{
systemd.network = {
enable = true;
netdevs."10-microvm".netdevConfig = {
Kind = "bridge";
Name = "microvm";
};
networks = {
"10-microvm" = {
matchConfig.Name = "microvm";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
addresses = [ {
addressConfig.Address = "10.0.0.1/24";
} {
addressConfig.Address = "fd12:3456:789a::1/64";
} ];
ipv6Prefixes = [ {
ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64";
} ];
};
"11-microvm" = {
matchConfig.Name = "vm-*";
networkConfig.Bridge = "microvm";
};
};
};
networking = {
nat = {
enable = true;
enableIPv6 = true;
externalInterface = "ens18";
internalInterfaces = [ "microvm" ];
};
};
microvm = {
autostart = [
@ -117,6 +81,7 @@ in
directories = [
"/var/lib/nixos"
"/var/log"
"/var/lib/gitea-runner"
];
files = [
@ -125,20 +90,16 @@ in
};
microvm = {
hypervisor = "cloud-hypervisor";
hypervisor = "qemu";
vcpu = 4;
mem = 4096;
balloonMem = 4096;
#kernel = pkgs.linuxKernel.packages.linux_latest;
interfaces = [
{
type = "macvtap";
type = "user";
id = "vm-${name}";
mac = "04:00:00:00:00:01";
macvtap = {
link = "ens18";
mode = "bridge";
};
} ];
shares = [{
source = "/nix/store";

View File

@ -1,22 +1,21 @@
age-encryption.org/v1
-> ssh-ed25519 URAPyw voAi15csDCmcVbZP+WErs2/+vL3yVvRZa0SQW7g34B4
WgGNr9IwKDGWq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