Compare commits
5 Commits
d47394d4cc
...
c1bfa64cc8
| Author | SHA1 | Date | |
|---|---|---|---|
| c1bfa64cc8 | |||
| 235cd297c5 | |||
| 0c91b1d493 | |||
| 9825270d64 | |||
| ee9573fc97 |
@@ -29,8 +29,10 @@
|
|||||||
perSystem = { system, pkgs, self', ... }: {
|
perSystem = { system, pkgs, self', ... }: {
|
||||||
packages.shell-tools = inputs.wrappers.lib.wrapPackage {
|
packages.shell-tools = inputs.wrappers.lib.wrapPackage {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
# binName = "show-tools";
|
||||||
package = (pkgs.symlinkJoin {
|
package = (pkgs.symlinkJoin {
|
||||||
name = "shell-tools";
|
name = "show-tools";
|
||||||
|
meta.mainProgram = "show-tools";
|
||||||
paths = with pkgs; [
|
paths = with pkgs; [
|
||||||
nh
|
nh
|
||||||
ripgrep
|
ripgrep
|
||||||
@@ -44,6 +46,19 @@
|
|||||||
hostname
|
hostname
|
||||||
iproute2
|
iproute2
|
||||||
direnv
|
direnv
|
||||||
|
(writeShellApplication {
|
||||||
|
name = "show-tools";
|
||||||
|
text = ''
|
||||||
|
IFS=':' read -r -a path_dirs <<< "''${PATH:-}"
|
||||||
|
|
||||||
|
for dir in "''${path_dirs[@]}"; do
|
||||||
|
[[ "$dir" == */bin ]] || continue
|
||||||
|
[[ -d "$dir" ]] || continue
|
||||||
|
|
||||||
|
printf '%s\n' "$dir"/*
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
})
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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}"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -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";
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ let
|
|||||||
bindkey "^[[8~" end-of-line
|
bindkey "^[[8~" end-of-line
|
||||||
bindkey "^[OH" beginning-of-line
|
bindkey "^[OH" beginning-of-line
|
||||||
bindkey "^[OF" end-of-line
|
bindkey "^[OF" end-of-line
|
||||||
|
bindkey "^[[3~" delete-char
|
||||||
|
|
||||||
# Normalize common Ctrl+Arrow sequences for word-wise movement.
|
# Normalize common Ctrl+Arrow sequences for word-wise movement.
|
||||||
bindkey "^[[1;5D" backward-word
|
bindkey "^[[1;5D" backward-word
|
||||||
@@ -125,9 +126,7 @@ in
|
|||||||
extraRC = ''
|
extraRC = ''
|
||||||
${homeEndKeyBindings}
|
${homeEndKeyBindings}
|
||||||
|
|
||||||
eval "$(direnv hook zsh)"
|
HISTFILE=$HOME/.config/zsh/.zsh_history
|
||||||
|
|
||||||
HISTFILE=$HOME/.zsh_history
|
|
||||||
HISTORY_IGNORE=${lib.escapeShellArg "(${lib.concatStringsSep "|" ignorePatterns})"}
|
HISTORY_IGNORE=${lib.escapeShellArg "(${lib.concatStringsSep "|" ignorePatterns})"}
|
||||||
|
|
||||||
HOSTNAME=$(hostname -s)
|
HOSTNAME=$(hostname -s)
|
||||||
|
|||||||
Reference in New Issue
Block a user