diff --git a/flake-parts/job-flake-update-clan-core/default.nix b/flake-parts/job-flake-update-clan-core/default.nix deleted file mode 100644 index 9450fd7..0000000 --- a/flake-parts/job-flake-update-clan-core/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - perSystem = - { config - , pkgs - , self' - , ... - }: - let - name = builtins.baseNameOf ./.; - script = config.writers.writePureShellScriptBin - name - [ - pkgs.bash - self'.packages.action-flake-update-pr-clan - ] - '' - bash ${./script.sh} - ''; - in - { - packages.${name} = script; - }; -} diff --git a/flake-parts/job-flake-update-clan-homepage/default.nix b/flake-parts/job-flake-update-clan-homepage/default.nix deleted file mode 100644 index 9450fd7..0000000 --- a/flake-parts/job-flake-update-clan-homepage/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - perSystem = - { config - , pkgs - , self' - , ... - }: - let - name = builtins.baseNameOf ./.; - script = config.writers.writePureShellScriptBin - name - [ - pkgs.bash - self'.packages.action-flake-update-pr-clan - ] - '' - bash ${./script.sh} - ''; - in - { - packages.${name} = script; - }; -} diff --git a/flake-parts/job-flake-update-clan-infra/default.nix b/flake-parts/job-flake-update-clan-infra/default.nix deleted file mode 100644 index 9450fd7..0000000 --- a/flake-parts/job-flake-update-clan-infra/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - perSystem = - { config - , pkgs - , self' - , ... - }: - let - name = builtins.baseNameOf ./.; - script = config.writers.writePureShellScriptBin - name - [ - pkgs.bash - self'.packages.action-flake-update-pr-clan - ] - '' - bash ${./script.sh} - ''; - in - { - packages.${name} = script; - }; -} diff --git a/flake.nix b/flake.nix index 110a605..354d14e 100644 --- a/flake.nix +++ b/flake.nix @@ -41,9 +41,6 @@ inputs.treefmt-nix.flakeModule inputs.clan-core.modules.flake-parts.writers ./devShells/flake-module.nix - ./flake-parts/job-flake-update-clan-core - ./flake-parts/job-flake-update-clan-homepage - ./flake-parts/job-flake-update-clan-infra ./targets/flake-module.nix ./modules/flake-module.nix ./pkgs/flake-module.nix diff --git a/pkgs/flake-module.nix b/pkgs/flake-module.nix index 77db107..b28a0be 100644 --- a/pkgs/flake-module.nix +++ b/pkgs/flake-module.nix @@ -20,6 +20,18 @@ inherit (config.writers) writePureShellScriptBin; inherit (config.packages) action-checkout action-ensure-tea-login action-create-pr action-flake-update; }; + job-flake-update-clan-core = pkgs.callPackage ./job-flake-update-clan-core { + inherit (config.writers) writePureShellScriptBin; + inherit (config.packages) action-flake-update-pr-clan; + }; + job-flake-update-clan-homepage = pkgs.callPackage ./job-flake-update-clan-homepage { + inherit (config.writers) writePureShellScriptBin; + inherit (config.packages) action-flake-update-pr-clan; + }; + job-flake-update-clan-infra = pkgs.callPackage ./job-flake-update-clan-infra { + inherit (config.writers) writePureShellScriptBin; + inherit (config.packages) action-flake-update-pr-clan; + }; }; }; } diff --git a/pkgs/job-flake-update-clan-core/default.nix b/pkgs/job-flake-update-clan-core/default.nix new file mode 100644 index 0000000..dec9077 --- /dev/null +++ b/pkgs/job-flake-update-clan-core/default.nix @@ -0,0 +1,7 @@ +{ bash +, action-flake-update-pr-clan +, writePureShellScriptBin +}: +writePureShellScriptBin "job-flake-update-clan-core" [ bash action-flake-update-pr-clan ] '' + bash ${./script.sh} +'' diff --git a/flake-parts/job-flake-update-clan-core/script.sh b/pkgs/job-flake-update-clan-core/script.sh similarity index 100% rename from flake-parts/job-flake-update-clan-core/script.sh rename to pkgs/job-flake-update-clan-core/script.sh diff --git a/pkgs/job-flake-update-clan-homepage/default.nix b/pkgs/job-flake-update-clan-homepage/default.nix new file mode 100644 index 0000000..7e08117 --- /dev/null +++ b/pkgs/job-flake-update-clan-homepage/default.nix @@ -0,0 +1,10 @@ +{ bash +, action-flake-update-pr-clan +, writePureShellScriptBin +}: +writePureShellScriptBin "job-flake-update-clan-homepage" [ + bash + action-flake-update-pr-clan +] '' + bash ${./script.sh} +'' diff --git a/flake-parts/job-flake-update-clan-homepage/script.sh b/pkgs/job-flake-update-clan-homepage/script.sh similarity index 100% rename from flake-parts/job-flake-update-clan-homepage/script.sh rename to pkgs/job-flake-update-clan-homepage/script.sh diff --git a/pkgs/job-flake-update-clan-infra/default.nix b/pkgs/job-flake-update-clan-infra/default.nix new file mode 100644 index 0000000..b0fd161 --- /dev/null +++ b/pkgs/job-flake-update-clan-infra/default.nix @@ -0,0 +1,10 @@ +{ bash +, action-flake-update-pr-clan +, writePureShellScriptBin +}: +writePureShellScriptBin "job-flake-update-clan-infra" [ + bash + action-flake-update-pr-clan +] '' + bash ${./script.sh} +'' diff --git a/flake-parts/job-flake-update-clan-infra/script.sh b/pkgs/job-flake-update-clan-infra/script.sh similarity index 100% rename from flake-parts/job-flake-update-clan-infra/script.sh rename to pkgs/job-flake-update-clan-infra/script.sh