feat: add hardened module
This commit is contained in:
parent
d4037ce717
commit
3a95098280
|
@ -14,7 +14,6 @@
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
boot.supportedFilesystems = [ "ntfs" ];
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.systemd-boot.editor = false;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
services.smartd.enable = true;
|
services.smartd.enable = true;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./hardened.nix
|
||||||
./i18n.nix
|
./i18n.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./vpn.nix
|
./vpn.nix
|
||||||
|
|
24
system/hardened.nix
Normal file
24
system/hardened.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# utilises some of the measures from
|
||||||
|
# <nixpkgs/nixos/modules/profiles/hardened.nix>
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
boot.loader.systemd-boot.editor = mkDefault false;
|
||||||
|
|
||||||
|
nix.allowedUsers = mkDefault [ "@users" ];
|
||||||
|
|
||||||
|
# causes Firefox & Tor Browser segfaults
|
||||||
|
# environment.memoryAllocator.provider = mkDefault "scudo";
|
||||||
|
# environment.variables.SCUDO_OPTIONS = mkDefault "ZeroContents=1";
|
||||||
|
|
||||||
|
# mullvad-daemon is blocked by one of these measures
|
||||||
|
|
||||||
|
# security.hideProcessInformation = mkDefault true;
|
||||||
|
|
||||||
|
# security.lockKernelModules = mkDefault true;
|
||||||
|
|
||||||
|
# security.protectKernelImage = mkDefault true;
|
||||||
|
|
||||||
|
security.apparmor.enable = mkDefault true;
|
||||||
|
}
|
Loading…
Reference in a new issue