{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.alqueva.programs.foot;
  inherit (lib.modules) mkIf;
  inherit (lib.options) mkEnableOption mkPackageOption;
in
{
  options.alqueva.programs.foot = {
    enable = mkEnableOption "foot";
    package = mkPackageOption pkgs "foot" { };
  };

  config = mkIf cfg.enable {
    environment.systemPackages = [ cfg.package ];
    systemd = {
      packages = [ cfg.package ];
      user.services.foot-server.enable = true;
    };
  };
}
