aboutsummaryrefslogtreecommitdiff
path: root/www/flake-module.nix
diff options
context:
space:
mode:
authorValentin <valentin@fricklerhandwerk.de>2025-12-20 18:22:27 +0100
committerValentin <valentin@fricklerhandwerk.de>2025-12-20 18:22:27 +0100
commit8b0a011c7c37d882a2e12ea8de38acaa9e782d38 (patch)
tree2daea25b800a0733baa6f45fd71afcadf02a9ffc /www/flake-module.nix
parent9a5020deaed97df8ab1307068f34a382b2e24b31 (diff)
parent0efd609dd832b11c4e4e20c008edc1cc52dbfbd9 (diff)
Merge branch 'nix-html'
HTML werden ab jetzt aus Nix-modulen generiert.
Diffstat (limited to 'www/flake-module.nix')
-rw-r--r--www/flake-module.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/www/flake-module.nix b/www/flake-module.nix
new file mode 100644
index 0000000..880b395
--- /dev/null
+++ b/www/flake-module.nix
@@ -0,0 +1,46 @@
+{
+ self,
+ config,
+ lib,
+ flake-parts-lib,
+ ...
+}:
+let
+ inherit (lib)
+ filterAttrs
+ mapAttrs
+ mkOption
+ optionalAttrs
+ types
+ ;
+ inherit (flake-parts-lib)
+ mkSubmoduleOptions
+ mkPerSystemOption
+ ;
+in
+{
+ options = {
+ flake = mkSubmoduleOptions {
+ websites = mkOption { };
+ };
+
+ perSystem = mkPerSystemOption (
+ { pkgs, ... }:
+ {
+ _file = ./option.nix;
+ options = {
+ websites = mkOption {
+ type =
+ with types;
+ lazyAttrsOf (submoduleWith {
+ specialArgs = { inherit pkgs; };
+ modules = [ ./framework ];
+ });
+ };
+ };
+ }
+ );
+ };
+
+ config.transposition.websites = { };
+}