change mkOption of mkEnableOption
This commit is contained in:
parent
ec9ea69470
commit
5bc9540ef3
7 changed files with 9 additions and 63 deletions
|
|
@ -10,11 +10,7 @@ in
|
|||
{
|
||||
options = {
|
||||
david.wallpaper = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
enable = lib.mkEnableOption "wallpaper";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
|||
|
|
@ -5,14 +5,7 @@ in
|
|||
{
|
||||
options = {
|
||||
youthlic.programs.foot = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
whether use foot terminal
|
||||
'';
|
||||
};
|
||||
enable = lib.mkEnableOption "foot";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
|||
|
|
@ -7,14 +7,7 @@
|
|||
{
|
||||
options = {
|
||||
youthlic.programs.ghostty = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
example = false;
|
||||
default = true;
|
||||
description = ''
|
||||
whether enable ghostty
|
||||
'';
|
||||
};
|
||||
enable = lib.mkEnableOption "ghostty";
|
||||
};
|
||||
};
|
||||
config =
|
||||
|
|
|
|||
|
|
@ -8,14 +8,7 @@
|
|||
{
|
||||
options = {
|
||||
youthlic.programs.gpg = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
whether enable gpg
|
||||
'';
|
||||
};
|
||||
enable = lib.mkEnableOption "gpg";
|
||||
};
|
||||
};
|
||||
config =
|
||||
|
|
|
|||
|
|
@ -7,14 +7,7 @@
|
|||
{
|
||||
options = {
|
||||
youthlic.programs.helix = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
enable helix editor
|
||||
'';
|
||||
};
|
||||
enable = lib.mkEnableOption "helix";
|
||||
extraPackages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [ ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib) mkOption mkIf mkMerge;
|
||||
inherit (lib.types) bool;
|
||||
inherit (lib) mkEnableOption mkIf mkMerge;
|
||||
fish-cfg = config.youthlic.programs.fish;
|
||||
bash-cfg = config.youthlic.programs.bash;
|
||||
cfg-helper =
|
||||
|
|
@ -20,24 +19,10 @@ in
|
|||
options = {
|
||||
youthlic.programs = {
|
||||
fish = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = ''
|
||||
whether to use fish shell
|
||||
'';
|
||||
example = false;
|
||||
};
|
||||
enable =mkEnableOption "fish";
|
||||
};
|
||||
bash = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = ''
|
||||
whether to use bash shell
|
||||
'';
|
||||
example = false;
|
||||
};
|
||||
enable = mkEnableOption "bash";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,14 +5,7 @@ in
|
|||
{
|
||||
options = {
|
||||
youthlic.programs.starship = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
whether enable starship
|
||||
'';
|
||||
};
|
||||
enable = lib.mkEnableOption "starship";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue