micro: add package option

This commit is contained in:
nikitax44 2024-07-29 02:00:57 +05:00 committed by GitHub
parent ea72cf548f
commit a11cfcd0a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,6 +15,8 @@ in {
programs.micro = {
enable = mkEnableOption "micro, a terminal-based text editor";
package = mkPackageOption pkgs "micro" { };
settings = mkOption {
type = jsonFormat.type;
default = { };
@ -35,7 +37,7 @@ in {
};
config = mkIf cfg.enable {
home.packages = [ pkgs.micro ];
home.packages = [ cfg.package ];
xdg.configFile."micro/settings.json".source =
jsonFormat.generate "micro-settings" cfg.settings;