mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-10 21:00:06 +00:00
♻️⚡️ remove with lib;
everywhere and partially switch to mkOpt
This commit is contained in:
parent
c5283fe60b
commit
124d6b7ede
27 changed files with 72 additions and 53 deletions
|
@ -3,8 +3,9 @@
|
|||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.${namespace}.common.audio;
|
||||
in {
|
||||
options.${namespace}.common.audio = { enable = mkEnableOption "whether to enable common audio support and tweaks"; };
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.${namespace}.common.bluetooth;
|
||||
in {
|
||||
options.${namespace}.common.bluetooth = { enable = mkEnableOption "Enable bluetooth support on your current system"; };
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption;
|
||||
cfg = config.${namespace}.common.fonts;
|
||||
in {
|
||||
options.${namespace}.common.fonts = with types; {
|
||||
options.${namespace}.common.fonts = with lib.types; {
|
||||
enable = mkEnableOption "Enable system font management";
|
||||
fonts = mkOption {
|
||||
type = listOf package;
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.${namespace}.common.grub;
|
||||
in {
|
||||
options.${namespace}.common.grub = { enable = mkEnableOption "grub"; };
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.${namespace}.common.hardware;
|
||||
in {
|
||||
options.${namespace}.common.hardware = { enable = mkEnableOption "whether to enable common hardware support"; };
|
||||
|
|
|
@ -4,18 +4,15 @@
|
|||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
inherit (lib.${namespace}) mkOpt;
|
||||
cfg = config.${namespace}.common.kernel;
|
||||
in {
|
||||
options.${namespace}.common.kernel = {
|
||||
enable = mkEnableOption "Modify the standard kernel settings";
|
||||
version = mkOption {
|
||||
type = types.str;
|
||||
default = "linuxPackages_latest";
|
||||
example = "linuxPackages_latest";
|
||||
description = "Set the kernel version to be used by your system";
|
||||
};
|
||||
version = mkOpt lib.types.str "linuxPackages_latest" "Set the kernel version to be used by your system";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -3,29 +3,30 @@
|
|||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption;
|
||||
cfg = config.${namespace}.common.locale;
|
||||
in {
|
||||
options.${namespace}.common.locale = {
|
||||
enable = mkEnableOption "whether to enable common locale tweaks";
|
||||
|
||||
language = mkOption {
|
||||
type = types.str;
|
||||
type = lib.types.str;
|
||||
default = "en_US";
|
||||
example = "en_US";
|
||||
description = "Sets the language for most text, doesn't include monetary or measurement settings";
|
||||
};
|
||||
|
||||
country = mkOption {
|
||||
type = types.str;
|
||||
type = lib.types.str;
|
||||
default = "de_DE";
|
||||
example = "de_DE";
|
||||
description = "Sets the language used for monetary or measurement settings (USD vs Euro, etc...)";
|
||||
};
|
||||
|
||||
keymap = mkOption {
|
||||
type = types.str;
|
||||
type = lib.types.str;
|
||||
default = "de";
|
||||
example = "de";
|
||||
description = "Sets the keymap to be used by the system";
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.${namespace}.common.nix;
|
||||
in {
|
||||
options.${namespace}.common.nix = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue