39 lines
827 B
Nix
39 lines
827 B
Nix
{
|
|
lib,
|
|
nixpkgs,
|
|
nixpkgs-unstable,
|
|
sops-nix,
|
|
tlaternet-webserver,
|
|
}: let
|
|
inherit (lib.attrsets) mapAttrsToList;
|
|
inherit (lib.strings) concatStringsSep;
|
|
in {
|
|
makeQemuNetOpts = portMapping:
|
|
concatStringsSep ","
|
|
(mapAttrsToList
|
|
(host: vm: "hostfwd=::${host}-:${vm}")
|
|
portMapping);
|
|
|
|
makeNixosSystem = {
|
|
system,
|
|
extraModules,
|
|
}:
|
|
nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules =
|
|
[
|
|
sops-nix.nixosModules.sops
|
|
tlaternet-webserver.nixosModules.default
|
|
(import ../configuration)
|
|
{
|
|
nixpkgs.overlays = [
|
|
(self: super: {
|
|
matrix-conduit = nixpkgs-unstable.legacyPackages.${system}.matrix-conduit;
|
|
})
|
|
];
|
|
}
|
|
]
|
|
++ extraModules;
|
|
};
|
|
}
|