mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix: shell
This commit is contained in:
parent
f273357a4f
commit
69a47e6734
3 changed files with 11 additions and 13 deletions
|
|
@ -2,7 +2,7 @@
|
|||
inputs,
|
||||
system,
|
||||
}: let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
inherit (inputs.self.legacyPackages.${system}) pkgs;
|
||||
nf-actions = pkgs.writeShellScriptBin "nf-actions" ''
|
||||
NF_CONFIG_FILES=($NF_CONFIG_ROOT/ci/{nodes,flake-cron}.nix)
|
||||
for f in "''${NF_CONFIG_FILES[@]}"; do
|
||||
|
|
@ -60,6 +60,10 @@
|
|||
nf-argocd = pkgs.writeShellScriptBin "argocd" ''
|
||||
exec nix run ''${FLAKE_OPTS-} "$NF_CONFIG_ROOT#pkgs.argocd" -- "$@"
|
||||
'';
|
||||
nf-deploy-rs = pkgs.writeShellScriptBin "deploy" ''
|
||||
cd "$NF_CONFIG_ROOT"
|
||||
exec nix shell ''${FLAKE_OPTS-} "$NF_CONFIG_ROOT#deploy-rs" -c deploy "$@"
|
||||
'';
|
||||
in
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
|
|
@ -78,7 +82,7 @@ in
|
|||
nf-deadnix
|
||||
nf-kustomize
|
||||
nf-argocd
|
||||
deploy-rs
|
||||
nf-deploy-rs
|
||||
];
|
||||
shellHook = ''
|
||||
export NIX_BIN_DIR=$(dirname $(readlink -f $(type -P nix)))
|
||||
|
|
|
|||
11
outputs.nix
11
outputs.nix
|
|
@ -15,15 +15,12 @@
|
|||
inherit inputs lib std pkgs;
|
||||
tree = tree.impure;
|
||||
};
|
||||
shells =
|
||||
outputs =
|
||||
inputs.flake-utils.lib.eachDefaultSystem
|
||||
(system: rec {
|
||||
devShells.default = import ./devShell.nix {inherit system inputs;};
|
||||
});
|
||||
packages =
|
||||
inputs.flake-utils.lib.eachDefaultSystem
|
||||
(system: rec {
|
||||
packages = import ./packages {inherit system inputs lib;};
|
||||
legacyPackages.pkgs = pkgs.${system};
|
||||
});
|
||||
std = import ./std.nix {inherit inputs;};
|
||||
inherit (std) set;
|
||||
|
|
@ -32,8 +29,6 @@ in
|
|||
{
|
||||
inherit tree std lib checks;
|
||||
inputs = patchedInputs;
|
||||
legacyPackages = pkgs;
|
||||
}
|
||||
// systems
|
||||
// shells
|
||||
// packages
|
||||
// outputs
|
||||
|
|
|
|||
|
|
@ -3,18 +3,17 @@
|
|||
inputs,
|
||||
lib,
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) attrsOf package;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.strings) concatStringsSep concatMapStringsSep;
|
||||
packages = inputs.self.packages.${system};
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
inherit (inputs.self.legacyPackages.${system}) pkgs;
|
||||
fmt = import ../ci/fmt.nix;
|
||||
output = {
|
||||
inherit (pkgs.buildPackages)
|
||||
terraform tflint
|
||||
alejandra deadnix statix
|
||||
;
|
||||
inherit (inputs.deploy-rs.packages.${system}) deploy-rs;
|
||||
nf-deploy = pkgs.writeShellScriptBin "nf-deploy" ''
|
||||
exec ${pkgs.runtimeShell} ${../ci/deploy.sh} "$@"
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue