diff --git a/flake.nix b/flake.nix
index bb6fa137..85f498da 100644
--- a/flake.nix
+++ b/flake.nix
@@ -80,18 +80,18 @@
importNgiProjects = {
pkgs ? {},
sources ? {
- configurations = rawNixosConfigurations;
+ examples = rawExamples;
modules = extendedNixosModules;
},
}:
import ./projects {inherit lib pkgs sources;};
- # The above definition reimports `rawNixosConfigurations` and `extendedNixosModules` into `sources`.
+ # The above definition reimports `rawExamples` and `extendedNixosModules` into `sources`.
# As configurations and modules are system-agnostic, they are defined by passing `{}` to `importNgiProjects`.
rawNgiProjects = importNgiProjects {};
- rawNixosConfigurations = flattenAttrsSlash (mapAttrs (_: v: mapAttrs (_: v: v.path) v) (
- mapAttrByPath ["nixos" "configurations"] {} rawNgiProjects
+ rawExamples = flattenAttrsSlash (mapAttrs (_: v: mapAttrs (_: v: v.path) v) (
+ mapAttrByPath ["nixos" "examples"] {} rawNgiProjects
));
rawNixosModules = flattenAttrsDot (lib.foldl recursiveUpdate {} (attrValues (
@@ -107,7 +107,7 @@
extendedNixosConfigurations =
mapAttrs
(_: config: nixosSystem {modules = [config ./dummy.nix] ++ attrValues extendedNixosModules;})
- rawNixosConfigurations;
+ rawExamples;
# Then, define the system-specific outputs.
eachDefaultSystemOutputs = flake-utils.lib.eachDefaultSystem (system: let
diff --git a/overview/default.nix b/overview/default.nix
index e8310676..2ac89e42 100644
--- a/overview/default.nix
+++ b/overview/default.nix
@@ -56,7 +56,7 @@
filter
(option: any ((flip hasPrefix) (dottedLoc option)) spec)
(attrValues options);
- configurations = project: attrValues (project.nixos.configurations or {});
+ examples = project: attrValues (project.nixos.examples or {});
packages = project: attrValues (project.packages or {});
};
@@ -113,20 +113,20 @@
'';
};
- configurations = rec {
- one = configuration: ''
+ examples = rec {
+ one = example: ''
- ${configuration.description}
+ ${example.description}
```nix
- ${readFile configuration.path}
+ ${readFile example.path}
```
'';
- many = configurations:
- optionalString (!empty configurations)
+ many = examples:
+ optionalString (!empty examples)
''
- ${heading 3 "Configurations"}
- ${concatLines (map one configurations)}
+ ${heading 3 "Examples"}
+ ${concatLines (map one examples)}
'';
};
@@ -138,7 +138,7 @@
${render.packages.many (pick.packages project)}
${render.options.many (pick.options project)}
- ${render.configurations.many (pick.configurations project)}
+ ${render.examples.many (pick.examples project)}
'';
many = projects: concatLines (mapAttrsToList one projects);
diff --git a/projects/Kbin/default.nix b/projects/Kbin/default.nix
index 033e12b1..f7eec223 100644
--- a/projects/Kbin/default.nix
+++ b/projects/Kbin/default.nix
@@ -6,9 +6,9 @@
packages = {inherit (pkgs) kbin kbin-frontend kbin-backend;};
nixos = {
modules.services.kbin = ./service.nix;
- configurations = {
+ examples = {
base = {
- path = ./configuration.nix;
+ path = ./example.nix;
description = "Basic configuration, mainly used for testing purposes.";
};
};
diff --git a/projects/Kbin/configuration.nix b/projects/Kbin/example.nix
similarity index 100%
rename from projects/Kbin/configuration.nix
rename to projects/Kbin/example.nix
diff --git a/projects/Kbin/test.nix b/projects/Kbin/test.nix
index 4fa297bf..46d1aa19 100644
--- a/projects/Kbin/test.nix
+++ b/projects/Kbin/test.nix
@@ -20,7 +20,7 @@ in {
sources.modules.default
sources.modules."services.kbin"
sources.modules.unbootable
- sources.configurations."Kbin/base"
+ sources.examples."Kbin/base"
];
unbootable = mkForce false;
diff --git a/projects/Pretalx/default.nix b/projects/Pretalx/default.nix
index 8a200e69..428946d7 100644
--- a/projects/Pretalx/default.nix
+++ b/projects/Pretalx/default.nix
@@ -10,21 +10,21 @@
nixos = {
modules.services.ngi-pretalx = ./service.nix;
tests.pretalx = import ./test args;
- configurations = {
+ examples = {
base = {
- path = ./config/base.nix;
+ path = ./examples/base.nix;
description = ''
Basic configuration for Pretalx, incl. secret management with SOPS, excl. database settings.
'';
};
postgresql = {
- path = ./config/postgresql.nix;
+ path = ./examples/postgresql.nix;
description = ''
Supplementary to `base.nix`, adds database configuration for PostgreSQL.
'';
};
mysql = {
- path = ./config/mysql.nix;
+ path = ./examples/mysql.nix;
description = ''
Supplementary to `base.nix`, adds database configuration for MySQL.
'';
diff --git a/projects/Pretalx/config/base.nix b/projects/Pretalx/examples/base.nix
similarity index 100%
rename from projects/Pretalx/config/base.nix
rename to projects/Pretalx/examples/base.nix
diff --git a/projects/Pretalx/config/mysql.nix b/projects/Pretalx/examples/mysql.nix
similarity index 100%
rename from projects/Pretalx/config/mysql.nix
rename to projects/Pretalx/examples/mysql.nix
diff --git a/projects/Pretalx/config/postgresql.nix b/projects/Pretalx/examples/postgresql.nix
similarity index 100%
rename from projects/Pretalx/config/postgresql.nix
rename to projects/Pretalx/examples/postgresql.nix
diff --git a/projects/Pretalx/test/default.nix b/projects/Pretalx/test/default.nix
index b8fa3c95..1e2c8779 100644
--- a/projects/Pretalx/test/default.nix
+++ b/projects/Pretalx/test/default.nix
@@ -17,8 +17,8 @@ in {
...
}: {
imports = [
- sources.configurations."Pretalx/base"
- sources.configurations."Pretalx/postgresql"
+ sources.examples."Pretalx/base"
+ sources.examples."Pretalx/postgresql"
sources.modules.default
sources.modules."services.ngi-pretalx"
sources.modules.sops-nix