Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flake follows a non-existent input #13

Open
andmald922 opened this issue Feb 22, 2025 · 13 comments
Open

Flake follows a non-existent input #13

andmald922 opened this issue Feb 22, 2025 · 13 comments

Comments

@andmald922
Copy link

Whenever I attempt to update my flakes I keep getting the error: error: input 'hyprland/hyprland-qtutils/hyprutils' follows a non-existent input 'hyprland/hyprland-qtutils/hyprlang/hyprutils'

If I had to guess it might have something to do with #10 ? But I don't actually know. Never had any issues with installing or updating hyprland before this point

Heres my flake.nix in case it helps:

{
  description = "nixos configuration";
  nixConfig = {
    extra-trusted-public-keys = [ 
      "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" 
      "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
    ];
    extra-substituters = [ 
      "https://hyprland.cachix.org" 
      "https//nix-community.cachix.org"
    ];
  };
  inputs = {
    nixpkgs = {
      url = "github:NixOS/nixpkgs/nixos-24.11";
    };
    home-manager = {
      url = "github:nix-community/home-manager/release-24.11";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    pkgs-nixos-unstable = {
      url = "github:NixOS/nixpkgs/nixos-unstable";
    };
    hyprland = {
      url = "github:hyprwm/Hyprland";
    };
  };

  outputs = { self, nixpkgs, pkgs-nixos-unstable, home-manager, ... } @ inputs: {
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem rec {
        system = "x86_64-linux";
        specialArgs = {
          inherit inputs;
          nixos = import nixpkgs {
            inherit system;
            config.allowUnfree = true;
          };
          nixos-unstable = import pkgs-nixos-unstable {
            inherit system;
            config.allowUnfree = true;
          };
        };
        modules = [
          ./configuration.nix
          home-manager.nixosModules.home-manager
          {
            home-manager.extraSpecialArgs = { inherit inputs; };
            home-manager.useGlobalPkgs = true;
            home-manager.useUserPackages = true;
            home-manager.users.randomuser.imports = [./home.nix];
          }
        ];
      };
  };
}
@vaxerski
Copy link
Member

@fufexan

@fufexan
Copy link
Member

fufexan commented Feb 23, 2025

Sounds like lockfile shenanigans. Can you remove flake.lock and then run nix flake update again?

@sora-g22
Copy link

Removing my flake.lock from /etc/nixos did not fix the problem, is there a flake.lock in a different folder I should remove instead?

@sora-g22
Copy link

Kept researching, an even more drastic approach seems to have worked. I had to rm -r ~/.cache/nix before I could get the update to work again. Hopefully this will pop up in search results in case anyone experiences this as well. I would mark this as solved now but it seems I do not have permission to do so

@sora-g22
Copy link

Nevermind, I was able to update after I deleted the cache, but its still happening. If I attempt to run nix flake update it still occurs, this with a new flake.lock in my /etc/nixos directory and completely refreshed cache. I really have no idea whats going on here now

@fufexan
Copy link
Member

fufexan commented Feb 24, 2025

I'm really not sure what might be causing it. Seems to work fine for most of us. What's your Nix version? I could not repro with pkgs.lix or pkgs.nix in unstable.

@sora-g22
Copy link

24.11.20250221.11415c7 (Vicuna)

Maybe its something in my configuration.nix? I have no idea why it would cause an issue in a flake lock file but worth a shot?

{ config, nixos, nixos-unstable, inputs, ... }:
let
  hyprland-mesa-unstable = inputs.hyprland.inputs.nixpkgs.legacyPackages.${nixos.stdenv.hostPlatform.system};
in
{
  imports =
    [ ./hardware-configuration.nix
      ./cachix.nix
    ];
  nix.settings = {
  	system-features = [ "gccarch-icelake-client" "nixos-test" "benchmark" "big-parallel" "kvm" ];
  	experimental-features = [ "nix-command" "flakes" ];
    substituters = [ "https://hyprland.cachix.org" ];
    trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
  };
  nixpkgs.config.allowUnfree = true; 

  boot = {
    extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
    kernelPackages = nixos.linuxPackages_6_12;
    kernelParams = [ "mitigations=off" "nvidia-drm.modeset=1" "nvidia-drm-fbdev=1" ];  
    kernel.sysctl = { "net.ipv4.tcp_mtu_probing" = true; };
    binfmt.emulatedSystems = [ "aarch64-linux" ];
    initrd = {
      enable = true;
      kernelModules = [
        "nvidia"
        "nvidiafb"
        "nvidia_modeset"
        "nvidia_uvm"
        "nvidia_drm"
      ];
    };
    plymouth.enable = true;
    loader = {
  	 efi = {
	     canTouchEfiVariables = true;
	   };
	   grub = {
        configurationLimit = 50;
	     efiSupport = true;
	     device = "nodev";
	   };
    };
  };

  virtualisation.libvirtd = {
    enable = true;
    qemu.ovmf.enable = true;
  };

  services = {
    gnome = {
      gnome-keyring.enable = true;
      glib-networking.enable = true;
    };
    localtimed.enable = false;
    joycond.enable = true;
    geoclue2.enable = true;
    printing = {
      enable = true;
      drivers = with nixos; [ hplipWithPlugin brlaser ];
	 };
    avahi = {
      enable = true;
      nssmdns4 = true;
      openFirewall = true;
    };

    dbus = {
      enable = true;
    };
    pipewire = {
      enable = true;
      alsa.enable = true;
      alsa.support32Bit = true;
      pulse.enable = true;
      jack.enable = true;
      wireplumber.enable = true;
    };
    blueman.enable = true;
    desktopManager = {
      gnome.enable = false;
      plasma6.enable = false;
      sddm.enable = false;
      lightdm.enable = false;
    };
    xserver = {
      enable = true;
      videoDrivers = [ "nvidia" "modesetting"];
      xkb.layout = "us";
    };
    fwupd.enable = true;
    gvfs.enable = true;
    locate.enable = true; 
    mysql = {
      enable = true;
      package = nixos.mariadb;
    };

  programs = {
    adb.enable = true;
    uwsm = {
      enable = true;
    };
    xwayland.enable = true;
    hyprland = {
      enable = true;
      package = inputs.hyprland.packages.${nixos.stdenv.hostPlatform.system}.hyprland;
      portalPackage = inputs.hyprland.packages.${nixos.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
      xwayland.enable = true;
      withUWSM = true;
    };
    dconf.enable = true;
    kdeconnect.enable = true;
    steam = {
  	 enable = true;
	   remotePlay.openFirewall = true;
	   dedicatedServer.openFirewall = true;
	   gamescopeSession.enable = true;
	 };
    fish = {
   	 enable = true;
	   interactiveShellInit = "fenv source /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh";
    };
    gamescope.enable = true;
    gnupg.agent = {
      enable = true;
    };
    gamemode = {
  	 enable = true;
      enableRenice = true;
	   settings = {
		   general = {
			   renice = 0;
			   desiredgov="performance";
			   ioprio=0;			
		   };
		   gpu = {
			   gpu_device=0;
		   };
	   };
    };
  };

  gtk.iconCache.enable = true;
  xdg = {
    icons.enable = true;
    mime = {
      enable = true;
      addedAssociations = {
  	   "inode/directory" = "org.kde.dolphin.desktop;org.gnome.Nautilus.desktop";
	   };
      defaultApplications = {
  	   "inode/directory" = "org.kde.dolphin.desktop;org.gnome.Nautilus.desktop";
	   };
    };
    portal = {
      enable = true;
      extraPortals = with nixos; [
        xdg-desktop-portal-kde
      ];
    };
  };
  
  systemd = {
    user.services.polkit-kde-authentication-agent-1 = {
      description = "polkit-kde-authentication-agent-1";
      wantedBy = [ "graphical-session.target" ];
      wants = [ "graphical-session.target" ];
      after = [ "graphical-session.target" ];
      serviceConfig = {
        Type = "simple";
        ExecStart = "${nixos.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
        Restart = "on-failure";
        RestartSec = 1;
        TimeoutStopSec = 10;
      };
    };
  };

  networking = {
    firewall = {
  	 enable = true;
    };
    hostName = "nixos"; 
    networkmanager.enable = true;
  };

  time.timeZone = "America/New_York";

  hardware = {
    nvidia = {
  	 modesetting.enable = true;
	   open = false;
      powerManagement.enable = false;
      powerManagement.finegrained = false;
	   nvidiaSettings = false;
      nvidiaPersistenced = true;
	   package = config.boot.kernelPackages.nvidiaPackages.beta; 
	 };
    graphics = {
      enable = true;
      enable32Bit = true;
      package = hyprland-mesa-unstable.mesa.drivers;
      package32 = hyprland-mesa-unstable.pkgsi686Linux.mesa.drivers;
    };
    logitech.wireless = {
      enable = true;
      enableGraphical = true;
    };
    bluetooth.enable = true;
    enableRedistributableFirmware = true;
    cpu.intel.updateMicrocode = true;
    xone.enable = true;
  };

  fonts = {
    fontDir.enable = true;
    packages = with nixos; [
      noto-fonts
      noto-fonts-cjk-sans
      noto-fonts-cjk-serif
      noto-fonts-emoji
      liberation_ttf
      fira-code
      fira-code-symbols
      mplus-outline-fonts.githubRelease
      corefonts
      source-sans-pro
      source-sans
      cm_unicode
      dina-font
      proggyfonts
    ];
  };

  i18n.defaultLocale = "en_US.UTF-8";
  console = {
     useXkbConfig = true;
  };

  security.rtkit.enable = true;

  users = {
    groups.gamemode = {};
    users.randomuser = {
      isNormalUser = true;
      extraGroups = [ "gamemode" "wheel" "realtime" "libvirtd" "adbusers" ];
      packages = with nixos; [
        firefox
        tree
        xorg.xorgserver
        xorg.xf86inputevdev
        xorg.xf86inputsynaptics
        xorg.xf86inputlibinput
        xorg.xf86videoati
        xorg.xf86videonouveau
      ];
    };
    defaultUserShell = nixos.bash;
  };

  environment = {
    sessionVariables = rec {
  	 _JAVA_OPTIONS = "-Dawt.useSystemAAFontSettings=lcd";
	   XDG_CONFIG_HOME = "$HOME/.config";
	   XDG_DATA_HOME = "$HOME/.local/share";
	   XDG_STATE_HOME = "$HOME/.local/state";
	   XDG_CACHE_HOME = "$HOME/.cache";
	   BROWSER = "librewolf";
	   EDITOR = "nvim";
	 };
    binsh = "${nixos.dash}/bin/dash";
    shells = with nixos; [ fish bash ];
    systemPackages = with nixos; [
      * hundreds of lines of packages*
    ];
  };
  system.stateVersion = "23.05";
}

@fufexan
Copy link
Member

fufexan commented Feb 24, 2025

That's unlikely. I don't see anything that could interfere.

@sora-g22
Copy link

Just checked back, realized you asked for my version of nix rather than nixos, my apologies, nix-info says I'm currently running 2.15.1

@sora-g22
Copy link

sora-g22 commented Feb 24, 2025

I was wondering why that version was so old, I didn't realize you had to run nix upgrade-nix as a whole separate command. Why is that not automatically updated with the rest of the system? Well, regardless, once I update nix the package this issue doesn't appear anymore. If I had to guess the way the follows are set up now are not backwards compatible with older versions of nix (EDIT I'm not sure what version of nix is needed, but it may prove useful to mention somewhere in the documentation a minimum version requirement)

@fufexan
Copy link
Member

fufexan commented Feb 24, 2025

2.15 is pretty old. I wasn't even aware that anyone may still be using it. What I'm certain of is that 2.18+ should work fine. Not sure about the versions in between.

I didn't realize you had to run nix upgrade-nix as a whole separate command.

I'm almost certain that's an anti-pattern on NixOS. Should be handled by the nix.package option.

@sora-g22
Copy link

I'm almost certain that's an anti-pattern on NixOS. Should be handled by the nix.package option.

Whats crazy is that I set nix.package to version 2.25 before I tried doing it imperatively, didn't do anything when I rebuilt. Don't quite understand how I've managed to mess up my OS this badly, but at least I can update my flakes properly again

@fufexan
Copy link
Member

fufexan commented Feb 25, 2025

My guess is that the imperative Nix is installed in a user profile and takes precedence in PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants