nix-conf/systems/hetzner/default.nix

138 lines
2.7 KiB
Nix
Raw Normal View History

2024-07-10 23:02:54 +02:00
{
config,
pkgs,
lib,
self,
...
}:
2024-01-18 20:12:43 +01:00
{
2024-02-07 23:19:26 +01:00
imports = [
self.inputs.srvos.nixosModules.server
self.inputs.srvos.nixosModules.hardware-hetzner-online-amd
self.inputs.srvos.nixosModules.mixins-nginx
2024-04-20 10:11:36 +02:00
self.inputs.snm.nixosModules.mailserver
./mail.nix
2024-04-23 19:09:38 +02:00
./matrix.nix
2024-05-01 19:33:12 +02:00
./nginx.nix
2024-05-03 08:59:02 +02:00
./radicale.nix
2024-02-07 23:19:26 +01:00
];
2024-09-27 10:35:07 +02:00
facter.reportPath = ./facter.json;
2024-01-18 20:12:43 +01:00
jopejoe1 = {
local.enable = true;
nix.enable = true;
2024-05-01 17:20:48 +02:00
zerotierone.enable = true;
2024-10-12 17:30:09 +02:00
asf.enable = true;
2024-01-18 20:12:43 +01:00
user = {
jopejoe1.enable = true;
root.enable = true;
2024-07-17 20:16:23 +02:00
builder.enable = true;
2024-01-18 20:12:43 +01:00
};
ssh.enable = true;
};
boot.loader = {
grub = {
enable = true;
};
};
2024-04-20 21:07:32 +02:00
networking.firewall = {
enable = true;
2024-10-09 10:38:39 +02:00
allowedTCPPorts = [ 21 80 ];
allowedUDPPorts = [ 21 80 ];
2024-04-20 21:07:32 +02:00
};
2024-04-20 16:52:29 +02:00
systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f8:a0:31e5::/64";
2024-01-18 20:12:43 +01:00
time.timeZone = "Europe/Berlin";
services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
2024-02-07 23:19:26 +01:00
services.openssh.ports = [ 22 ];
2024-01-24 20:50:43 +01:00
2024-04-20 10:11:36 +02:00
security.acme.acceptTerms = true;
security.acme.defaults.email = "security@missing.ninja";
2024-04-20 20:55:55 +02:00
services.vsftpd = {
enable = true;
writeEnable = true;
userlistEnable = true;
userlist = [ "backupftp" ];
localUsers = true;
chrootlocalUser = true;
};
users.users.backupftp = {
isNormalUser = true;
initialPassword = "backupPassword";
};
2024-01-18 20:12:43 +01:00
disko.devices = {
disk = {
2024-02-08 11:49:20 +01:00
vdb = {
2024-01-19 00:22:27 +01:00
type = "disk";
2024-02-07 23:19:26 +01:00
device = "/dev/nvme0n1";
2024-01-18 20:12:43 +01:00
content = {
2024-02-07 23:19:26 +01:00
type = "gpt";
partitions = {
boot = {
2024-02-08 11:49:20 +01:00
size = "1M";
type = "EF02"; # for grub MBR
2024-02-07 23:19:26 +01:00
};
2024-02-08 11:49:20 +01:00
mdadm = {
2024-02-07 23:19:26 +01:00
size = "100%";
2024-01-18 20:12:43 +01:00
content = {
2024-02-08 11:49:20 +01:00
type = "mdraid";
name = "raid0";
2024-01-18 20:12:43 +01:00
};
2024-02-07 23:19:26 +01:00
};
};
};
};
2024-02-08 11:49:20 +01:00
vdc = {
2024-02-07 23:19:26 +01:00
type = "disk";
device = "/dev/nvme1n1";
content = {
type = "gpt";
partitions = {
boot = {
2024-02-08 11:49:20 +01:00
size = "1M";
type = "EF02"; # for grub MBR
2024-02-07 23:19:26 +01:00
};
2024-02-08 11:49:20 +01:00
mdadm = {
2024-02-07 23:19:26 +01:00
size = "100%";
content = {
2024-02-08 11:49:20 +01:00
type = "mdraid";
name = "raid0";
2024-02-07 23:19:26 +01:00
};
};
};
};
};
};
mdadm = {
2024-02-08 11:49:20 +01:00
raid0 = {
2024-02-07 23:19:26 +01:00
type = "mdadm";
2024-02-08 11:49:20 +01:00
level = 0;
2024-02-07 23:19:26 +01:00
content = {
2024-02-08 11:49:20 +01:00
type = "gpt";
partitions = {
primary = {
size = "100%";
content = {
2024-04-20 09:56:54 +02:00
type = "filesystem";
format = "ext4";
mountpoint = "/";
2024-02-08 11:49:20 +01:00
};
2024-02-07 23:19:26 +01:00
};
};
2024-01-18 20:12:43 +01:00
};
};
};
};
}