ehllie / ez-configs

A flake-parts module for simple nixos, darwin and home-manager configurations using project directory structure
Mozilla Public License 2.0
59 stars 13 forks source link

Per host nixpkgs config? #14

Closed lpchaim closed 2 months ago

lpchaim commented 2 months ago

Just started toying with this and I'm wondering if it's possible to set a custom pkgs instance for each host. My use case is I'd like to set nixpkgs options like allowUnfree or cudaSupport at the host level. If it's not supported, would a PR implementing something similar to the existing standalone home pkgs override for nixos configurations be welcome? I'm thinking ezConfigs.nixos.hosts.<name>.pkgs, perhaps with an optional ezConfigs.pkgs defaulting to the current behavior to use as a default.

On that note, what's the usual way to set options such as these at all? Say, just setting allowUnfree globally, for instance. I can't seem to figure it out on my own, maybe because I'm also new to flake-parts as a whole :sweat_smile:

lpchaim commented 2 months ago

I just realized you can easily tweak that by setting nixpkgs.config in a module or wherever else. My coming from snowfall-lib made me think it wouldn't work, because last I checked that didn't work there.