add snowflake to vultr
This commit is contained in:
parent
e082fb235c
commit
fc40629c73
2 changed files with 45 additions and 4 deletions
|
@ -4,14 +4,15 @@
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./vultr-boot.nix
|
./vultr-boot.nix
|
||||||
../../server-security.nix
|
|
||||||
../../tailscale.nix
|
|
||||||
./tailscale-vultr1.nix
|
./tailscale-vultr1.nix
|
||||||
../cli.nix
|
|
||||||
./nginx.nix
|
|
||||||
./folding.nix
|
./folding.nix
|
||||||
./matrix-front.nix
|
./matrix-front.nix
|
||||||
|
./nginx.nix
|
||||||
./search.nix
|
./search.nix
|
||||||
|
./snowflake.nix
|
||||||
|
../cli.nix
|
||||||
|
../../server-security.nix
|
||||||
|
../../tailscale.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.extraConfig = ''
|
systemd.extraConfig = ''
|
||||||
|
|
40
nixos/boxes/vultr1/snowflake.nix
Normal file
40
nixos/boxes/vultr1/snowflake.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
containers.snowflake = {
|
||||||
|
autoStart = true;
|
||||||
|
ephemeral = true;
|
||||||
|
config = {
|
||||||
|
systemd.services.snowflake = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
IPAccounting = "yes";
|
||||||
|
ExecStart = "${pkgs.snowflake}/bin/proxy";
|
||||||
|
DynamicUser = "yes";
|
||||||
|
# Read-only filesystem
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
PrivateDevices = "yes";
|
||||||
|
ProtectKernelTunables = "yes";
|
||||||
|
ProtectControlGroups = "yes";
|
||||||
|
ProtectHome = "yes";
|
||||||
|
# Deny access to as many things as possible
|
||||||
|
NoNewPrivileges = "yes";
|
||||||
|
PrivateUsers = "yes";
|
||||||
|
LockPersonality = "yes";
|
||||||
|
MemoryDenyWriteExecute = "yes";
|
||||||
|
ProtectClock = "yes";
|
||||||
|
ProtectHostname = "yes";
|
||||||
|
ProtectKernelLogs = "yes";
|
||||||
|
ProtectKernelModules = "yes";
|
||||||
|
RestrictNamespaces = "yes";
|
||||||
|
RestrictRealtime = "yes";
|
||||||
|
RestrictSUIDSGID = "yes";
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
SystemCallFilter = "~@chown @clock @cpu-emulation @debug @module @mount @obsolete @raw-io @reboot @setuid @swap @privileged @resources";
|
||||||
|
CapabilityBoundingSet = "";
|
||||||
|
ProtectProc = "invisible";
|
||||||
|
ProcSubset = "pid";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue