nix-community / flake-firefox-nightly

this provides an auto-updating flake for firefox-nightly-bin from nixpkgs-mozilla [maintainer=@colemickens, @Artturin]
53 stars 7 forks source link

How to use it? #4

Closed alienzj closed 2 years ago

alienzj commented 2 years ago

Dear @colemickens,

Thanks for your great work. May I know to use it?

I add it into flake.nix:

firefox-nightly = {
  URL = "github:colemickens/flake-firefox-nightly";
  inputs.nixpkgs.follows = "nixpkgs";
};

then do something like below:

home.packages = with pkgs; [
  firefox-nightly-bin
];

then I got:

warning: Git tree '/home/alienzj/.dotfiles' is dirty
warning: input 'nur' has an override for a non-existent input 'nixpkgs'
error: undefined variable 'firefox-nightly-bin'

       at /nix/store/ppgagam7lklwp0f5hhj29rm08y6rj1vz-source/home/modules/browser/default.nix:51:5:

           50|     #latest.firefox-nightly-bin
           51|     firefox-nightly-bin
             |     ^
           52|   ];
(use '--show-trace' to show detailed location information)
colemickens commented 2 years ago

You would need to pass your inputs into your configuration via specialArgs and then access it like:

{ pkgs, inputs, config, ... }:
{
  config = {
    environment.systemPackages = [
      inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin
    ];
  };
}