nixos-config/home-manager/modules/gitu/default.nix

36 lines
696 B
Nix
Raw Normal View History

2024-09-10 19:26:50 +02:00
{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.programs.gitu;
settingsFormat = pkgs.formats.toml { };
gituConfig = types.submodule {
freeformType = settingsFormat.type;
};
in
{
options.eboskma.programs.gitu = {
enable = mkEnableOption "gitu";
settings = mkOption {
description = "Gitu config according to https://github.com/altsem/gitu/blob/master/src/default_config.toml";
default = { };
type = gituConfig;
};
};
config = mkIf cfg.enable {
xdg.configFile.gitu = {
target = "gitu/config.toml";
source = settingsFormat.generate "config.toml" cfg.settings;
};
home.packages = [ pkgs.gitu ];
};
}