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;
|
gitlab:simple-nixos-mailserver/nixos-mailserver;
|
||||||
|
|
||||||
outputs = { self, mailserver }: {
|
outputs = { self, mailserver }: {
|
||||||
# tricks to rename (alias) the original module
|
nixosModules.default = args@{ config, ... }:
|
||||||
nixosModules.default = args@{ pkgs, config, ... }:
|
# tricks to rename (alias) the original module
|
||||||
let
|
let
|
||||||
module = mailserver.nixosModules.default args;
|
module = mailserver.nixosModules.default args;
|
||||||
in
|
in
|
||||||
module // {
|
{
|
||||||
imports = module.imports ++ [
|
imports = [
|
||||||
|
module
|
||||||
|
{
|
||||||
|
config.mailserver =
|
||||||
|
config.selfprivacy.modules.simple-nixos-mailserver;
|
||||||
|
options.selfprivacy.modules.simple-nixos-mailserver =
|
||||||
|
module.options.mailserver;
|
||||||
|
}
|
||||||
./config.nix
|
./config.nix
|
||||||
{ mailserver = config.selfprivacy.modules.simple-nixos-mailserver; }
|
|
||||||
];
|
];
|
||||||
options = module.options // {
|
|
||||||
selfprivacy.modules.simple-nixos-mailserver =
|
|
||||||
module.options.mailserver;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
configPathsNeeded =
|
configPathsNeeded =
|
||||||
builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
|
builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
|
||||||
|
|
Loading…
Reference in a new issue