parsons: init lxc

This commit is contained in:
hexchen 2021-08-11 20:31:25 +00:00
parent 69e49a0020
commit 275d3a16f0
2 changed files with 38 additions and 0 deletions

View file

@ -18,6 +18,8 @@
../../services/syncthing.nix ../../services/syncthing.nix
../../services/gitlab.nix ../../services/gitlab.nix
../../services/nginx-pages.nix ../../services/nginx-pages.nix
./lxc.nix
]; ];
hexchen.encboot = { hexchen.encboot = {

36
hosts/parsons/lxc.nix Normal file
View file

@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
{
networking.bridges.lxcbr0.interfaces = [];
networking.interfaces.lxcbr0.ipv4.addresses = [
{
address = "10.1.2.1";
prefixLength = 24;
}
];
networking.nat.internalInterfaces = [ "lxcbr0" ];
virtualisation.lxc.enable = true;
virtualisation.lxc.systemConfig = ''
lxc.bdev.zfs.root = zroot/safe/containers/lxc
lxc.lxcpath = /persist/lxc
'';
users.users.root.subUidRanges = [{ count = 65536; startUid = 100000; }];
users.users.root.subGidRanges = [{ count = 65536; startGid = 100000; }];
environment.etc."lxc/share".source = "${pkgs.lxc}/share/lxc";
services.nginx.virtualHosts."onlyoffice.infra4future.de" = {
locations."/".proxyPass = "http://10.1.2.233:80";
enableACME = true;
forceSSL = true;
};
services.nginx.virtualHosts."auth.infra4future.de" = {
locations."/".proxyPass = "http://10.1.2.104:8080";
enableACME = true;
forceSSL = true;
};
}