#boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
#environment.memoryAllocator.provider = "libc";
nix.settings.allowed-users = [ "@users" ];
+ /*
+ nix.settings.substituters = [
+ "https://nix-community.cachix.org"
+ ];
+ nix.settings.trusted-public-keys = [
+ "nix-community.cachix.org:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
+ ];
+ */
+ nix.settings.trusted-users = [
+ "root"
+ "@wheel"
+ ];
networking.firewall.pingLimit = "--limit 60/minute --limit-burst 5";
security.allowSimultaneousMultithreading = false;
- security.apparmor.enable = lib.mkDefault true;
+ security.apparmor.enable = mkDefault true;
security.forcePageTableIsolation = true;
- security.lockKernelModules = lib.mkDefault true;
+ security.lockKernelModules = mkDefault true;
security.protectKernelImage = true;
security.virtualisation.flushL1DataCache = "always";
# Only allow members of the wheel group to execute sudo by setting
"net.ipv4.tcp_fack" = 0;
*/
# Generate a random IPv6 address
- "net.ipv6.conf.all.use_tempaddr" = lib.mkForce 2;
- "net.ipv6.conf.default.use_tempaddr" = lib.mkForce 2;
+ "net.ipv6.conf.all.use_tempaddr" = mkForce 2;
+ "net.ipv6.conf.default.use_tempaddr" = mkForce 2;
# Restricts usage of ptrace to only processes
# with the CAP_SYS_PTRACE capability
"kernel.yama.ptrace_scope" = 2;
SystemMaxUse=100M
'';
systemd.coredump = {
- enable = lib.mkDefault false;
+ enable = mkDefault false;
extraConfig = ''
Compress=true
MaxUse=1024M
'';
};
services.openssh = {
- openFirewall = lib.mkDefault false;
# Avoid TOFU MITM by providing well known public keys here.
knownHosts = {
"git.sr.ht".hostNames = [ "git.sr.ht" ];
};
openFirewall = mkDefault false;
settings = {
- KbdInteractiveAuthentication = lib.mkDefault false;
+ KbdInteractiveAuthentication = mkDefault false;
# Use key exchange algorithms recommended by `nixpkgs#ssh-audit`
KexAlgorithms = [
"curve25519-sha256"
PasswordAuthentication = false;
# Remove any remote gpg-agent's socket.
StreamLocalBindUnlink = true;
- UseDns = lib.mkDefault false;
- X11Forwarding = lib.mkDefault false;
+ UseDns = mkDefault false;
+ X11Forwarding = mkDefault false;
};
};
}