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

92 lines
1.7 KiB
Nix
Raw Normal View History

2024-05-14 19:21:19 +02:00
{
lib,
ssh-keys,
2024-05-14 19:21:19 +02:00
...
}:
2024-03-22 14:24:31 +01:00
{
deployment = {
targetHost = "degette.kat";
tags = [ "kat-vms" ];
};
2024-05-14 19:21:19 +02:00
imports = [ ./hardware-configuration.nix ];
2024-03-22 14:24:31 +01:00
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelParams = [ "console=ttyS0" ];
2024-10-03 17:42:38 +02:00
};
2024-03-22 14:24:31 +01:00
kat = {
fqdn = "degette.katvayor.net";
proxies = {
ip = "192.168.122.2";
open-tcp = [
{
internal = 22;
external = 22000;
}
];
};
2024-10-20 18:52:05 +02:00
};
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"
];
};
services = {
openssh.enable = true;
qemuGuest.enable = true;
2024-11-14 16:13:02 +01:00
getty.autologinUser = "root";
nginx = {
enable = true;
virtualHosts."degette.katvayor.net" = {
enableACME = true;
addSSL = true;
locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://localhost:8000/";
};
};
};
};
users.users.root.openssh.authorizedKeys.keys = with ssh-keys; sylvain ++ gaby;
2024-03-22 14:24:31 +01:00
2024-06-19 16:26:15 +02:00
security.acme = {
acceptTerms = true;
defaults.email = "root@katvayor.net";
};
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
}