added actual hardware identifiers & atual network config

This commit is contained in:
Dennis Frieberg 2023-09-22 14:20:11 +02:00
parent f9672df9cd
commit 2b0eec7dbf
Signed by: nerf
GPG key ID: 1EC6F5573876CC80
7 changed files with 107 additions and 3 deletions

49
nixos/roles/default.nix Normal file
View file

@ -0,0 +1,49 @@
{pkgs, config, lib, ...} : {
imports = [ ./admins.nix ];
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;
};
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;
};
};
};
}