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

92 lines
1.7 KiB
Nix
Raw Normal View History

{
lib,
ssh-keys,
...
}:
{
deployment = {
targetHost = "degette.kat";
tags = [ "kat-vms" ];
};
imports = [ ./hardware-configuration.nix ];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelParams = [ "console=ttyS0" ];
};
kat = {
fqdn = "degette.katvayor.net";
proxies = {
ip = "192.168.122.2";
open-tcp = [
{
internal = 22;
external = 22000;
}
];
};
};
systemd.network.enable = lib.mkForce false;
networking = {
useNetworkd = lib.mkForce false;
interfaces."enp1s0" = {
useDHCP = false;
ipv4.addresses = [
{
address = "192.168.122.2";
prefixLength = 24;
}
];
ipv6.addresses = [
{
address = "fe80::2";
prefixLength = 64;
}
];
};
defaultGateway = "192.168.122.1";
defaultGateway6 = {
address = "fe80::1";
interface = "enp1s0";
};
nameservers = [
"192.168.122.1"
"fe80::1%enp1s0"
];
};
services = {
openssh.enable = true;
qemuGuest.enable = true;
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;
security.acme = {
acceptTerms = true;
defaults.email = "root@katvayor.net";
};
networking.firewall.enable = false;
system.stateVersion = "23.11";
}