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/onagre.nix
Austin Horstman 86402a17b6 treewide: flatten single file modules
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>
2025-06-23 16:20:26 -05:00

74 lines
1.7 KiB
Nix

{
lib,
pkgs,
config,
...
}:
let
inherit (lib)
types
mkIf
mkEnableOption
mkPackageOption
mkOption
;
cfg = config.programs.onagre;
in
{
meta.maintainers = with lib.hm.maintainers; [ aguirre-matteo ];
options.programs.onagre = {
enable = mkEnableOption "onagre";
package = mkPackageOption pkgs "onagre" { nullable = true; };
style = mkOption {
type = types.lines;
default = "";
example = ''
.onagre {
--exit-unfocused: false;
height: 250px;
width: 400px;
--font-family: "Iosevka,Iosevka Nerd Font";
font-size: 18px;
background: #151515;
color: #414141;
padding: 10px;
.container {
.rows {
--height: fill-portion 6;
.row-selected {
color: #ffffff;
--spacing: 3px;
}
}
.scrollable {
background: #151515;
width: 0;
.scroller {
width: 0;
color: #151515;
}
}
}
}
'';
description = ''
Configuration file to be written to theme.scss for setting
Onagre's theme. The documentation can be found here:
<https://github.com/onagre-launcher/onagre/wiki/Theming>
'';
};
};
config = mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "programs.onagre" pkgs lib.platforms.linux)
];
home.packages = mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile."onagre/theme.scss" = mkIf (cfg.style != "") { text = cfg.style; };
};
}