aboutsummaryrefslogtreecommitdiff
path: root/www/flake-module.nix
diff options
context:
space:
mode:
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 = { };
+}