agenix-rekey: move to flake part

This commit is contained in:
2025-08-25 21:34:10 +01:00
parent f4b0ae7fb8
commit c192217732
3 changed files with 31 additions and 2 deletions

View File

@@ -113,10 +113,10 @@
}:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.agenix-rekey.flakeModule
inputs.pre-commit-hooks.flakeModule
inputs.nix-topology.flakeModule
inputs.treefmt-nix.flakeModule
./nix/agenix-rekey.nix
./nix/devshell.nix
./nix/hosts.nix
];

View File

@@ -6,7 +6,7 @@
}:
{
imports = [
inputs.agenix.nixosModules.age
inputs.agenix.nixosModules.default
inputs.home-manager.nixosModules.home-manager
../modules/nixos
../modules/nixos/impermanence.nix

29
nix/agenix-rekey.nix Normal file
View File

@@ -0,0 +1,29 @@
{
inputs,
...
}:
{
imports = [
inputs.agenix-rekey.flakeModule
];
perSystem =
{ config, ... }:
{
agenix-rekey.nixosConfigurations = inputs.self.nixosConfigurations;
devshells.default = {
commands = [
{
inherit (config.agenix-rekey) package;
help = "Edit, generate, and rekey secrets";
}
];
env = [
{
name = "AGENIX_REKEY_ADD_TO_GIT";
value = "true";
}
];
};
};
}