tlaternet-server/lib/default.nix
Tristan Daniël Maat 73023b817d
conduit: Use dependencies from stable
Partially to circumvent the upcoming openssl CVE, partially to reduce
the number of dependencies.
2022-10-31 16:06:31 +00:00

41 lines
949 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.override {
inherit (self) stdenv lib fetchFromGitLab rustPlatform pkg-config rocksdb;
};
})
];
}
]
++ extraModules;
};
}