nixos/treewide: Move rename.nix imports to their respective modules
A centralized list for these renames is not good because: - It breaks disabledModules for modules that have a rename defined - Adding/removing renames for a module means having to find them in the central file - Merge conflicts due to multiple people editing the central file
This commit is contained in:
@@ -42,6 +42,17 @@ with lib; let
|
||||
};
|
||||
|
||||
in {
|
||||
imports = [
|
||||
(mkMergedOptionModule [ [ "services" "postgrey" "inetAddr" ] [ "services" "postgrey" "inetPort" ] ] [ "services" "postgrey" "socket" ] (config: let
|
||||
value = p: getAttrFromPath p config;
|
||||
inetAddr = [ "services" "postgrey" "inetAddr" ];
|
||||
inetPort = [ "services" "postgrey" "inetPort" ];
|
||||
in
|
||||
if value inetAddr == null
|
||||
then { path = "/run/postgrey.sock"; }
|
||||
else { addr = value inetAddr; port = value inetPort; }
|
||||
))
|
||||
];
|
||||
|
||||
options = {
|
||||
services.postgrey = with types; {
|
||||
|
||||
Reference in New Issue
Block a user