testing docker network

This commit is contained in:
Richie Cahill
2024-05-27 16:30:26 -04:00
parent 831b37d5e4
commit f6b16013e0
2 changed files with 15 additions and 20 deletions

View File

@ -1,3 +1,4 @@
{ pkgs, config, ... }:
{
imports = [
./filebrowser.nix
@ -6,4 +7,13 @@
];
virtualisation.oci-containers.backend = "docker";
system.activationScripts.mkVPN =
let
docker = config.virtualisation.oci-containers.backend;
dockerBin = "${pkgs.${docker}}/bin/${docker}";
in
''
${dockerBin} network inspect web >/dev/null 2>&1 || ${dockerBin} network create web --subnet 172.20.0.0/16
'';
}