I’m currently moving from channels to flakes and would like to be able to import a package from a fork of NixOS/nixpkags (being modified prior to being updated). However I’m not able to figure out the magic incantation.
akgrant43 is the forked nixpkgs repository. The derivation is at pkgs/development/tools/glamoroustoolkit
, and is listed in all-packages.nix
.
I’ve tried multiple different combinations based on earlier posts from here (discourse) and StackOverflow, but no luck. My latest attempt is following Getting inputs to modules in a nix-flake with the following:
{
description = "akg laptop configuration";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/release-23.05";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
};
akgrant43 = {
url = "github:akgrant43/nixpkgs/main";
};
};
# Outputs can be anything, but the wiki + some commands define their own
# specific keys. Wiki page: https://nixos.wiki/wiki/Flakes#Output_schema
outputs = { self, nixpkgs, nixos-hardware, akgrant43 }@inputs: {
nixosConfigurations = {
akg230611 = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
nixos-hardware.nixosModules.dell-precision-3541
./configuration.nix
];
};
};
};
}
configuration.nix is fairly long, but the relevant piece is:
{ config, pkgs, inputs, ... }:
{
# snip
environment.systemPackages = [
inputs.akgrant43.packages.${pkgs.system}.glamoroustoolkit
];
# snip
}
which results in:
error: attribute 'packages' missing
at /nix/store/knp8yhr6zfl2c96lx2vw7sw1cwd1b6v1-source/akg230611/nixos/configuration.nix:133:5:
132| environment.systemPackages = [
133| inputs.akgrant43.packages.${pkgs.system}.glamoroustoolkit
| ^
134| ];
(use '--show-trace' to show detailed location information)
What am I doing wrong?
Thanks,
Alistair