73023b817d
Partially to circumvent the upcoming openssl CVE, partially to reduce the number of dependencies.
41 lines
949 B
Nix
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;
|
|
};
|
|
}
|