Initial commit
This commit is contained in:
commit
cfcc57a8bd
353 changed files with 18756 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
# A custom `nixos` class module that defines an option `names`.
|
||||
# Used to test that we are not duplicating values from owned configs.
|
||||
nixosNames = names: { options.${names} = lib.mkOption { type = lib.types.listOf lib.types.str; }; };
|
||||
in
|
||||
{
|
||||
den.default.nixos.imports = [ (nixosNames "people") ];
|
||||
den.default.includes = [
|
||||
(
|
||||
{ user, ... }:
|
||||
{
|
||||
nixos.people = [ user.name ];
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
den.aspects.rockhopper.includes = [
|
||||
# Example: importing a third-party nixos module.
|
||||
{ nixos.imports = [ (nixosNames "names") ]; }
|
||||
];
|
||||
|
||||
den.aspects.rockhopper.nixos.names = [ "tux" ];
|
||||
|
||||
perSystem =
|
||||
{ checkCond, rockhopper, ... }:
|
||||
{
|
||||
checks.rockhopper-default-people = checkCond "set from den.default for each user" (
|
||||
rockhopper.config.people == [ "alice" ]
|
||||
);
|
||||
checks.rockhopper-names-single-entry = checkCond "custom nixos array option set once" (
|
||||
rockhopper.config.names == [ "tux" ]
|
||||
);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue