forked from DGNum/colmena
eval.nix: expose nixosModules.deploymentOptions (#49)
Allow flake users to import .#nixosModules.deploymentOptions into their flake, so that the same expression can be used for both, .#colmena.$host as well as .#nixosConfiguration.$host, without the latter complaining about undefined options in "deployment".
This commit is contained in:
parent
f4896aad39
commit
5b8971a0f4
2 changed files with 6 additions and 3 deletions
|
@ -16,6 +16,9 @@
|
|||
|
||||
outputs = { self, nixpkgs, utils, nix-eval-jobs, ... }: let
|
||||
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
evalNix = import ./src/nix/hive/eval.nix {
|
||||
hermetic = true;
|
||||
};
|
||||
in utils.lib.eachSystem supportedSystems (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
@ -30,9 +33,6 @@
|
|||
# Full user manual
|
||||
manual = let
|
||||
colmena = self.packages.${system}.colmena;
|
||||
evalNix = import ./src/nix/hive/eval.nix {
|
||||
hermetic = true;
|
||||
};
|
||||
deploymentOptionsMd = (pkgs.nixosOptionsDoc {
|
||||
options = evalNix.docs.deploymentOptions pkgs;
|
||||
}).optionsCommonMark;
|
||||
|
@ -75,5 +75,6 @@
|
|||
overlay = final: prev: {
|
||||
colmena = final.callPackage ./package.nix { };
|
||||
};
|
||||
inherit (evalNix) nixosModules;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -524,6 +524,8 @@ in {
|
|||
|
||||
meta = hive.meta;
|
||||
|
||||
nixosModules = { inherit deploymentOptions; };
|
||||
|
||||
docs = {
|
||||
deploymentOptions = pkgs: let
|
||||
eval = pkgs.lib.evalModules {
|
||||
|
|
Loading…
Reference in a new issue