anchor.diff:      };
   
       config = mkIf cfg.enable {
  -      environment.systemPackages = [ mirakurun ];
  +      environment.systemPackages = [ mirakurun ] ++ optional cfg.allowSmartCardAccess polkitRule;
         environment.etc = {
           "mirakurun/server.yml".source = settingsFmt.generate "server.yml" cfg.serverSettings;
           "mirakurun/tuners.yml" = mkIf (cfg.tunerSettings != null) {
  
positive.code:           description = ''
              Path to unix socket to listen on. If <literal>null</literal>, it
              won't listen on any unix sockets.
            '';
          };
  
  
negative.code:   username = config.users.users.mirakurun.name;
    groupname = config.users.users.mirakurun.group;
    settingsFmt = pkgs.formats.yaml {};
  
    polkitRule = pkgs.writeTextDir "share/polkit-1/rules.d/10-mirakurun.rules" ''
      polkit.addRule(function (action, subject) {
        if (
          (action.id == "org.debian.pcsc-lite.access_pcsc" ||
            action.id == "org.debian.pcsc-lite.access_card") &&
          subject.user == "${username}"
        ) {
          return polkit.Result.YES;
        }
      });
    '';
  in
    {
      options = {
  