From cf2b4a8485d6d1bd3871da67111da0740cc8487c Mon Sep 17 00:00:00 2001 From: sefidel Date: Sat, 8 Jan 2022 22:02:38 +0900 Subject: nixos: add security module --- nixos/configurations/alpha.nix | 22 +--------------------- nixos/configurations/hardware/alpha.nix | 6 ------ 2 files changed, 1 insertion(+), 27 deletions(-) (limited to 'nixos/configurations') diff --git a/nixos/configurations/alpha.nix b/nixos/configurations/alpha.nix index 252c358..c472317 100644 --- a/nixos/configurations/alpha.nix +++ b/nixos/configurations/alpha.nix @@ -4,7 +4,6 @@ imports = [ ]; security = { - acme.acceptTerms = true; protectKernelImage = true; rtkit.enable = true; sudo.wheelNeedsPassword = false; @@ -15,26 +14,7 @@ "nmi_watchdog=0" "systemd.watchdog-device/dev/watchdog" ]; - boot.kernel.sysctl = { - "net.ipv4.conf.default.log_martians" = 1; - "net.ipv4.conf.all.log_martians" = 1; - "net.ipv4.tcp_mtu_probing" = 1; - "net.ipv4.tcp_syncookies" = 1; - "net.ipv4.tcp_congestion_control" = "bbr2"; - "net.ipv4.conf.default.rp_filter" = 1; - "net.ipv4.conf.all.rp_filter" = 1; - "net.ipv4.conf.all.accept_source_route" = 0; - "net.ipv4.conf.all.send_redirects" = 0; - "net.ipv4.conf.default.send_redirects" = 0; - "net.ipv4.conf.all.accept_redirects" = 0; - "net.ipv4.conf.default.accept_redirects" = 0; - "net.ipv4.conf.all.secure_redirects" = 0; - "net.ipv4.conf.default.secure_redirects" = 0; - "net.ipv6.conf.all.accept_source_route" = 0; - "net.ipv6.conf.all.accept_redirects" = 0; - "net.ipv6.conf.default.accept_redirects" = 0; - "net.ipv4.tcp_rfc1337" = 1; - }; + # GRUB bootloader boot.loader.efi.canTouchEfiVariables = true; boot.loader.grub = { diff --git a/nixos/configurations/hardware/alpha.nix b/nixos/configurations/hardware/alpha.nix index 482676e..3e99ea9 100644 --- a/nixos/configurations/hardware/alpha.nix +++ b/nixos/configurations/hardware/alpha.nix @@ -42,12 +42,6 @@ in fsType = "ext4"; }; - fileSystems."/tmp" = { - fsType = "tmpfs"; - device = "tmpfs"; - options = [ "nosuid" "nodev" "relatime" "size=14G" ]; - }; - swapDevices = [{ device = swapDev; }]; nix.maxJobs = lib.mkDefault 4; -- cgit 1.4.1