change mkOption of mkEnableOption

This commit is contained in:
ulic-youthlic 2025-01-17 15:28:53 +08:00
parent ec9ea69470
commit 5bc9540ef3
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
7 changed files with 9 additions and 63 deletions

View file

@ -10,11 +10,7 @@ in
{ {
options = { options = {
david.wallpaper = { david.wallpaper = {
enable = lib.mkOption { enable = lib.mkEnableOption "wallpaper";
type = lib.types.bool;
default = true;
example = false;
};
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {

View file

@ -5,14 +5,7 @@ in
{ {
options = { options = {
youthlic.programs.foot = { youthlic.programs.foot = {
enable = lib.mkOption { enable = lib.mkEnableOption "foot";
type = lib.types.bool;
default = true;
example = false;
description = ''
whether use foot terminal
'';
};
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {

View file

@ -7,14 +7,7 @@
{ {
options = { options = {
youthlic.programs.ghostty = { youthlic.programs.ghostty = {
enable = lib.mkOption { enable = lib.mkEnableOption "ghostty";
type = lib.types.bool;
example = false;
default = true;
description = ''
whether enable ghostty
'';
};
}; };
}; };
config = config =

View file

@ -8,14 +8,7 @@
{ {
options = { options = {
youthlic.programs.gpg = { youthlic.programs.gpg = {
enable = lib.mkOption { enable = lib.mkEnableOption "gpg";
type = lib.types.bool;
default = true;
example = false;
description = ''
whether enable gpg
'';
};
}; };
}; };
config = config =

View file

@ -7,14 +7,7 @@
{ {
options = { options = {
youthlic.programs.helix = { youthlic.programs.helix = {
enable = lib.mkOption { enable = lib.mkEnableOption "helix";
type = lib.types.bool;
default = true;
example = false;
description = ''
enable helix editor
'';
};
extraPackages = lib.mkOption { extraPackages = lib.mkOption {
type = lib.types.listOf lib.types.package; type = lib.types.listOf lib.types.package;
default = [ ]; default = [ ];

View file

@ -1,7 +1,6 @@
{ config, lib, ... }: { config, lib, ... }:
let let
inherit (lib) mkOption mkIf mkMerge; inherit (lib) mkEnableOption mkIf mkMerge;
inherit (lib.types) bool;
fish-cfg = config.youthlic.programs.fish; fish-cfg = config.youthlic.programs.fish;
bash-cfg = config.youthlic.programs.bash; bash-cfg = config.youthlic.programs.bash;
cfg-helper = cfg-helper =
@ -20,24 +19,10 @@ in
options = { options = {
youthlic.programs = { youthlic.programs = {
fish = { fish = {
enable = mkOption { enable =mkEnableOption "fish";
type = bool;
default = true;
description = ''
whether to use fish shell
'';
example = false;
};
}; };
bash = { bash = {
enable = mkOption { enable = mkEnableOption "bash";
type = bool;
default = true;
description = ''
whether to use bash shell
'';
example = false;
};
}; };
}; };
}; };

View file

@ -5,14 +5,7 @@ in
{ {
options = { options = {
youthlic.programs.starship = { youthlic.programs.starship = {
enable = lib.mkOption { enable = lib.mkEnableOption "starship";
type = lib.types.bool;
default = true;
example = false;
description = ''
whether enable starship
'';
};
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {