mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
Some files don't need nesting and can be root level again to reduce conflicts with other PRs. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib)
|
|
mkIf
|
|
mkEnableOption
|
|
mkPackageOption
|
|
mkOption
|
|
;
|
|
|
|
cfg = config.programs.kickoff;
|
|
|
|
formatter = pkgs.formats.toml { };
|
|
in
|
|
{
|
|
meta.maintainers = with lib.hm.maintainers; [ aguirre-matteo ];
|
|
|
|
options.programs.kickoff = {
|
|
enable = mkEnableOption "kickoff";
|
|
package = mkPackageOption pkgs "kickoff" { nullable = true; };
|
|
settings = mkOption {
|
|
type = formatter.type;
|
|
default = { };
|
|
example = ''
|
|
padding = 100;
|
|
font_size = 32;
|
|
search.show_hidden_files = false;
|
|
history.decrease_interval = 48;
|
|
|
|
keybinding = {
|
|
paste = [ "ctrl+v" ];
|
|
execute = [ "KP_Enter" "Return" ];
|
|
complete = [ "Tab" ];
|
|
};
|
|
'';
|
|
description = ''
|
|
Configuration settings for kickoff. All the available options can be found
|
|
here: <https://github.com/j0ru/kickoff/blob/main/assets/default_config.toml>.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
assertions = [
|
|
(lib.hm.assertions.assertPlatform "programs.kickoff" pkgs lib.platforms.linux)
|
|
];
|
|
|
|
home.packages = mkIf (cfg.package != null) [ cfg.package ];
|
|
|
|
xdg.configFile = mkIf (cfg.settings != { }) {
|
|
"kickoff/config.toml".source = formatter.generate "kickoff-config-toml" cfg.settings;
|
|
};
|
|
};
|
|
}
|