anchor.diff:            The directory where transmission will create files.
           '';
         };
  +
  +      user = mkOption {
  +        type = types.str;
  +        default = "transmission";
  +        description = "User account under which Transmission runs.";
  +      };
  +
  +      group = mkOption {
  +        type = types.str;
  +        default = "transmission";
  +        description = "Group account under which Transmission runs.";
  +      };
       };
     };
   
  
positive.code:       serviceConfig.ExecStartPre = preStart;
        serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.port}";
        serviceConfig.ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
        serviceConfig.User = "transmission";
        # NOTE: transmission has an internal umask that also must be set (in settings.json)
        serviceConfig.UMask = "0002";
      };
  
negative.code:     # It's useful to have transmission in path, e.g. for remote control
      environment.systemPackages = [ pkgs.transmission ];
  
      users.users = optionalAttrs (cfg.user == "transmission") (singleton
        { name = "transmission";
          group = cfg.group;
          uid = config.ids.uids.transmission;
          description = "Transmission BitTorrent user";
          home = homeDir;
          createHome = true;
        });
  
      users.groups = optionalAttrs (cfg.group == "transmission") (singleton
        { name = "transmission";
          gid = config.ids.gids.transmission;
        });
  
      # AppArmor profile
      security.apparmor.profiles = mkIf apparmor [
  