8989 } ;
9090 } ;
9191
92- net = {
93- enable = mkEnableOption "mvirt-net (Network management)" // { default = true ; } ;
92+ ebpf = {
93+ enable = mkEnableOption "mvirt-ebpf (eBPF network management)" // { default = true ; } ;
9494
9595 port = mkOption {
9696 type = types . port ;
9797 default = 50054 ;
98- description = "gRPC port for mvirt-net " ;
98+ description = "gRPC port for mvirt-ebpf " ;
9999 } ;
100100
101101 extraArgs = mkOption {
102102 type = types . listOf types . str ;
103103 default = [ ] ;
104- description = "Extra arguments to pass to mvirt-net " ;
104+ description = "Extra arguments to pass to mvirt-ebpf " ;
105105 } ;
106106 } ;
107107 } ;
122122 "d ${ cfg . dataDir } 0755 root root -"
123123 "d ${ cfg . dataDir } /vmm 0755 root root -"
124124 "d ${ cfg . dataDir } /log 0750 mvirt mvirt -"
125- "d ${ cfg . dataDir } /net 0755 root root -"
125+ "d ${ cfg . dataDir } /ebpf 0755 root root -"
126126 "d /run/mvirt 0755 root root -"
127- "d /run/mvirt/net 0755 root root -"
127+ "d /run/mvirt/ebpf 0755 root root -"
128128 ] ;
129129
130130 # mvirt-log service (starts first, others depend on it)
205205 } ;
206206 } ;
207207
208- # mvirt-net service
209- systemd . services . mvirt-net = mkIf cfg . net . enable {
210- description = "mvirt Network Manager" ;
208+ # mvirt-ebpf service
209+ systemd . services . mvirt-ebpf = mkIf cfg . ebpf . enable {
210+ description = "mvirt eBPF Network Manager" ;
211211 wantedBy = [ "multi-user.target" ] ;
212212 after = [ "network.target" "mvirt-log.service" ] ;
213213 wants = [ "mvirt-log.service" ] ;
@@ -219,12 +219,12 @@ in {
219219
220220 serviceConfig = {
221221 Type = "simple" ;
222- User = "root" ; # Needs root for TUN device
223- ExecStart = "${ mvirtPkgs } /bin/mvirt-net ${ concatStringsSep " " cfg . net . extraArgs } " ;
222+ User = "root" ; # Needs root for eBPF and TUN device
223+ ExecStart = "${ mvirtPkgs } /bin/mvirt-ebpf ${ concatStringsSep " " cfg . ebpf . extraArgs } " ;
224224 Restart = "on-failure" ;
225225 RestartSec = "5s" ;
226226
227- # Hardening (limited due to root requirement for TUN )
227+ # Hardening (limited due to root requirement for eBPF )
228228 NoNewPrivileges = false ;
229229 ProtectSystem = "full" ;
230230 PrivateTmp = true ;
0 commit comments