anchor.diff:            version. If enabled, a systemd timer will run
             <literal>nixos-rebuild switch --upgrade</literal> once a
             day.
  +        '';
  +      };
  +
  +      flake = mkOption {
  +        type = types.nullOr types.str;
  +        default = null;
  +        example = "github:kloenk/nix";
  +        description = ''
  +          The Flake URI of the NixOS configuration to build.
  +          Disables the option <option>system.autoUpgrade.channel</option>.
           '';
         };
   
  
positive.code: 
    config = lib.mkIf cfg.enable {
  
      system.autoUpgrade.flags =
        [ "--no-build-output" ]
        ++ (if cfg.channel == null
            then [ "--upgrade" ]
            else [ "-I" "nixpkgs=${cfg.channel}/nixexprs.tar.xz" ]);
  
      systemd.services.nixos-upgrade = {
        description = "NixOS Upgrade";
  
negative.code: 
  with lib;
  
  let cfg = config.system.autoUpgrade;
  
  in {
  
    options = {
  
  