hi there,
i’m having a bit of trouble figuring out how to import a module.
in particular, i made a flake.nix
as a dev project for terranix.
minimum repro:
# flake.nix
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs";
sops-nix.url = "github:mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs";
terranix.url = "github:terranix/terranix";
terranix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { flake-utils, terranix, sops-nix, ... }:
flake-utils.lib.eachDefaultSystem (system:
let tfConfig = terranix.lib.terranixConfiguration {
inherit system; modules = [ sops-nix.nixosModules.sops ];
}; in { defaultApp = { type = "app"; program = "ls ${tfConfig}"; }; });
}
running nix run
, this would yield:
error: attribute 'services' missing
i tried swapping out the sops-nix.nixosModules.sops
for sops-nix.homeManagerModules.sops
, but this instead just got me a:
error: The option `assertions' does not exist
my points of confusion include:
- is this even supposed to work? provided modules seem either for system or home-manager, but this flake is technically neither.
- if so, which one to import?
- did i pick the right place to import?