Help, ... STEAM install in NixOs 21.05.2478.a445f582988

since there is no working help yet in the forum, I ask for it again:
I get:

error: Package ‘steam’ in /nix/store/xq7dppsz5prbxh8v7vrkswsydxaq594r-nixos-21.05.2478.a445f582988/nixos/pkgs/games/steam/steam.nix:42 has an unfree license (‘unfreeRedistributable’), refusing to evaluate.

even that I allowed unfree in /etc/nixos/configuration.nix
Has anyone an idea what to do

This section in the nixpkgs manual.covers that: NixOS - Nixpkgs 21.05 manual :slight_smile:

Even that I allowed unfree in /etc/nixos/configuration.nix
Has anyone an idea what to do

Sorry, I skimmed past that; could you share the contents of that? Assuming you did that correctly you shouldn’t get this error.

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

meanwhile I also changed to unstable, but did not help … :slight_smile:

Can you share your whole configuration.nix? That part of the config looks fine, but these things can be complex :wink:

# 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, pkgs, ... }: 


{
 
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];

  # Use the GRUB 2 boot loader.
  boot.loader.grub.enable = true;
  boot.loader.grub.version = 2;
  boot.loader.grub.device = "/dev/sda";
  boot.loader.grub.useOSProber = true;

  # boot.loader.grub.efiSupport = true;
  # boot.loader.grub.efiInstallAsRemovable = true;
  # boot.loader.efi.efiSysMountPoint = "/boot/efi";
  # Define on which hard drive you want to install Grub.

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

  # Set your time zone.
  time.timeZone = "Europe/Amsterdam";

  #allow unfree packages
  nixpkgs.config.allowUnfree = true; # ALT
  
  #plasma-discover
  #programs.plasma.discover.enable = true;

  # init flatpak services
  services.flatpak.enable = true;

  #allow unfree alternative
  #nixpkgs = {
  #config = {
  #  allowUnfree = true;
   #};
 # };
  
  
  # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  # Per-interface useDHCP will be mandatory in the future, so this generated config
  # replicates the default behaviour.
  networking.useDHCP = true;
  networking.interfaces.enp3s0.useDHCP = true;

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

  # Select internationalisation properties.
   i18n.defaultLocale = "de_DE.UTF-8";
   console = {
     font = "Lat2-Terminus16";
     keyMap = "de";
   };

  # Enable the X11 windowing system.
  services.xserver.enable = true;


  # Enable the Plasma 5 Desktop Environment.
  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;
  

  # Configure keymap in X11
  services.xserver.layout = "de";
  services.xserver.xkbOptions = "eurosign:e";

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

  # Enable sound.
  sound.enable = true;
  hardware.pulseaudio.enable = true;

  # 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.andy = {
      isNormalUser = true;
      extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
   };

  # List packages installed in system profile. To search, run:
  #  $ nix search 
      environment.systemPackages = with pkgs; [
      wget  bluefish firefox filezilla
    ];

  # 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;

  # This value determines the NixOS release from which the default
  # settings for stateful data, like file locations and database versions
  # on your system were taken. It‘s perfectly fine and recommended to leave
  # this value at the release version of the first install of this system.
  # Before changing this value read the documentation for this option
  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  system.stateVersion = "21.05"; # Did you read the comment?

}

Please put that in a code block like so:

```nix
# Edit this configuration...
# ...
# ...

{ config, pkgs, ... }:

{
    ...
}
```

looks like that : - )

now I have that as preformated text

How are you trying to install steam? If you’re not putting it in environment.systemPackages then nixpkgs.config.allowUnfree doesn’t apply. In those cases you need to use export NIXPKGS_ALLOW_UNFREE=1 in the shell where you run the command instead, like the manual suggests.

Are you using nix-env -iA? If so, I’d recommend forgetting that command exists. Put your permanent packages in environment.systemPackages instead.

1 Like

sudo nix-env -iA nixos.steam

what does permanent packages mean ? how would I configure that ?

In your /etc/configuration.nix, where you currently have this:

Use this instead:

  # List packages installed in system profile. To search, run:
  #  $ nix search 
  environment.systemPackages = with pkgs; [
      bluefish
      filezilla
      firefox
      steam
      wget
  ];

Then rebuild your system configuration, and steam should be installed - using nix-env -iA is an anti-pattern in my opinion, because it side steps the declarative part of NixOS, which essentially defies the purpose of the distribution.

Oh, sorry, to also answer that, I just mean packages that are still installed after you reboot your computer, so for anything that you previously installed with nix-env -iA add it to your configuration.nix like above instead :slight_smile:

1 Like

ahhhhhhh coool I will be trying that, that makes sense !!!

[quote=“TLATER, post:14, topic:14538”]

   bluefish
      filezilla
      firefox
      steam
      wget

[/quote

thanks, it is installed now, still it does not run because:

Loaded SDL version 2.0.15-6655637
libGL error: MESA-LOADER: failed to open radeonsi: /run/opengl-driver-32/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver-32/lib/dri)
libGL error: failed to load driver: radeonsi

but I do not want to bother you too much , no I got at least a step further.

1 Like

No worries :slight_smile: If you can’t figure it out, please open up a new post, someone will probably help sooner or later.

My initial thoughts are that maybe you need to add the correct drivers for your system to services.xserver.videoDrivers and reboot, or just reboot - but I’ll leave you to figuring it out.

Additionally to allowUnfree also enable programs.steam.enable in your system configuration, it will add staeam to environment.systemPackages and set some sane defaults for 32Bit libraries which are required to run Steam.

2 Likes

thanks for the hint :slightly_smiling_face:, … **BTW where do one get all that knowledge **
about nixos config, is this just the manual or also
other sources to acquire from ?

I will be trying out, and open up a new topic , should I still not have
succeded.