anchor.diff:    };
   
     config = mkIf cfg.enable {
  -    environment.systemPackages = with pkgs; [ salt ];
  +    environment = {
  +      # Set this up in /etc/salt/minion so `salt-call`, etc. work.
  +      # The alternatives are
  +      # - passing --config-dir to all salt commands, not just the minion unit,
  +      # - setting aglobal environment variable.
  +      etc."salt/minion".source = pkgs.writeText "minion" (
  +        builtins.toJSON fullConfig
  +      );
  +      systemPackages = with pkgs; [ salt ];
  +    };
       systemd.services.salt-minion = {
         description = "Salt Minion";
         wantedBy = [ "multi-user.target" ];
  
positive.code:     # Default is in /etc/salt/pki/minion
      pki_dir = "/var/lib/salt/pki/minion";
    } cfg.configuration;
    configDir = pkgs.writeTextDir "minion" (builtins.toJSON fullConfig);
  
  in
  
  
negative.code:         utillinux
        ];
        serviceConfig = {
          ExecStart = "${pkgs.salt}/bin/salt-minion";
          LimitNOFILE = 8192;
          Type = "notify";
          NotifyAccess = "all";
  