1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/modules/programs/anup.nix
2025-10-11 22:12:56 -05:00

39 lines
924 B
Nix

{
lib,
pkgs,
config,
...
}:
let
inherit (lib)
types
mkIf
mkEnableOption
mkPackageOption
mkOption
;
cfg = config.programs.anup;
in
{
meta.maintainers = with lib.hm.maintainers; [ aguirre-matteo ];
options.programs.anup = {
enable = mkEnableOption "anup";
package = mkPackageOption pkgs "anup" { nullable = true; };
config = mkOption {
type = with types; either str path;
default = "";
description = ''
Config file for anup in RON (Rusty Object Notation) format.
Available options can be found by looking at ~/.config/anup/config.ron.
'';
};
};
config = mkIf cfg.enable {
home.packages = mkIf (cfg.package != null) [ cfg.package ];
home.file.".config/anup/config.ron" = mkIf (cfg.config != "") {
source = if lib.isPath cfg.config then cfg.config else pkgs.writeText "anup-config.ron" cfg.config;
};
};
}