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-12-12 04:25:06 +00:00
|
|
|
nixosModules.default = _: {
|
|
|
|
imports = [
|
|
|
|
mailserver.nixosModules.default
|
|
|
|
./options.nix
|
2023-12-18 14:13:57 +00:00
|
|
|
./config.nix
|
2023-12-12 04:25:06 +00:00
|
|
|
];
|
|
|
|
};
|
2023-11-10 03:10:06 +00:00
|
|
|
configPathsNeeded =
|
|
|
|
builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
|
2024-12-18 12:40:15 +00:00
|
|
|
meta = { lib, ... }: {
|
|
|
|
spModuleVersion = 1;
|
|
|
|
id = "simple-nixos-mailserver";
|
|
|
|
name = "Mail Server";
|
|
|
|
description = "E-Mail for company and family.";
|
|
|
|
svgIcon = builtins.readFile ./icon.svg;
|
|
|
|
isMovable = true;
|
|
|
|
isRequired = true;
|
|
|
|
canBeBackedUp = true;
|
|
|
|
backupDescription = "Mail boxes and filters.";
|
|
|
|
systemdServices = [
|
|
|
|
"dovecot2.service"
|
|
|
|
"postfix.service"
|
|
|
|
];
|
|
|
|
user = "virtualMail";
|
|
|
|
folders = [
|
|
|
|
"/var/vmail"
|
|
|
|
"/var/sieve"
|
|
|
|
];
|
|
|
|
supportLevel = "normal";
|
|
|
|
};
|
2023-11-10 03:10:06 +00:00
|
|
|
|
|
|
|
# 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`)
|
|
|
|
};
|
|
|
|
}
|