nixos: sudo: Use build-time visudo for syntax check.

This commit is contained in:
Shea Levy 2018-02-28 14:37:26 -05:00
parent b0d6c67505
commit fe406d66b2
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27

View File

@ -215,7 +215,7 @@ in
{ src = pkgs.writeText "sudoers-in" cfg.configFile; }
# Make sure that the sudoers file is syntactically valid.
# (currently disabled - NIXOS-66)
"${pkgs.sudo}/sbin/visudo -f $src -c && cp $src $out";
"${pkgs.buildPackages.sudo}/sbin/visudo -f $src -c && cp $src $out";
target = "sudoers";
mode = "0440";
};