mirror of
https://github.com/nix-community/home-manager
synced 2024-12-22 02:53:16 +00:00
52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
inherit (lib) literalExpression mkEnableOption mkPackageOption mkOption mkIf;
|
|
|
|
cfg = config.programs.fuzzel;
|
|
|
|
iniFormat = pkgs.formats.ini { };
|
|
|
|
in {
|
|
meta.maintainers = [ lib.maintainers.Scrumplex ];
|
|
|
|
options.programs.fuzzel = {
|
|
enable = mkEnableOption "fuzzel";
|
|
|
|
package = mkPackageOption pkgs "fuzzel" { };
|
|
|
|
settings = mkOption {
|
|
type = iniFormat.type;
|
|
default = { };
|
|
example = literalExpression ''
|
|
{
|
|
main = {
|
|
terminal = "''${pkgs.foot}/bin/foot";
|
|
layer = "overlay";
|
|
};
|
|
colors.background = "ffffffff";
|
|
}
|
|
'';
|
|
description = ''
|
|
Configuration for fuzzel written to
|
|
<filename>$XDG_CONFIG_HOME/fuzzel/fuzzel.ini</filename>. See
|
|
<citerefentry><refentrytitle>fuzzel.ini</refentrytitle>
|
|
<manvolnum>5</manvolnum></citerefentry> for a list of available options.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
assertions = [
|
|
(lib.hm.assertions.assertPlatform "programs.fuzzel" pkgs
|
|
lib.platforms.linux)
|
|
];
|
|
|
|
home.packages = [ cfg.package ];
|
|
|
|
xdg.configFile."fuzzel/fuzzel.ini" = mkIf (cfg.settings != { }) {
|
|
source = iniFormat.generate "fuzzel.ini" cfg.settings;
|
|
};
|
|
};
|
|
}
|