anchor.diff:            ${shutdown} -r +1
           fi
         '' else ''
  -        ${nixos-rebuild} switch ${toString (cfg.flags ++ upgradeFlag)}
  +        ${nixos-rebuild} ${cfg.operation} ${toString (cfg.flags ++ upgradeFlag)}
         '';
   
         startAt = cfg.dates;
  
positive.code:         ''}
  
          if [ "''${booted}" = "''${built}" ]; then
            ${nixos-rebuild} switch ${toString cfg.flags}
          ${optionalString (cfg.rebootWindow != null) ''
            elif [ "''${do_reboot}" != true ]; then
              echo "Outside of configured reboot window, skipping."
  
negative.code:           version. If enabled, a systemd timer will run
            <literal>nixos-rebuild switch --upgrade</literal> once a
            day.
          '';
        };
  
        operation = mkOption {
          type = types.enum ["switch" "boot"];
          default = "switch";
          example = "boot";
          description = ''
            Whether to run
            <literal>nixos-rebuild switch --upgrade</literal> or run
            <literal>nixos-rebuild boot --upgrade</literal>
          '';
        };
  
  