Errors when trying to update

I’m getting an error telling me that nixFLakes has been renamed/replaced with nixVersions.stable while trying to update from 24.05 to 24.11.

I have a feeling im just making a really stupid mistake, its been a while since I last updated versions and Ive since forgotten most of what I did last tine.

I made sure to update my nixpkg url from 24.05 to 24.11, and ran “sudo nix flake update” to no avail

Config:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, lib,  pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      #<home-manager/nixos>
    ];

  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "Frame"; # Define your hostname.
  #networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

  # Configure network proxy if necessary
  # networking.proxy.default = "http://user:password@proxy:port/";
  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

  # Enable networking
  networking.networkmanager.enable = true;
  #services.mullvad-vpn.enable = true;
  #programs.sniffnet.enable = true;
  #services.tailscale.enable = true;

  # Set your time zone.
  time.timeZone = "America/New_York";

  # Select internationalisation properties.
 # i18n.defaultLocale = "en_US.UTF-8";


  
  i18n.extraLocaleSettings = {
    LC_ADDRESS = "en_US.UTF-8";
    LC_IDENTIFICATION = "en_US.UTF-8";
    LC_MEASUREMENT = "en_US.UTF-8";
    LC_MONETARY = "en_US.UTF-8";
    LC_NAME = "en_US.UTF-8";
    LC_NUMERIC = "en_US.UTF-8";
    LC_PAPER = "en_US.UTF-8";
    LC_TELEPHONE = "en_US.UTF-8";
    LC_TIME = "en_US.UTF-8";
  };

 #GRAPHICS
  # https://vid.puffyan.us/watch?v=61wGzIv12Ds *vimjoyer*
  # https://nixos.wiki/wiki/AMD_GPU
 # boot.initrd.kernelModules = [ "amdgpu" ];
  
  
  # Enable the X11 windowing system.
  #services.xserver.enable = true;
  services.xserver = {
      enable = true;
      #videoDrivers = [ "amdgpu" ];
      # Configure Keymap
      xkb.layout = "us";
   	  xkb.variant = "";
  };
  
  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;

  environment.variables.GTK_THEME = "Adwaita:dark";

  # Graphics fix
  #amdgpu.sg_display=0

  # Desktop portal
  #xdg.portal.enable = true;
  #xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];	

  #programs.waybar.enable = true;


  # ENABLE PROGRAMS
  # Power
  programs.zsh.enable = true;
  programs.starship.enable = true;
  #programs.dconf.enable = true;
  services.tlp.enable = false;
  #services.auto-cpufreq.enable = true;
  # remember systemctl tlp enable
  services.power-profiles-daemon.enable = true;
  programs.light.enable = true;
  
  
  # Other
  # ------------------
  programs.steam.enable = true;
  # ------------------
  #programs.haguichi.enable = true;
  #services.fwupd.enable = true;
  
  #Cli/tty
  #programs.tmux = {
  #  enable = true;
  #  clock24 = true;
  #};
  #kitty tabs is good enough, tmux hates my keyboard
  
  # AV
  #https://docs.clamav.net/manual/Usage/Configuration.html
  services.clamav.daemon.enable = true;
  services.clamav.updater.enable = true;
  
  # Enable Fingerprint
  #services.fprintd = {
  #  enable = true;
  #  package = pkgs.fprintd-tod;
  #  tod = {
  #    enable = true;
  #    driver = pkgs.libfprint-2-tod1-goodix;
  #    };
  #};
  services.fprintd.enable = true;
  #services.fprintd.tod.enable = true;
  #services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix; 

  #Pam
  services.gnome.gnome-keyring.enable = true;
  security.pam.services.sddm.enableGnomeKeyring = true;

  security.pam.services.gdm.enableGnomeKeyring = true;

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound with pipewire.
  sound.enable = true;
  hardware.pulseaudio.enable = false;
  
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    # If you want to use JACK applications, uncomment this
    jack.enable = true;
    extraConfig.pipewire.adjust-sample-rate = {
        "context.properties" = {
          "default.clock.allowed-rates" = [ 44100 48000 192000 ];
        };
    };
    # use the example session manager (no others are packaged yet so this is enabled by default,
    # no need to redefine it in your config for now)
    #media-session.enable = true;
  };

  # Brightness
  #https://discourse.nixos.org/t/how-to-enable-ddc-brightness-control-i2c-permissions/20800
  # use light

  # Enable touchpad support (enabled default in most desktopManager).
  #services.xserver.libinput.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.um = {
    isNormalUser = true;
    description = "um";
    shell = pkgs.zsh;
    extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" "kvm" "spice-gtk" "swtpm"];
  };
  #home-manager = {
  #  useGlobalPkgs = true;
  #  useUserPackages = true;
  #  extraSpecialArgs = { inherit inputs; }
  #  users = {
  #    um = import ./home.nix;
  #  }
  #};

  
  # Flake = true ------------- 
  nix = {
    package = pkgs.nixFlakes;
      settings.auto-optimise-store = true;
      settings.experimental-features = [ "nix-command" "flakes" ];
      gc = {
        automatic = true;
        dates = "weekly";
        options = "--delete-older-than 7d";
      };
  };



  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;

  # flatpak
  services.flatpak.enable = true;

  # Virtual box
   #virtualisation.virtualbox.host.enable = true;
   #virtualisation.virtualbox.host.enableExtensionPack = true;

  # virtualization
  # Enable libvirtd daemon
  #virtualisation.libvirtd.enable = true;
  #boot.extraModprobeConfig = ''
  #  options kvm_intel nested=1
  #  options kvm_intel emulate_invalid_guest_state=0
  #  options kvm ignore_msrs=1
  #'';
  #security.wrappers.spice-client-glib-usb-acl-helper.source = "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper";
  #virtualisation.spiceUSBRedirection.enable = true;
  #services.spice-vdagentd.enable = true;
  
  # New Virt
  virtualisation = {
    libvirtd = {
      enable = true;
      qemu = {
        package = pkgs.qemu_kvm;
        ovmf = {
          enable = true;
          packages = with pkgs; [ OVMFFull.fd ];
        };
        swtpm.enable = true;
      };
    };
    spiceUSBRedirection.enable = true;
  };
  #Android
  #virtualisation.anbox.enable = true;
  #virtualisation.waydroid.enable = true;

  

    
  # List packages installed in system profile. To search, run:
  # $ nix search wget

