Skip to content

Commit 26c0263

Browse files
committed
nixos-modules/host: move host.tapScript default to option
1 parent 0e954df commit 26c0263

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

nixos-modules/host/default.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,6 @@ in
367367
wants = map (name: "microvm@${name}.service") config.microvm.autostart;
368368
};
369369

370-
microvm.host.tapScript = lib.mkDefault ''
371-
${pkgs.iproute2}/bin/ip link set $id up
372-
'';
373-
374370
# This helper creates tap interfaces and attaches them to a bridge
375371
# for qemu regardless if it is run as root or not.
376372
security.wrappers.qemu-bridge-helper = lib.mkIf (!config.virtualisation.libvirtd.enable) {

nixos-modules/host/options.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
''${pkgs.iproute2}/bin/ip link set "$id" master br0 up
3838
'';
3939
type = types.lines;
40+
default = ''
41+
${pkgs.iproute2}/bin/ip link set "$id" up
42+
'';
4043
};
4144

4245
vms = mkOption {

0 commit comments

Comments
 (0)