diff --git a/module.nix b/module.nix index f94ee5e..a1a1f5a 100644 --- a/module.nix +++ b/module.nix @@ -90,6 +90,17 @@ in ExecStartPre = "${strojnadzor}/bin/strojnadzor-admin migrate"; ExecStart = "${strojnadzor}/bin/strojnadzor-admin runserver-gunicorn"; StateDirectory = "strojnadzor"; + LockPersonality = true; + NoNewPrivileges = true; + PrivateDevices = true; + RestrictNamespaces = true; + PrivateTmp = true; + ProtectControlGroups = true; + ProtectHome = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + ProtectSystem = "strict"; + RestrictSUIDSGID = true; }; environment.STROJNADZOR_DATA_DIR = "${cfg.stateDir}"; };