Relatively new to nix. I have a working config, but was unsatisfied with the lack of modularity. I have started attempting to use snowfall-lib as an opinionated layout and I really like it, delivering exactly what I was looking for.
However, I’m getting this error and I have no idea what is going on. My web searches haven’t turned this up anywhere, so I’ve turned to y’all!
error:
Failed assertions:
- Your system configures nixpkgs with an externally created instance. nixpkgs.config options should be passed when creating the instance instead.
Can someone point me in the right direction for what I’ve done wrong somewhere?
Thanks for the ping @K900! This is pretty good timing as I was about to upgrade flake-utils-plus anyway since another bug was fixed. Will get to that shortly.
Thanks all. My repo is here, in a subdirectory for me to play around in without screwing up something that is kinda mostly working.
I’m already effectively doing what you are doing (as I’ve been reading your config files as a model). I am figuring that I mostly locked the nixpkgs repo after the PR indicated above got merged, so bad luck timing. I’ll bet I could update the lock file now that I know the problem, but if you are updating snowfall-lib shortly, I’ll probably just wait.
inputs = {
# unstable packages are used by default
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# also provide stable packages if unstable are breaking
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05";
# home manager for config files and user installs
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# disko handles partitioning and applying disk configurations
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# nix-hardware helps set up machine configs
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# snowfall-lib provides structure to the flake
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;
snowfall = {
# access through the modules will be done through hdwlinux and lib.hdwlinux
namespace = "hdwlinux";
meta = {
name = "hdwlinux";
title = "Half-Dozen Wilsons Linux";
};
};
};
in
lib.mkFlake {
channels-config = {
allowUnfree = true;
};
systems = {
modules = {
nixos = with inputs; [
home-manager.nixosModules.home-manager
disko.nixosModules.disko
];
};
};
};