nix-config/modules/common/default.nix
Bruno BELANYI 033b0e8a57 common: add profiles
I will be migrating each sub-module one by one.
2025-07-07 15:08:03 +00:00

28 lines
563 B
Nix

# Modules that are common to various module systems
# Usually with very small differences, if any, between them.
{ lib, _class, ... }:
let
allowedClass = [
"darwin"
"homeManager"
"nixos"
];
allowedClassString = lib.concatStringSep ", " (builtins.map lib.escapeNixString allowedClass);
in
{
imports = [
./profiles
];
config = {
assertions = [
{
assertion = builtins.elem _class allowedClass;
message = ''
`_class` specialArgs must be one of ${allowedClassString}.
'';
}
];
};
}