mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 11:44:31 +00:00
chore(nix): add support for flakes
This commit is contained in:
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741445498,
|
||||||
|
"narHash": "sha256-F5Em0iv/CxkN5mZ9hRn3vPknpoWdcdCyR0e4WklHwiE=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "52e3095f6d812b91b22fb7ad0bfc1ab416453634",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
35
flake.nix
Normal file
35
flake.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
description = "Flake for github:Infisical/infisical repository.";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }: {
|
||||||
|
devShells.aarch64-darwin.default = let
|
||||||
|
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
git
|
||||||
|
lazygit
|
||||||
|
|
||||||
|
nodejs_20
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
# Define a writable directory for global npm packages
|
||||||
|
export NPM_CONFIG_PREFIX="$HOME/.npm-global"
|
||||||
|
export PATH="$NPM_CONFIG_PREFIX/bin:$PATH"
|
||||||
|
|
||||||
|
# Ensure the directory exists
|
||||||
|
mkdir -p "$NPM_CONFIG_PREFIX"
|
||||||
|
|
||||||
|
# Install Infisical CLI only if it's not already installed
|
||||||
|
if ! command -v infisical &>/dev/null; then
|
||||||
|
npm install -g @infisical/cli
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user