nextcloud: init

This commit is contained in:
root@dishwasher 2022-06-26 21:17:20 +02:00
parent 56ab27d661
commit 35e93ce43b
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C
8 changed files with 266 additions and 0 deletions

View file

@ -61,6 +61,7 @@
# List services that you want to enable:
# Enable the OpenSSH daemon.
programs.mosh.enable = true;
services.openssh = {
enable = true;
permitRootLogin = "prohibit-password";

View file

@ -4,5 +4,6 @@
./hardware-configuration.nix
./secrets.nix
./oxalab.nix
./mcvm-network.nix
];
}

View file

@ -31,6 +31,12 @@
options = [ "subvol=var-log" "compress=zstd" "noatime" ];
};
fileSystems."/var/microvms" =
{ device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1";
fsType = "btrfs";
options = [ "subvol=microvms" "compress=zstd" "noatime" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1";
fsType = "btrfs";

View file

@ -0,0 +1,51 @@
{ config, pkgs, ... }: {
systemd.network = {
netdevs."microvm-bridge".netdevConfig = {
Kind = "bridge";
Name = "microvm-bridge";
};
networks."0-microvm-bridge" = {
matchConfig.Name = "microvm-bridge";
networkConfig = {
DHCPServer = false;
IPv6SendRA = true;
};
addresses = [ {
addressConfig.Address = "10.99.99.1/24";
} {
addressConfig.Address = "fd12:3456:789a::1/64";
} ];
ipv6Prefixes = [ {
ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64";
} ];
# networkConfig = {
# Address = "10.99.99.1/24";
# IPForward = "ipv4";
# };
# routes = [{
# routeConfig = {
# GatewayOnLink = true;
# };}];
# IPForward = "ipv4";
# DHCPServer = true;
# IPv6SendRA = true;
# addresses = [{
# addressConfig.Address = "10.99.99.1/24";
# }];
};
networks."1-microvm-bridge" = {
matchConfig.Name = "vm-*";
networkConfig.Bridge = "microvm-bridge";
};
};
networking.nat = {
enable = true;
enableIPv6 = true;
externalInterface = "enp1s0";
internalInterfaces = [ "microvm-bridge" ];
};
}