# EXCLUSIONS
  environment.gnome.excludePackages = (with pkgs; [
    #gnome-photos
    gnome-tour
  ]) ++ (with pkgs.gnome; [
    #baobab      # disk usage analyzer
    cheese      # photo booth
    #eog         # image viewer
    epiphany    # web browser
    #gedit       # text editor
    simple-scan # document scanner
    totem       # video player
    yelp        # help viewer
    evince      # document viewer
    #file-roller # archive manager
    geary       # email client
    seahorse    # password manager

    # these should be self explanatory
    #gnome-calculator 
    #gnome-calendar 
    gnome-characters
    gnome-terminal
    #gnome-clocks 
    gnome-contacts
    #gnome-font-viewer 
    #gnome-logs 
    gnome-maps 
    #gnome-music
    #gnome-screenshot
    #gnome-system-monitor 
    gnome-weather 
    #gnome-disk-utility 
    #pkgs.gnome-connections
    ]);
    

  # Fonts
  fonts.packages = with pkgs; [
    nerdfonts
  ];
  
  
  nixpkgs.config.permittedInsecurePackages = [
   #"electron-24.8.6"
   #"electron-19.1.9"
   # "electron-24.8.6"
   #"electron-25.9.0"
  ];

  

  environment.systemPackages = with pkgs; [
  # Flake
  #helix.packages."${pkgs.system}".helix
  #node.packages."${pkgs.system}".node
  # obsidian.packages."${pkgs.system}".obsidian
  #kalker
  # ------ C
  gcc
  gdb
  rustc
  #xorg.xbacklight
  # Spicy
  gnome.gnome-tweaks
  #wowup-cf #wtf?
  #instawow
  wget
  curl
  git
  #mullvad-vpn
  #lutris
  #nodejs_20
  #bun
  sass
  #veracrypt
  #syncthing
  #tidal-hifi
  # Text/IDE
  #micro
  obsidian
  #zed-editor
  # ------ PYTHON
  #python312Full
  #python312Packages.tkinter #wtf???
  #(python312.withPackages(ps: with ps; [pygame pip tkinter tk]))
  # Just run python in VM, the dev env shit is wack
  # ------------- Editors
  vscodium
  helix
  # ------------- Browsers
  firefox
  brave
  tor-browser
  # ------------- Tools
  #htop
  btop
  #tmux
  powertop
  fastfetch
  cpufetch
  starship
  #libreoffice-fresh
  curl
  #gamescope
  #oh-my-zsh
  #dunst
  #	libnotify
  #swww
  kitty
  wirelesstools
  lshw
  usbutils
  # ------------- Virutalization
  virt-manager
  virtiofsd
  spice # usb related
  libguestfs
  libguestfs-with-appliance
  #appimage-run
  # ---- Bios -----
  #fwups
  gnome.seahorse
  vesktop
  spotify
  #obs-studio
  #easyeffects 
  tidal-dl
  protonvpn-gui
  vlc
  #bottles
  #protonvpn-gui_legacy
  #shotcut
  #kedenlive
  #parsec-bin
  #quickgui
  screen
  #github-desktop
  calibre
  zed-editor
  ];

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  # programs.mtr.enable = true;
  # programs.gnupg.agent = {
  #   enable = true;
  #   enableSSHSupport = true;
  # };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  # services.openssh.enable = true;

  # Open ports in the firewall.
  # networking.firewall.allowedTCPPorts = [ ... ];
  # networking.firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  # networking.firewall.enable = false;

  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).

  

  system.autoUpgrade.channel  = https://nixos.org/channels/nixos-24.11;
  #system.autoUpgrade.enable = true;
  # Randomly updates during use, not recommended
  #system.autoUpgrade.allowReboot = true;
  # add path
  system.stateVersion = "24.11"; # Did you read the comment?
  # Can cause issues for obvious reasons
  boot.kernelPackages = pkgs.linuxPackages_latest;
}

