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 . micro ; 8 9jsonFormat = pkgs . formats . json { }; 10 11in { 12meta . maintainers = [ hm . maintainers . mforster ]; 13 14options = { 15programs . micro = { 16enable = mkEnableOption "micro, a terminal-based text editor" ; 17 18settings = mkOption { 19type = jsonFormat . type ; 20default = { }; 21example = literalExpression '' 22{ 23autosu = false; 24cursorline = false; 25} 26'' ; 27description = '' 28Configuration written to 29{file}`$XDG_CONFIG_HOME/micro/settings.json`. See 30<https://github.com/zyedidia/micro/blob/master/runtime/help/options.md> 31for supported values. 32'' ; 33}; 34}; 35}; 36 37config = mkIf cfg . enable { 38home . packages = [ pkgs . micro ]; 39 40xdg . configFile . "micro/settings.json" . source = 41jsonFormat . generate "micro-settings" cfg . settings ; 42}; 43}