nix/host/work/Container.nix
2024-06-09 16:11:25 +03:00

46 lines
916 B
Nix

{ pkgs, const, lib, config, util, ... }: let
args = let
storage = "/tmp/container";
domain = "local";
host = "192.168.0.174";
in {
inherit storage domain host pkgs const lib config util;
mkContainer = cfg: lib.recursiveUpdate cfg {
hostAddress = host;
};
mkContainerConfig = cfg: lib.recursiveUpdate cfg {
system.stateVersion = const.stateVersion;
users.users.root.password = "";
users.mutableUsers = false;
networking = {
useHostResolvConf = lib.mkForce false;
firewall.enable = false;
};
};
mkServer = cfg: lib.recursiveUpdate cfg {
forceSSL = false;
};
};
in {
networking.nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = "enp4s0";
};
# NOTE: Remove this.
networking.extraHosts = ''
10.1.0.2 paste.local
'';
imports = [
(import ../../container/Paste.nix args)
(import ../../container/Proxy.nix args)
];
}