config-perso/machines/kat-virt/default.nix

76 lines
1.3 KiB
Nix
Raw Normal View History

2024-05-14 19:21:19 +02:00
{
config,
lib,
pkgs,
...
}:
2024-03-22 14:24:31 +01:00
{
2024-05-14 19:21:19 +02:00
imports = [ ./hardware-configuration.nix ];
2024-03-22 14:24:31 +01:00
2024-10-03 17:42:38 +02:00
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
2024-03-22 14:24:31 +01:00
2024-10-20 18:52:05 +02:00
kat.proxies = {
ip = "192.168.122.2";
open-tcp = [
{
internal = 22;
external = 22000;
}
];
};
2024-10-20 15:11:00 +02:00
systemd.network.enable = lib.mkForce false;
2024-03-27 17:35:34 +01:00
networking = {
2024-10-03 17:42:38 +02:00
useNetworkd = lib.mkForce false;
2024-03-27 17:35:34 +01:00
interfaces."enp1s0" = {
useDHCP = false;
ipv4.addresses = [
2024-05-14 19:21:19 +02:00
{
address = "192.168.122.2";
prefixLength = 24;
}
2024-03-27 17:35:34 +01:00
];
ipv6.addresses = [
2024-05-14 19:21:19 +02:00
{
address = "fe80::2";
prefixLength = 64;
}
2024-03-27 17:35:34 +01:00
];
};
defaultGateway = "192.168.122.1";
2024-05-14 19:21:19 +02:00
defaultGateway6 = {
address = "fe80::1";
interface = "enp1s0";
};
2024-03-27 17:35:34 +01:00
nameservers = [
"192.168.122.1"
"fe80::1%enp1s0"
];
};
2024-03-22 14:24:31 +01:00
services.openssh.enable = true;
2024-06-19 16:26:15 +02:00
security.acme = {
acceptTerms = true;
defaults.email = "root@katvayor.net";
};
2024-03-27 17:35:34 +01:00
services.nginx = {
enable = true;
2024-06-19 16:26:15 +02:00
virtualHosts."degette.katvayor.net" = {
enableACME = true;
addSSL = true;
locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://localhost:8000/";
};
2024-03-27 17:35:34 +01:00
};
};
2024-03-22 14:24:31 +01:00
2024-03-27 17:35:34 +01:00
networking.firewall.enable = false;
2024-03-22 14:24:31 +01:00
2024-10-03 17:42:38 +02:00
system.stateVersion = "23.11";
2024-03-22 14:24:31 +01:00
}