Skip to content

Commit

Permalink
postgrey: backwards compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Kleen committed Jan 2, 2017
1 parent 65f0ddb commit 9383b2c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nixos/modules/rename.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" ] "")
Expand Down

0 comments on commit 9383b2c

Please sign in to comment.