2023-09-22 12:20:11 +00:00
|
|
|
{pkgs, config, lib, ...} : {
|
|
|
|
|
2023-09-22 18:00:35 +00:00
|
|
|
imports = [
|
|
|
|
./admins.nix
|
|
|
|
./nix_keys.nix
|
2023-09-28 15:12:34 +00:00
|
|
|
../modules/impermanence.nix
|
2023-09-22 18:00:35 +00:00
|
|
|
];
|
2023-09-22 12:20:11 +00:00
|
|
|
nix = {
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
builders-use-substitutes = true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
firewall = { # these shoud be default, but better make sure!
|
|
|
|
enable = true;
|
|
|
|
allowPing = true;
|
|
|
|
};
|
|
|
|
nftables.enable = true;
|
|
|
|
useDHCP = false; # We don't speak DHCP and even if we would, we should enable it per interface
|
|
|
|
# hosts = # TODO write something to autogenerate ip adresses!
|
|
|
|
};
|
|
|
|
|
|
|
|
users = {
|
|
|
|
mutableUsers = false;
|
2023-09-28 23:13:30 +00:00
|
|
|
users.root.hashedPassword = "!";
|
2023-09-22 12:20:11 +00:00
|
|
|
};
|
2023-09-25 19:03:23 +00:00
|
|
|
|
2023-09-28 15:12:34 +00:00
|
|
|
impermanence.enable = true;
|
|
|
|
|
2023-09-25 19:03:23 +00:00
|
|
|
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
2023-09-22 12:20:11 +00:00
|
|
|
|
|
|
|
environment = {
|
|
|
|
systemPackages = builtins.attrValues {
|
|
|
|
inherit (pkgs)
|
|
|
|
htop lsof tmux btop;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
journald.extraConfig = "SystemMaxUse=5G";
|
|
|
|
|
|
|
|
nginx = {
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
openssh = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
PermitRootLogin = "no";
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-09-25 19:03:23 +00:00
|
|
|
}
|