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: 
        flags = mkOption {
          type = types.listOf types.str;
          default = [ ];
          example = [
            "-I"
            "stuff=/home/alice/nixos-stuff"
            "--option"
            "extra-binary-caches"
            "http://my-cache.example.org/"
          ];
          description = ''
            Any additional flags passed to <command>nixos-rebuild</command>.
  
            If you are using flakes and use a local repo you can add
            <command>[ "--update-input" "nixpkgs" "--commit-lock-file" ]</command>
            to update nixpkgs.
          '';
        };
  
  