my configuration for my NixOS machines, I guess
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

23 lines
570 B

{ inputs, options, config, lib, pkgs, ... }:
let
inherit (inputs) agenix;
secretsDir = "/../secrets/${config.networking.hostName}";
secretsFile = "${secretsDir}/secrets.nix";
in
with lib;
{
environment.systemPackages = [
agenix.defaultPackage.x86_64-linux
];
age = {
secrets =
mapAttrs' (n: _: nameValuePair (removeSuffix ".age" n) {
file = ./. + "${secretsDir}/${n}";
mode = "0444";
}) (import (./. + secretsFile));
identityPaths = options.age.identityPaths.default ++ [
"/etc/agenix/id_ed25519"
];
};
}