diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2017-01-02 18:01:42 +0100 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2017-01-02 18:01:42 +0100 |
commit | 9383b2cf347c4181bbdd14b5c8bcb929e4cdcb8b (patch) | |
tree | 4994f70024428d1ef64a6516cb0de015528b1946 /nixos | |
parent | 65f0ddbd534c1bd74d7fdbd8db3dff0d00a89c5a (diff) |
postgrey: backwards compatability
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/rename.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 8102e0e1f642a..758f229d59d78 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -153,6 +153,17 @@ with lib; # alsa (mkRenamedOptionModule [ "sound" "enableMediaKeys" ] [ "sound" "mediaKeys" "enable" ]) + # postgrey + (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 = "/var/run/postgrey.sock"; } + else { addr = value inetAddr; port = value inetPort; } + )) + # Options that are obsolete and have no replacement. (mkRemovedOptionModule [ "boot" "initrd" "luks" "enable" ] "") (mkRemovedOptionModule [ "programs" "bash" "enable" ] "") |