nix: use self'.packages as a default in module

this allows for the module to always work when only importing it from
the flake. if you want to make sure you aren't duplicating nixpkgs
inputs, the `nixpkgs` input of this flake should be overriden, or
`services.refraction.package` should be set to an overlayed version of
refraction (i.e., `pkgs.refraction` after setting `nixpkgs.overlays =
[ inputs.refraction.overlays.default ]`)
This commit is contained in:
seth 2024-03-31 20:01:48 -04:00
parent dfa4d66654
commit a8d6a2b8d7
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86

View file

@ -23,7 +23,7 @@ in {
options.services.refraction = { options.services.refraction = {
enable = mkEnableOption "refraction"; enable = mkEnableOption "refraction";
package = mkPackageOption ( package = mkPackageOption (
withSystem pkgs.stdenv.hostPlatform.system ({pkgs, ...}: pkgs) withSystem pkgs.stdenv.hostPlatform.system ({self', ...}: self'.packages)
) "refraction" {}; ) "refraction" {};
user = mkOption { user = mkOption {