step-bootstrap

This commit is contained in:
John Lancaster
2026-04-19 15:45:06 -05:00
parent 235cd297c5
commit c1bfa64cc8
4 changed files with 59 additions and 16 deletions
+1
View File
@@ -32,6 +32,7 @@
# binName = "show-tools"; # binName = "show-tools";
package = (pkgs.symlinkJoin { package = (pkgs.symlinkJoin {
name = "show-tools"; name = "show-tools";
meta.mainProgram = "show-tools";
paths = with pkgs; [ paths = with pkgs; [
nh nh
ripgrep ripgrep
+51
View File
@@ -0,0 +1,51 @@
{ self, inputs, ... }:
let
bootstrapWrapper = inputs.wrappers.lib.wrapModule ({config, lib, wlib, ... }: {
options = {
caURL = lib.mkOption {
type = lib.types.str;
};
fingerprint = lib.mkOption {
type = lib.types.str;
};
install = lib.mkEnableOption "Install the cert to the system trust store";
};
config = {
package = config.pkgs.step-cli; # (1)!
binName = "bootstrap";
args = [
"ca" "bootstrap"
"--ca-url" config.caURL
"--fingerprint" config.fingerprint
];
};
});
in
{
perSystem = { system, self', pkgs, lib, ... }: {
packages.step-client = inputs.wrappers.lib.wrapPackage {
inherit pkgs;
package = (pkgs.symlinkJoin {
name = "step";
meta.mainProgram = "step";
paths = with pkgs; [
self'.packages.step-bootstrap
];
});
};
packages.step-bootstrap = (bootstrapWrapper.apply {
inherit pkgs;
caURL = "https://janus.john-stream.com";
fingerprint = "2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6";
install = true;
}).wrapper;
};
flake.modules.homeManager.myStepClient = { config, pkgs, lib, ... }: {
home.packages = [
inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.step-bootstrap
];
};
}
-12
View File
@@ -94,16 +94,4 @@ in
} }
]; ];
}; };
perSystem = { system, pkgs, lib, ... }: {
packages.janus-ca = inputs.wrappers.lib.wrapPackage {
inherit pkgs;
package = pkgs.step-cli;
binName = "janus-cert";
args = [
"ca" "certificate"
"--ca-url=${ca-url}"
];
};
};
} }
+7 -4
View File
@@ -32,6 +32,8 @@ in
restic restic
docker docker
desktop desktop
# sshCerts
# myStepClient
]; ];
# TODO: make this more restrictive, rather than allowing all unfree packages # TODO: make this more restrictive, rather than allowing all unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@@ -44,10 +46,11 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
nixos-rebuild nixos-rebuild
test-push test-push
selfPkgs.neovim-min selfPkgs.jsl-zsh
# ${selfPkgs}.my-neovim selfPkgs.my-neovim
# selfPkgs.richPrinter selfPkgs.step-client
selfPkgs.janus-ca # selfPkgs.wg-platform
# self'.packages.myWrappedPackage
]; ];
shell.program = "zsh"; shell.program = "zsh";