forked from clan/clan-infra
move devShells out of flake-parts
This commit is contained in:
parent
e82b24d97f
commit
0cd4e97472
@ -1,9 +1,7 @@
|
||||
{
|
||||
perSystem =
|
||||
{ inputs'
|
||||
, lib
|
||||
, pkgs
|
||||
, self'
|
||||
, ...
|
||||
}: {
|
||||
devShells.default = pkgs.mkShell {
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
perSystem =
|
||||
{ config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
name = builtins.baseNameOf ./.;
|
||||
script = config.writers.writePureShellScriptBin
|
||||
name
|
||||
[
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
pkgs.git
|
||||
pkgs.openssh
|
||||
]
|
||||
''
|
||||
bash ${./script.sh}
|
||||
'';
|
||||
in
|
||||
{
|
||||
packages.${name} = script;
|
||||
};
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
perSystem =
|
||||
{ config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
name = builtins.baseNameOf ./.;
|
||||
script = config.writers.writePureShellScriptBin
|
||||
name
|
||||
[
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
pkgs.git
|
||||
pkgs.tea
|
||||
pkgs.openssh
|
||||
]
|
||||
''
|
||||
bash ${./script.sh} "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
packages.${name} = script;
|
||||
};
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
perSystem =
|
||||
{ config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
name = builtins.baseNameOf ./.;
|
||||
script = config.writers.writePureShellScriptBin
|
||||
name
|
||||
[
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
pkgs.tea
|
||||
]
|
||||
''
|
||||
bash ${./script.sh}
|
||||
'';
|
||||
in
|
||||
{
|
||||
packages.${name} = script;
|
||||
};
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
perSystem =
|
||||
{ config
|
||||
, pkgs
|
||||
, self'
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
name = builtins.baseNameOf ./.;
|
||||
script = config.writers.writePureShellScriptBin
|
||||
name
|
||||
[
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
self'.packages.action-checkout
|
||||
self'.packages.action-ensure-tea-login
|
||||
self'.packages.action-create-pr
|
||||
self'.packages.action-flake-update
|
||||
]
|
||||
''
|
||||
bash ${./script.sh}
|
||||
'';
|
||||
in
|
||||
{
|
||||
packages.${name} = script;
|
||||
};
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
perSystem =
|
||||
{ config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
name = builtins.baseNameOf ./.;
|
||||
script = config.writers.writePureShellScriptBin
|
||||
name
|
||||
[
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
pkgs.git
|
||||
pkgs.nix
|
||||
]
|
||||
''
|
||||
bash ${./script.sh}
|
||||
'';
|
||||
in
|
||||
{
|
||||
packages.${name} = script;
|
||||
};
|
||||
}
|
11
flake.nix
11
flake.nix
@ -32,7 +32,7 @@
|
||||
};
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ ... }: {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
@ -40,12 +40,7 @@
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
inputs.clan-core.modules.flake-parts.writers
|
||||
./flake-parts/action-checkout
|
||||
./flake-parts/action-create-pr
|
||||
./flake-parts/action-ensure-tea-login
|
||||
./flake-parts/action-flake-update
|
||||
./flake-parts/action-flake-update-pr-clan
|
||||
./flake-parts/devShells
|
||||
./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
|
||||
@ -54,7 +49,7 @@
|
||||
./pkgs/flake-module.nix
|
||||
./pkgs/clan-merge/flake-module.nix
|
||||
];
|
||||
perSystem = { pkgs, inputs', ... }: {
|
||||
perSystem = { ... }: {
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.terraform.enable = true;
|
||||
|
9
pkgs/action-checkout/default.nix
Normal file
9
pkgs/action-checkout/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ bash
|
||||
, coreutils
|
||||
, git
|
||||
, openssh
|
||||
, writePureShellScriptBin
|
||||
}:
|
||||
writePureShellScriptBin "action-checkout" [ bash coreutils git openssh ] ''
|
||||
bash ${./script.sh}
|
||||
''
|
10
pkgs/action-create-pr/default.nix
Normal file
10
pkgs/action-create-pr/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ bash
|
||||
, coreutils
|
||||
, git
|
||||
, tea
|
||||
, openssh
|
||||
, writePureShellScriptBin
|
||||
}:
|
||||
writePureShellScriptBin "action-create-pr" [ bash coreutils git tea openssh ] ''
|
||||
bash ${./script.sh}
|
||||
''
|
8
pkgs/action-ensure-tea-login/default.nix
Normal file
8
pkgs/action-ensure-tea-login/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ bash
|
||||
, coreutils
|
||||
, tea
|
||||
, writePureShellScriptBin
|
||||
}:
|
||||
writePureShellScriptBin "action-ensure-tea-login" [ bash coreutils tea ] ''
|
||||
bash ${./script.sh}
|
||||
''
|
18
pkgs/action-flake-update-pr-clan/default.nix
Normal file
18
pkgs/action-flake-update-pr-clan/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ bash
|
||||
, coreutils
|
||||
, action-checkout
|
||||
, action-ensure-tea-login
|
||||
, action-create-pr
|
||||
, action-flake-update
|
||||
, writePureShellScriptBin
|
||||
}:
|
||||
writePureShellScriptBin "action-flake-update-pr-clan" [
|
||||
bash
|
||||
coreutils
|
||||
action-checkout
|
||||
action-ensure-tea-login
|
||||
action-create-pr
|
||||
action-flake-update
|
||||
] ''
|
||||
bash ${./script.sh}
|
||||
''
|
9
pkgs/action-flake-update/default.nix
Normal file
9
pkgs/action-flake-update/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ bash
|
||||
, coreutils
|
||||
, git
|
||||
, nix
|
||||
, writePureShellScriptBin
|
||||
}:
|
||||
writePureShellScriptBin "action-flake-update" [ bash coreutils git nix ] ''
|
||||
bash ${./script.sh}
|
||||
''
|
@ -1,9 +1,25 @@
|
||||
{ lib, ... }: {
|
||||
perSystem = { pkgs, inputs', ... }: {
|
||||
{ ... }: {
|
||||
perSystem = { pkgs, config, ... }: {
|
||||
packages = {
|
||||
inherit (pkgs.callPackage ./renovate { }) renovate;
|
||||
} // lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
|
||||
gitea = pkgs.callPackage ./gitea { };
|
||||
|
||||
action-checkout = pkgs.callPackage ./action-checkout {
|
||||
inherit (config.writers) writePureShellScriptBin;
|
||||
};
|
||||
action-create-pr = pkgs.callPackage ./action-create-pr {
|
||||
inherit (config.writers) writePureShellScriptBin;
|
||||
};
|
||||
action-ensure-tea-login = pkgs.callPackage ./action-ensure-tea-login {
|
||||
inherit (config.writers) writePureShellScriptBin;
|
||||
};
|
||||
action-flake-update = pkgs.callPackage ./action-flake-update {
|
||||
inherit (config.writers) writePureShellScriptBin;
|
||||
};
|
||||
action-flake-update-pr-clan = pkgs.callPackage ./action-flake-update-pr-clan {
|
||||
inherit (config.writers) writePureShellScriptBin;
|
||||
inherit (config.packages) action-checkout action-ensure-tea-login action-create-pr action-flake-update;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user