···67Try it with:
8009```
10-nix-build -A flake.nixosConfigurations.igloo.config.system.build.toplevel
11-```
1213-NOTE: Currently Den needs a top-level attribute where to place configurations,
14-by default it is the `flake` attribute, even if Den uses no flake-parts at all.
000
···67Try it with:
89+```shell
10+nixos-rebuild build --file . -A nixosConfigurations.igloo
11```
001213+or
14+15+```shell
16+nix-build -A nixosConfigurations.igloo.config.system.build.toplevel
17+```
···1let
20000003 outputs =
4 inputs:
5 (inputs.nixpkgs.lib.evalModules {
6+ modules = [ (inputs.import-tree ./modules) ];
7 specialArgs = {
8 inherit inputs;
9 inherit (inputs) self;
···11 }).config;
1213in
14+# Den outputs configurations at flake top-level attr
15+# even when it does not depend on flakes or flake-parts.
16+(import ./with-inputs.nix outputs).flake
+11
templates/noflake/modules/compat.nix
···00000000000
···1+{ inputs, lib, ... }:
2+{
3+ # we can import this flakeModule even if we dont have flake-parts as input!
4+ imports = [ inputs.den.flakeModule ];
5+6+ # NOTE: Currently Den needs a top-level attribute where to place configurations,
7+ # by default it is the `flake` attribute, even if Den uses no flake-parts at all.
8+ options.flake = lib.mkOption {
9+ type = lib.types.submodule { freeformType = lib.types.anything; };
10+ };
11+}
+35-9
templates/noflake/modules/den.nix
···1-{ inputs, lib, ... }:
2{
3- # we can import this flakeModule even if we dont
4- # have flake-parts as input!
5- imports = [ inputs.den.flakeModule ];
6-7- # for flake.nixosConfigurations output.
8- # create a freeform option for it
9- options.flake = lib.mkOption {
10- type = lib.types.submodule { freeformType = lib.types.anything; };
0000000000000000000000000011 };
12}