mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
micro: add package option
This commit is contained in:
parent
ea72cf548f
commit
a11cfcd0a1
1 changed files with 3 additions and 1 deletions
|
@ -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