Flake:

 {                                                                                                                                                                                                                                          
    description = "Nix";                                                                                                                                                                                                          
                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                             
    inputs = {                                                                                                                                                                                                                               
      #nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
      # Update with new url for new version 
      #flake-utils.url = "github:numtide/flake-utils"i;                                                                                                                                                                                  
      nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";                                                                                                                                                                                     
    };                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                            
    #outputs = inputs@{ self, nixpkgs, ...}: {                                                                                                                                                                                      
     
    outputs = { self, nixpkgs, ... }:
      let
        systems = [ "x86_64-linux" ]; # Specify the systems you want to support
        pkgs = import nixpkgs { inherit systems; };
      in {
        # Define devShell for each system
        devShells = builtins.map (system: 
          let
            pkgsForSystem = import nixpkgs { inherit system; };
          in with pkgsForSystem; rec {
            devShell = mkShell rec {
              buildInputs = [
                libxkbcommon
                libGL

                # WINIT_UNIX_BACKEND=wayland
                wayland

                # WINIT_UNIX_BACKEND=x11
                xorg.libXcursor
                xorg.libXrandr
                xorg.libXi
                xorg.libX11
              ];
              LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
            };
          }
        ) systems;     
      
       nixosConfigurations = {                                                                                                                                                                                                                
        um = nixpkgs.lib.nixosSystem {                                                                                                                                                                                                       
          system = "x86_64-linux";
          modules = [./nixos/configuration.nix];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
        };                                                                                                                                                                                                                                   
      };                                                                                                                                                                                                                                     
    };                                                                                                                                                                                                                                       
 }                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                             

That’s the bit that causes the error. IIRC middle-class( autocorrect, lol) nixFlakes was an alias to the nix version that was guaranteed to have flakes. You should probably drop the “package” line.

1 Like