nextcloud: init
This commit is contained in:
parent
56ab27d661
commit
35e93ce43b
8 changed files with 266 additions and 0 deletions
|
@ -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";
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
./hardware-configuration.nix
|
||||
./secrets.nix
|
||||
./oxalab.nix
|
||||
./mcvm-network.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
51
hosts/dishwasher/mcvm-network.nix
Normal file
51
hosts/dishwasher/mcvm-network.nix
Normal 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" ];
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue