2024-03-30 20:18:12 +01:00
|
|
|
{ pkgs, modulesPath, ... }:
|
2021-12-05 23:29:51 +01:00
|
|
|
{
|
|
|
|
imports =
|
2021-12-11 11:45:18 +01:00
|
|
|
[
|
|
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
2021-12-21 00:00:21 +01:00
|
|
|
./hardware.nix
|
|
|
|
./home-julien.nix
|
2022-01-01 20:46:20 +01:00
|
|
|
../../users/julien.nix
|
|
|
|
../../users/default.nix
|
2021-12-05 23:29:51 +01:00
|
|
|
];
|
|
|
|
|
2021-12-28 16:42:30 +01:00
|
|
|
|
2021-12-25 16:37:08 +01:00
|
|
|
luj = {
|
2022-05-25 07:58:15 +02:00
|
|
|
irc = {
|
|
|
|
enable = true;
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
subdomain = "irc";
|
|
|
|
};
|
|
|
|
};
|
2022-02-05 19:00:46 +01:00
|
|
|
mediaserver = {
|
|
|
|
enable = true;
|
|
|
|
tv.enable = true;
|
|
|
|
music.enable = true;
|
|
|
|
};
|
2021-12-25 16:37:08 +01:00
|
|
|
homepage.enable = true;
|
2022-01-23 19:11:10 +01:00
|
|
|
docs = {
|
|
|
|
enable = true;
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
subdomain = "docs";
|
|
|
|
};
|
|
|
|
};
|
2022-02-26 19:07:28 +01:00
|
|
|
homer.enable = true;
|
2022-01-23 19:11:10 +01:00
|
|
|
mailserver.enable = true;
|
2022-01-11 10:05:05 +01:00
|
|
|
|
2021-12-25 15:56:30 +01:00
|
|
|
};
|
2021-12-25 16:37:08 +01:00
|
|
|
|
2022-05-10 06:56:35 +02:00
|
|
|
|
|
|
|
# make the tailscale command usable to users
|
2024-03-30 12:58:02 +01:00
|
|
|
environment.systemPackages = [ pkgs.tailscale ];
|
2022-05-10 06:56:35 +02:00
|
|
|
|
|
|
|
# enable the tailscale service
|
2022-04-21 19:33:23 +02:00
|
|
|
services.tailscale.enable = true;
|
|
|
|
|
2021-12-29 11:34:55 +01:00
|
|
|
services.fail2ban.enable = true;
|
|
|
|
|
2021-12-26 15:52:13 +01:00
|
|
|
networking.hostName = "lisa";
|
2023-01-09 19:43:41 +01:00
|
|
|
networking.useDHCP = false;
|
2021-12-31 12:36:16 +01:00
|
|
|
networking.interfaces.ens20.useDHCP = false;
|
2022-11-03 01:10:03 +01:00
|
|
|
networking.interfaces.ens20.mtu = 1420;
|
2022-01-11 10:05:05 +01:00
|
|
|
networking.interfaces.ens20.ipv4.addresses = [{ address = "212.129.40.11"; prefixLength = 32; }];
|
2021-12-05 23:29:51 +01:00
|
|
|
networking.interfaces.ens18.useDHCP = true;
|
2023-01-09 19:43:41 +01:00
|
|
|
networking.defaultGateway.interface = "ens20";
|
|
|
|
networking.defaultGateway.address = "212.129.40.11";
|
2021-12-05 23:29:51 +01:00
|
|
|
networking.interfaces.ens19.useDHCP = false;
|
2021-12-11 11:45:18 +01:00
|
|
|
networking.interfaces.ens19.ipv6.addresses = [{
|
2021-12-05 23:29:51 +01:00
|
|
|
address = "2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb";
|
|
|
|
prefixLength = 120;
|
2021-12-11 11:45:18 +01:00
|
|
|
}];
|
2022-01-12 23:40:17 +01:00
|
|
|
|
|
|
|
networking.hostId = "fbb334ae";
|
|
|
|
services.zfs.autoSnapshot.enable = true;
|
|
|
|
services.zfs.autoScrub.enable = true;
|
|
|
|
|
2022-05-25 07:34:01 +02:00
|
|
|
networking.wireguard.interfaces = {
|
|
|
|
wg0 = {
|
|
|
|
ips = [ "fd85:27e8:fc9::6/128" ];
|
|
|
|
listenPort = 51820;
|
|
|
|
privateKeyFile = "/root/wg-private";
|
|
|
|
|
|
|
|
peers = [
|
|
|
|
{
|
|
|
|
allowedIPs = [ "fd85:27e8:fc9::/48" ];
|
|
|
|
publicKey = "ZO8j0AwssAERtyJQO+o11pWAFKzkxTI5hmqHsfEy5Bo=";
|
|
|
|
endpoint = "core01.rz.ens.wtf:51820";
|
|
|
|
persistentKeepalive = 25;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2022-02-19 22:05:24 +01:00
|
|
|
|
2022-06-03 21:59:41 +02:00
|
|
|
services.openssh.extraConfig = ''
|
2022-07-29 09:30:49 +02:00
|
|
|
HostCertificate /etc/ssh/ssh_host_ed25519_key-cert.pub
|
|
|
|
HostKey /etc/ssh/ssh_host_ed25519_key
|
|
|
|
TrustedUserCAKeys /etc/ssh/ssh_user_key.pub
|
|
|
|
MaxAuthTries 20
|
2022-06-03 21:59:41 +02:00
|
|
|
'';
|
|
|
|
|
2022-02-19 22:05:24 +01:00
|
|
|
|
2022-05-25 07:34:01 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [ 51821 ];
|
|
|
|
networking.firewall.allowedUDPPorts = [ 51821 ];
|
2022-02-19 22:05:24 +01:00
|
|
|
|
2022-05-25 07:34:01 +02:00
|
|
|
system.stateVersion = "21.11";
|
|
|
|
|
|
|
|
|
2021-12-05 23:29:51 +01:00
|
|
|
}
|