nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.15k stars 65 forks source link

Insecure packages #342

Closed RyanGibb closed 3 months ago

RyanGibb commented 3 months ago

I can't quite figure out how to allow the use of insecure packages without a shell variable.

When setting

nixpkgs.config.permittedInsecurePackages

I get

Failed assertions:
- In a flake setup, the options nixpkgs.* should not be
 used. Instead, rely on the provided flake outputs and pass in
 the necessary nixpkgs object

I'm using flakes. The full config can be found at

Gerschtli commented 3 months ago

You need to pass an instance of nixpkgs with your config applied to nixOnDroidConfiguration:

{
    nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
      modules = [ ./nix-on-droid/default.nix ];
      pkgs = import nixpkgs { config.permittedInsecurePackages = ...; };
    };
}
RyanGibb commented 3 months ago

Thank you!