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

50 lines
1 KiB
Nix

{ pkgs, const, lib, config, util, ... }: let
args = let
storage = "/storage/hot/container";
domain = "local";
host = "192.168.1.3";
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";
};
# TODO: Remove this.
networking.extraHosts = ''
10.1.0.2 paste.local
10.1.0.2 change.local
10.1.0.2 local
'';
imports = [
(import ../../container/Change.nix args)
(import ../../container/Paste.nix args)
(import ../../container/Postgres.nix args)
(import ../../container/Proxy.nix args)
];
}