2023-11-10 03:10:06 +00:00
|
|
|
{
|
|
|
|
description = "PoC SP module for the simple-nixos-mailserver";
|
|
|
|
|
|
|
|
inputs.mailserver.url =
|
|
|
|
gitlab:simple-nixos-mailserver/nixos-mailserver;
|
|
|
|
|
|
|
|
outputs = { self, mailserver }: {
|
2023-11-16 02:33:28 +00:00
|
|
|
nixosModules.default = args@{ config, ... }:
|
2023-11-10 03:10:06 +00:00
|
|
|
let
|
|
|
|
module = mailserver.nixosModules.default args;
|
|
|
|
in
|
2023-11-16 02:33:28 +00:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
module
|
|
|
|
{
|
2023-11-26 05:10:09 +00:00
|
|
|
# tricks to rename (alias) the original module
|
2023-11-16 02:33:28 +00:00
|
|
|
config.mailserver =
|
|
|
|
config.selfprivacy.modules.simple-nixos-mailserver;
|
|
|
|
options.selfprivacy.modules.simple-nixos-mailserver =
|
|
|
|
module.options.mailserver;
|
|
|
|
}
|
2023-11-26 05:10:09 +00:00
|
|
|
(import ./config.nix mailserver.lastModifiedDate)
|
2023-11-10 03:10:06 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
configPathsNeeded =
|
|
|
|
builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
|
|
|
|
|
|
|
|
# TODO generate json docs from module? something like:
|
|
|
|
# nix eval --impure --expr 'let flake = builtins.getFlake (builtins.toPath ./.); pkgs = flake.inputs.mailserver.inputs.nixpkgs.legacyPackages.x86_64-linux; in (pkgs.nixosOptionsDoc { inherit (pkgs.lib.evalModules { modules = [ flake.nixosModules.default ]; }) options; }).optionsJSON'
|
|
|
|
# (doesn't work because of `assertions`)
|
|
|
|
};
|
|
|
|
}
|