mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
iamb: new module
This commit is contained in:
parent
71cbeb3afd
commit
e5ab18116c
2 changed files with 54 additions and 0 deletions
modules
|
@ -131,6 +131,7 @@ let
|
|||
./programs/i3blocks.nix
|
||||
./programs/i3status-rust.nix
|
||||
./programs/i3status.nix
|
||||
./programs/iamb.nix
|
||||
./programs/imv.nix
|
||||
./programs/info.nix
|
||||
./programs/ion.nix
|
||||
|
|
53
modules/programs/iamb.nix
Normal file
53
modules/programs/iamb.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.programs.iamb;
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
in {
|
||||
options.programs.iamb = {
|
||||
enable = lib.mkEnableOption "iamb";
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.iamb;
|
||||
defaultText = lib.literalExpression "pkgs.iamb";
|
||||
description = "The package to use for the iamb binary.";
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = tomlFormat.type;
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
default_profile = "personal";
|
||||
settings = {
|
||||
notifications.enabled = true;
|
||||
image_preview.protocol = {
|
||||
type = "kitty";
|
||||
size = {
|
||||
height = 10;
|
||||
width = 66;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to
|
||||
{file}`$XDG_CONFIG_HOME/iamb/config.toml`.
|
||||
|
||||
See <https://iamb.chat/configure.html> for the full list
|
||||
of options.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."iamb/config.toml" = lib.mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "iamb-config" cfg.settings;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue