File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed
modules/services/web-apps Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 107107 ExecStart = lib . getExe cfg . package ;
108108
109109 # Hardening
110+ AmbientCapabilities = "" ;
110111 CapabilityBoundingSet = [ "" ] ;
111- DeviceAllow = [ "" ] ;
112+ DevicePolicy = "closed" ;
112113 LockPersonality = true ;
114+ NoNewPrivileges = true ;
113115 PrivateDevices = true ;
114116 PrivateTmp = true ;
115117 PrivateUsers = true ;
123125 ProtectKernelTunables = true ;
124126 ProtectProc = "invisible" ;
125127 ProtectSystem = "strict" ;
126- RestrictAddressFamilies = [
127- "AF_INET"
128- "AF_INET6"
129- "AF_UNIX"
130- ] ;
128+ RemoveIPC = true ;
129+ RestrictAddressFamilies = [ "AF_INET AF_INET6 AF_UNIX AF_NETLINK" ] ;
131130 RestrictNamespaces = true ;
132131 RestrictRealtime = true ;
133132 RestrictSUIDSGID = true ;
134133 SystemCallArchitectures = "native" ;
134+ SystemCallFilter = [
135+ "@system-service"
136+ "~@privileged"
137+ "~@resources"
138+ ] ;
139+ UMask = "0077" ;
135140 } ;
136141 } ;
137142 } ;
Original file line number Diff line number Diff line change 11{ lib , ... } :
2+
23{
34 name = "zipline" ;
45 meta . maintainers = with lib . maintainers ; [ defelo ] ;
2021 networking . hosts . "127.0.0.1" = [ "zipline.local" ] ;
2122 } ;
2223
24+ interactive . nodes . machine = {
25+ services . zipline . settings . CORE_HOSTNAME = lib . mkForce "0.0.0.0" ;
26+ networking . firewall . allowedTCPPorts = [ 8000 ] ;
27+ virtualisation . forwardPorts = [
28+ {
29+ from = "host" ;
30+ host . port = 8000 ;
31+ guest . port = 8000 ;
32+ }
33+ ] ;
34+ } ;
35+
2336 testScript = ''
2437 import json
2538 import re
You can’t perform that action at this time.
0 commit comments