HI,
I’m trying to install new addons to my firefox home-manager config that aren’t available in the NUR. I found this repo with an implementation but can’t reproduce it in my current config.
This is my current flake.nix:
{
description = "My dotfiles";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
arkenfox = {
url = "github:dwarfmaster/arkenfox-nixos";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
nixos-hardware,
sops-nix,
home-manager,
firefox-addons,
stylix,
arkenfox,
}: let
system = "x86_64-linux";
sharedModules = [
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
# arkenfox.hmModules.default
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.stew.imports = [
./nixos/home-manager/home.nix
];
extraSpecialArgs = {inherit inputs;};
};
}
];
in {
nixosConfigurations.nixtop = nixpkgs.lib.nixosSystem {
modules =
[
./nixos/nixtop
]
++ sharedModules;
};
};
}
I copied the overlays.nix from the repo and added the addons.nix. My current adjusted flake.nix looks like this:
newflakes.nix
{
description = "My dotfiles";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
arkenfox = {
url = "github:dwarfmaster/arkenfox-nixos";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
nixos-hardware,
sops-nix,
home-manager,
firefox-addons,
stylix,
arkenfox,
}: let
system = "x86_64-linux";
overlays = import ./lib/overlays.nix { inherit inputs system; };
pkgs = import inputs.nixpkgs {
inherit overlays system;
config.allowUnfree = true;
};
sharedModules = [
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
# arkenfox.hmModules.default
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.stew.imports = [
./nixos/home-manager/home.nix
];
extraSpecialArgs = {inherit inputs overlays;};
};
}
];
in {
nixosConfigurations.nixtop = nixpkgs.lib.nixosSystem {
modules =
[
./nixos/nixtop
]
++ sharedModules;
};
out = { inherit pkgs overlays; };
};
}
Now, I get the following error while building:
error: attribute 'buildFirefoxXpiAddon' missing
at /nix/store/6951a8rh9cc179a204g4mb5gx7zh6sfv-source/nixos/home-manager/browser.nix:641:52:
640|
641| customAddons = pkgs.callPackage ./addons.nix {
| ^
642| inherit lib;
But I added buildFirefoxXpiAddon
as inputs:
browser.nix:
{
config,
pkgs,
inputs,
# arkenfox,
lib,
specialArgs,
system,
buildFirefoxXpiAddon,
...
}: {
...
customAddons = pkgs.callPackage ./addons.nix {
inherit lib;
inherit (specialArgs) buildFirefoxXpiAddon;
};
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
ublock-origin
] ++ (with customAddons; [ newAddon ]);
}