Skip to content

Commit

Permalink
update: dfw0
Browse files Browse the repository at this point in the history
  • Loading branch information
jz8132543 committed Jun 14, 2024
1 parent 4242959 commit 22fdcf2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
14 changes: 14 additions & 0 deletions nixos/hosts/dfw0/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,18 @@
boot.kernelModules = ["kvm-intel"];
# utils.disk = "/dev/vdb";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
networking = {
# useDHCP = false;
# useNetworkd = true;
interfaces.ens17 = {
useDHCP = false;
ipv4.addresses = [
{
address = "154.40.40.139";
prefixLength = 25;
}
];
};
defaultGateway = "154.40.40.254";
};
}
5 changes: 4 additions & 1 deletion nixos/modules/base/environment/isNAT/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ with lib; {
firewall.allowedUDPPorts = with config.environment; [altHTTPS];
}
else {};
services.traefik.staticConfigOptions.entryPoints.https.address = lib.mkForce ":${toString config.environment.altHTTPS}";
services.traefik.staticConfigOptions.entryPoints.https =
if config.environment.isNAT
then {address = lib.mkForce ":${toString config.environment.altHTTPS}";}
else {};
};
}
3 changes: 1 addition & 2 deletions nixos/modules/services/traefik.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
config.services.traefik = {
enable = true;
staticConfigOptions = {
experimental.http3 = true;
entryPoints = {
http = {
address = ":80";
Expand All @@ -29,7 +28,7 @@
http.tls =
if config.environment.isNAT
then true
else {certResolver = "zerossl";};
else {certresolver = "zerossl";};
http3 = {};
};
};
Expand Down

0 comments on commit 22fdcf2

Please sign in to comment.