{ config, pkgs, lib, ... }:
with lib;
let
  cfg = config.my.programs.exercism;
in
{
  options.my.programs.exercism.enable = mkEnableOption "Exercism";

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [ exercism ];

    age.secrets.exercism = {
      path = "/home/moritz/.config/exercism/user.json";
      file = ../../secrets/exercism.age;
      owner = "1000";
      mode = "500";
    };
  };
}
