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 . imv ; 7 8toConfig = attrs : 9'' 10# Generated by Home Manager. 11'' + generators . toINI { } attrs ; 12in { 13meta . maintainers = [ maintainers . christoph-heiss ]; 14 15options . programs . imv = { 16enable = mkEnableOption 17"imv: a command line image viewer intended for use with tiling window managers" ; 18 19package = mkPackageOption pkgs "imv" { }; 20 21settings = mkOption { 22default = { }; 23type = with types ; attrsOf ( attrsOf ( oneOf [ bool int str ])); 24description = '' 25Configuration options for imv. See 26{manpage}`imv(5)`. 27'' ; 28example = literalExpression '' 29{ 30options.background = "ffffff"; 31aliases.x = "close"; 32} 33'' ; 34}; 35}; 36 37config = mkIf cfg . enable { 38assertions = 39[ ( hm . assertions . assertPlatform "programs.imv" pkgs platforms . linux ) ]; 40 41home . packages = [ cfg . package ]; 42 43xdg . configFile = 44mkIf ( cfg . settings != { }) { "imv/config" . text = toConfig cfg . settings ; }; 45}; 46}