Merge pull request #192 from hercules-ci/moduleLocation

moduleLocation, but also automatic
This commit is contained in:
Robert Hensing 2023-10-29 12:23:28 +01:00 committed by GitHub
commit 25abf6caa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 12 deletions

View file

@ -1,4 +1,4 @@
{ self, lib, flake-parts-lib, ... }:
{ self, lib, flake-parts-lib, moduleLocation, ... }:
let
inherit (lib)
mapAttrs
@ -15,7 +15,7 @@ in
nixosModules = mkOption {
type = types.lazyAttrsOf types.unspecified;
default = { };
apply = mapAttrs (k: v: { _file = "${toString self.outPath}/flake.nix#nixosModules.${k}"; imports = [ v ]; });
apply = mapAttrs (k: v: { _file = "${toString moduleLocation}#nixosModules.${k}"; imports = [ v ]; });
description = ''
NixOS modules.