fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6cfg = config . programs . wofi ; 7 8toConfig = attrs : 9'' 10# Generated by Home Manager. 11'' + generators . toKeyValue { } 12( filterAttrs ( name :value :value != null ) attrs ); 13in { 14meta . maintainers = [ maintainers . christoph-heiss ]; 15 16options . programs . wofi = { 17enable = mkEnableOption 18"wofi: a launcher/menu program for wlroots based wayland compositors such as sway" ; 19 20package = mkPackageOption pkgs "wofi" { }; 21 22settings = mkOption { 23default = { }; 24type = types . attrs ; 25description = '' 26Configuration options for wofi. See 27{manpage}`wofi(5)`. 28'' ; 29example = literalExpression '' 30{ 31location = "bottom-right"; 32allow_markup = true; 33width = 250; 34} 35'' ; 36}; 37 38style = mkOption { 39default = null ; 40type = types . nullOr types . str ; 41description = '' 42CSS style for wofi to use as a stylesheet. See 43{manpage}`wofi(7)`. 44'' ; 45example = '' 46* { 47font-family: monospace; 48} 49 50window { 51background-color: #7c818c; 52} 53'' ; 54}; 55}; 56 57config = mkIf cfg . enable { 58assertions = 59[ ( hm . assertions . assertPlatform "programs.wofi" pkgs platforms . linux ) ]; 60 61home . packages = [ cfg . package ]; 62 63xdg . configFile = mkMerge [ 64( mkIf ( cfg . settings != { }) { 65"wofi/config" . text = toConfig cfg . settings ; 66}) 67( mkIf ( cfg . style != null ) { "wofi/style.css" . text = cfg . style ; }) 68]; 69}; 70}