mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-08 17:11:02 +00:00
sp-module: refactor simple-nixos-mailserver flake
This commit is contained in:
parent
d69a8cd662
commit
d5b04699c1
|
@ -5,20 +5,22 @@
|
|||
gitlab:simple-nixos-mailserver/nixos-mailserver;
|
||||
|
||||
outputs = { self, mailserver }: {
|
||||
nixosModules.default = args@{ config, ... }:
|
||||
# tricks to rename (alias) the original module
|
||||
nixosModules.default = args@{ pkgs, config, ... }:
|
||||
let
|
||||
module = mailserver.nixosModules.default args;
|
||||
in
|
||||
module // {
|
||||
imports = module.imports ++ [
|
||||
./config.nix
|
||||
{ mailserver = config.selfprivacy.modules.simple-nixos-mailserver; }
|
||||
];
|
||||
options = module.options // {
|
||||
selfprivacy.modules.simple-nixos-mailserver =
|
||||
{
|
||||
imports = [
|
||||
module
|
||||
{
|
||||
config.mailserver =
|
||||
config.selfprivacy.modules.simple-nixos-mailserver;
|
||||
options.selfprivacy.modules.simple-nixos-mailserver =
|
||||
module.options.mailserver;
|
||||
};
|
||||
}
|
||||
./config.nix
|
||||
];
|
||||
};
|
||||
configPathsNeeded =
|
||||
builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
|
||||
|
|
Loading…
Reference in a new issue