[Bug] missing submodules attribute on NixOS
Before Reporting
- [x] I found no existing issues matching my bug
- [x] My issue is not caused by a theme
- [x] My issue is not caused by a plugin
Describe the Bug
Hi, i'm trying to install Steam Millenium on NixOS via the Flake, but i'm getting the following error
warning: Git tree '/etc/nixos' is dirty
error:
… while updating the lock file of flake 'git+file:///etc/nixos'
… while updating the flake input 'millennium'
error: unexpected flake input attribute 'submodules', at /nix/store/px04gkhm6wn874xni2mn8fnj5ibi67f0-source/flake.nix:10:5
looks that is a problem of the Flake, because if i remove all the other steps and leave only the input it still appearing
Expected Behavior
Millenium getting installed successfully and the flake updated with the Millenium input
Steps To Reproduce
- Add the input to flake.nix
- Update the flake with "nix flake update"
Operating System
Linux
Anything else?
No response
the problem comes that you do not import inputs into your configuration.nix or one of its modules?
here look at my flake https://github.com/DioKyrie-Git/NixOSFlake
Make sure to read this again https://docs.steambrew.app/users/getting-started/installation
and run nix flake update millennium before rebuilding nixos
Can reproduce this bug, notably via nix eval:
nix eval --impure --json --expr '(builtins.getFlake "git+https://github.com/SteamClientHomebrew/Millennium")' does throw error: unexpected flake input attribute 'submodules',
As a note I run nix/lix on arch linux:
nix (Lix, like Nix) 2.93.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/luna/.config/nix/nix.conf:/home/luna/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/c47cym23n56kkss8z0ican8nynkf6cwk-lix-2.93.0/share
@0x4c756e61 @Reylak-dev what is the output of nix-env --version in your terminal?
I think for new millennium release with lua the nix code should be rewritten. Then we can make it work better.
@0x4c756e61 @Reylak-dev what is the output of
nix-env --versionin your terminal?
Here's my nix env version
nix-env (Lix, like Nix) 2.93.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/luna/.config/nix/nix.conf:/home/luna/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/c47cym23n56kkss8z0ican8nynkf6cwk-lix-2.93.0/share
Mine complains that submodules are not supported:
❯ sudo nixos-rebuild switch --flake ~/Repos/dot-nixos#aska
error:
… while updating the lock file of flake 'git+file:///home/falk/Repos/dot-nixos'
error: input attribute 'submodules' not supported by scheme 'github'
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/home/falk/Repos/dot-nixos#nixosConfigurations."aska".config.system.build.nixos-rebuild' --no-link' returned non-zero exit status 1.
and if I do nix flake update millennium:
❯ nix flake update millennium
warning: Git tree '/home/falk/Repos/dot-nixos' is dirty
error:
… while updating the lock file of flake 'git+file:///home/falk/Repos/dot-nixos'
error: input attribute 'submodules' not supported by scheme 'github'
In my flake.nix under inputs I've added millennium.url = "git+https://github.com/SteamClientHomebrew/Millennium";
flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# ...
millennium.url = "git+https://github.com/SteamClientHomebrew/Millennium";
};
outputs = inputs@{ self, nixpkgs, millennium, ... }:
let
# Get the list of hosts declared inside of `./hosts/`:
hostnames = builtins.filter (dir: dir != ".") (builtins.attrNames (builtins.readDir ./hosts));
# Custom nixosSystem wrapper function:
mkNixosSystem = hostname: nixpkgs.lib.nixosSystem {
#system = import ./hosts/${hostname}/system.nix; ?
specialArgs = { inherit inputs; };
modules = [
# Configuration shared by *all* hosts:
./global_configuration.nix
# Host-specific configuration:
./hosts/${hostname}/configuration.nix
./hosts/${hostname}/hardware-configuration.nix
{
networking.hostName = nixpkgs.lib.mkDefault "${hostname}";
}
];
};
in
{
# Generate a NixOS system configuration for each hostname:
nixosConfigurations = nixpkgs.lib.genAttrs (hostnames) (hostname: mkNixosSystem hostname);
};
}
hosts/aska/configuration.nix:
{ pkgs, config, lib, ... }:
{
imports = [
../../common/module/gui/steam
# ...
];
# ...
}
common/module/gui/steam/default.nix:
{ pkgs, inputs, ... }:
{
nixpkgs.overlays = [ inputs.millennium.overlays.default ];
environment.systemPackages = with pkgs; [ steam-millennium ];
programs.gamemode.enable = true;
programs.steam = {
enable = true;
gamescopeSession.enable = true;
package = pkgs.steam-millennium;
};
}
OK, I think I understood, where this is comming.
in this repor we use flake.nix with self.submodules = true; which is required by ./nix/python/millennium.nix and possibly others.
As such they neeed to accces sdk submodule from this repository.
this can be avoided by stating src as github path.
And I think there were some comments on .nix files deleted, I will look on commit history.
I will try to rewrite nix code here to eclude use of submodule.
And lastly, can I ask you to add home manager. to test if it will build with it. @Falkgaard
Closing in favor of NixOS mega-thread.