micro: add package option
This commit is contained in:
parent
ea72cf548f
commit
a11cfcd0a1
|
@ -15,6 +15,8 @@ in {
|
||||||
programs.micro = {
|
programs.micro = {
|
||||||
enable = mkEnableOption "micro, a terminal-based text editor";
|
enable = mkEnableOption "micro, a terminal-based text editor";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "micro" { };
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = jsonFormat.type;
|
type = jsonFormat.type;
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -35,7 +37,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.micro ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."micro/settings.json".source =
|
xdg.configFile."micro/settings.json".source =
|
||||||
jsonFormat.generate "micro-settings" cfg.settings;
|
jsonFormat.generate "micro-settings" cfg.settings;
|
||||||
|
|
Loading…
Reference in a new issue