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

Can't install on NixOS #387

Open
Mooling0602 opened this issue Jun 27, 2024 · 3 comments
Open

Can't install on NixOS #387

Mooling0602 opened this issue Jun 27, 2024 · 3 comments

Comments

@Mooling0602
Copy link

Mooling0602 commented Jun 27, 2024

Here are my config files:

/etc/nixos/configuration.nix

The same to this part

{ config, pkgs, ... }:

{
  ...
  nix.settings = {
    substituters = [ "https://ezkea.cachix.org" ];
    trusted-public-keys = [ "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ];
  };
  ...
}

/etc/nixos/home.nix

{ config, pkgs, ... }:
let
  externalConfig = import ./userApps/an-anime-game-launcher.nix;
in
{
  ...
  import = externalConfig;
  ...
}

/etc/nixos/userApps/an-anime-game-launcher.nix

The same to this part

let
  aagl-gtk-on-nix = import (builtins.fetchTarball "https://github.com/ezKEa/aagl-gtk-on-nix/archive/main.tar.gz");
in
{
  home.packages = [ aagl-gtk-on-nix.an-anime-game-launcher ];
}

Error logs

~ ❯ sudo nixos-rebuild switch
building the system configuration...
error:
       … while calling the 'head' builtin

         at /nix/store/bi5zxc0v5g6ylygdwyqzh280sccg3ykb-source/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         elsewhile evaluating the attribute 'value'

         at /nix/store/bi5zxc0v5g6ylygdwyqzh280sccg3ykb-source/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: in pure evaluation mode, 'fetchTarball' requires a 'sha256' argument
@Mooling0602
Copy link
Author

I have configured home-manager installation by this article, so there's no need for me to run home-manager switch for me.

@Cryolitia
Copy link

It's a Nix question, shouldn't come up here.


Does sudo nixos-rebuild switch --impure work for you?

@devraza
Copy link

devraza commented Oct 27, 2024

Another way to do this would be to add aagl-gtk-on-nix as an input in your flake.nix:

inputs.aagl-gtk-on-nix.url = "github:ezKEa/aagl-gtk-on-nix";

And reference the package in home.packages or environment.systemPackages:

home.packages = [
  inputs.aagl-gtk-on-nix.packages.${pkgs.system}.an-anime-game-launcher
];

That way, you don't need to add the --impure flag every rebuild.

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

3 participants