mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
chore: use agenix, enable initrd networking
This commit is contained in:
parent
855bff0a6f
commit
b68021b3a4
8 changed files with 79 additions and 83 deletions
24
flake.nix
24
flake.nix
|
@ -25,9 +25,8 @@
|
|||
};
|
||||
|
||||
agenix-rekey.url = "github:oddlama/agenix-rekey";
|
||||
ragenix = {
|
||||
url = "github:yaxitech/ragenix";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -60,7 +59,24 @@
|
|||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
apps = agenix-rekey.defineApps self pkgs self.nodes;
|
||||
apps =
|
||||
agenix-rekey.defineApps self pkgs self.nodes
|
||||
// {
|
||||
generate-initrd-keys = flake-utils.mkApp {
|
||||
drv = let
|
||||
generateHostKey = node: ''
|
||||
if [[ ! -f ${node.config.rekey.secrets.initrd_host_ed25519_key.file} ]]; then
|
||||
ssh-keygen -t ed25519 -N "" -f /tmp/1
|
||||
TODO
|
||||
fi
|
||||
'';
|
||||
in
|
||||
pkgs.writeShellScript "generate-initrd-keys" ''
|
||||
set -euo pipefail
|
||||
${pkgs.lib.concatStringsSep "\n" (pkgs.lib.mapAttrsToList generateHostKey self.nodes)}
|
||||
'';
|
||||
};
|
||||
};
|
||||
checks = import ./nix/checks.nix inputs system;
|
||||
devShells.default = import ./nix/dev-shell.nix inputs system;
|
||||
formatter = pkgs.alejandra;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue