summaryrefslogtreecommitdiffstats
path: root/modules/by-name/ag/age/module.nix
blob: 6eb0f9c4bd927c47337dea29e3cb553ab96df889 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  config,
  lib,
  extra_modules,
  pkgs,
  ...
}: let
  cfg = config.soispha.age;
in {
  options.soispha.age = {
    enable = lib.mkEnableOption "secret management with age";
  };

  imports = [
    extra_modules.nixos.agenix
  ];

  config = lib.mkIf cfg.enable {
    age = {
      # TODO(@bpeetz): Set once <https://github.com/ryantm/agenix/pull/317/files> is merged. <2025-05-16>
      # enable = true;
      ageBin = lib.getExe pkgs.rage;
    };
  };
}