[packages] make scripts available in shell without nix run
This commit is contained in:
@@ -20,6 +20,7 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
let
|
||||
sops = sops-nix.packages."${pkgs.system}";
|
||||
microvmpkg = microvm.packages."${pkgs.system}";
|
||||
installed = builtins.attrNames self.packages."${pkgs.system}".scripts;
|
||||
in
|
||||
pkgs.mkShell {
|
||||
sopsPGPKeyDirs = [
|
||||
@@ -37,11 +38,13 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
pkgs.mdbook
|
||||
microvmpkg.microvm
|
||||
];
|
||||
packages = builtins.map (pkgName: self.packages."${pkgs.system}".scripts.${pkgName}) installed;
|
||||
shellHook = ''echo "Available scripts: ${builtins.concatStringsSep " " installed}"'';
|
||||
};
|
||||
|
||||
packages = {
|
||||
remote-install = pkgs.writeShellScriptBin "remote-install" (builtins.readFile ./scripts/remote-install-encrypt.sh);
|
||||
boot-unlock = pkgs.writeShellScriptBin "boot-unlock" (builtins.readFile ./scripts/unlock-boot.sh);
|
||||
scripts.remote-install = pkgs.writeShellScriptBin "remote-install" (builtins.readFile ./scripts/remote-install-encrypt.sh);
|
||||
scripts.boot-unlock = pkgs.writeShellScriptBin "boot-unlock" (builtins.readFile ./scripts/unlock-boot.sh);
|
||||
docs = pkgs.stdenv.mkDerivation {
|
||||
name = "malobeo-docs";
|
||||
phases = [ "buildPhase" ];
|
||||
|
||||
Reference in New Issue
Block a user