fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . bottom ; 8 9tomlFormat = pkgs . formats . toml { }; 10 11in { 12options = { 13programs . bottom = { 14enable = mkEnableOption '' 15bottom, a cross-platform graphical process/system monitor with a 16customizable interface'' ; 17 18package = mkOption { 19type = types . package ; 20default = pkgs . bottom ; 21defaultText = literalExpression "pkgs.bottom" ; 22description = "Package providing {command}`bottom`." ; 23}; 24 25settings = mkOption { 26type = tomlFormat . type ; 27default = { }; 28description = '' 29Configuration written to 30{file}`$XDG_CONFIG_HOME/bottom/bottom.toml`. 31 32See <https://github.com/ClementTsang/bottom/blob/master/sample_configs/default_config.toml> 33for the default configuration. 34'' ; 35example = literalExpression '' 36{ 37flags = { 38avg_cpu = true; 39temperature_type = "c"; 40}; 41 42colors = { 43low_battery_color = "red"; 44}; 45} 46'' ; 47}; 48}; 49}; 50 51config = mkIf cfg . enable { 52home . packages = [ cfg . package ]; 53 54xdg . configFile . "bottom/bottom.toml" = mkIf ( cfg . settings != { }) { 55source = tomlFormat . generate "bottom.toml" cfg . settings ; 56}; 57}; 58 59meta . maintainers = [ maintainers . polykernel ]; 60}