treewide: Refactor in order to clean up flake.nix

This commit is contained in:
Tristan Daniël Maat 2022-10-13 00:03:32 +01:00
parent 068e6d5d77
commit e8b16459d9
Signed by: tlater
GPG key ID: 49670FD774E43268
7 changed files with 101 additions and 98 deletions

10
lib/default.nix Normal file
View file

@ -0,0 +1,10 @@
{lib}: let
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.strings) concatStringsSep;
in {
makeQemuNetOpts = portMapping:
concatStringsSep ","
(mapAttrsToList
(host: vm: "hostfwd=::${host}-:${vm}")
portMapping);
}