mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-23 01:49:08 +01:00
Compare commits
2 commits
b94ff46b24
...
ed070e6abe
| Author | SHA1 | Date | |
|---|---|---|---|
| ed070e6abe | |||
| 0f69eb0355 |
4 changed files with 17 additions and 10 deletions
|
|
@ -29,8 +29,8 @@ _: {
|
||||||
packages = [
|
packages = [
|
||||||
pkgs.nebula
|
pkgs.nebula
|
||||||
pkgs.bitwarden-cli
|
pkgs.bitwarden-cli
|
||||||
self'.packages.nebula-regen-host-cert
|
self'.packages.nebula-recert-host
|
||||||
self'.packages.nebula-regen-all-host-certs
|
self'.packages.nebula-recert-all-hosts
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,16 @@
|
||||||
{
|
{
|
||||||
packages =
|
packages =
|
||||||
"${self}/scripts"
|
"${self}/scripts"
|
||||||
|> builtins.readDir
|
|> lib.filesystem.listFilesRecursive
|
||||||
|> lib.attrNames
|
|> lib.map (file: {
|
||||||
|> lib.map (name: name |> lib.removeSuffix ".nix")
|
name =
|
||||||
|> self.lib.genAttrs (name: import "${self}/scripts/${name}.nix" { inherit self' pkgs lib; });
|
file
|
||||||
|
|> lib.unsafeDiscardStringContext
|
||||||
|
|> lib.removePrefix "${self}/scripts/"
|
||||||
|
|> lib.removeSuffix ".nix"
|
||||||
|
|> lib.replaceString "/" "-";
|
||||||
|
value = import file { inherit self' pkgs lib; };
|
||||||
|
})
|
||||||
|
|> lib.listToAttrs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{ self', pkgs, ... }:
|
{ self', pkgs, ... }:
|
||||||
pkgs.writeShellApplication {
|
pkgs.writeShellApplication {
|
||||||
name = "nebula-regen-all-host-certs";
|
name = "nebula-recert-all-hosts";
|
||||||
|
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
pkgs.bitwarden-cli
|
pkgs.bitwarden-cli
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
self'.packages.nebula-regen-host-cert
|
self'.packages.nebula-recert-host
|
||||||
];
|
];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
|
|
@ -23,7 +23,7 @@ pkgs.writeShellApplication {
|
||||||
|
|
||||||
for host in $hosts; do
|
for host in $hosts; do
|
||||||
echo "Regenerating certificate for $host..."
|
echo "Regenerating certificate for $host..."
|
||||||
nebula-regen-host-cert "$host" "$ca_key"
|
nebula-recert-host "$host" "$ca_key"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
pkgs.writeShellApplication {
|
pkgs.writeShellApplication {
|
||||||
name = "nebula-regen-host-cert";
|
name = "nebula-recert-host";
|
||||||
|
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
pkgs.nebula
|
pkgs.nebula
|
||||||
Loading…
Add table
Add a link
Reference in a new issue