move to let inherit from with

This commit is contained in:
twoneis 2024-07-21 01:53:12 +02:00
parent aa3f6ada93
commit 4dc356752f

View file

@ -1,35 +1,54 @@
{ lib, ... }: {
options = with lib; {
user = mkEnableOption "Enable complete configuration for end-user machine";
options = let
inherit (lib) mkOption mkEnableOption;
inherit (lib.types) nullOr str attrsOf;
in {
full = mkEnableOption "Enable complete configuration for end-user machine";
withNiri = mkEnableOption "Enable niri compositor";
withGnome = mkEnableOption "Enable Gnome";
withVM = mkEnableOption "Enable VM related configuration";
withVM = lib.mkEnableOption "Enable VM related configuration";
withContainers = mkEnableOption "Enable container support";
withGames = mkEnableOption "Enable games";
withImpermanence = mkEnableOption "Use impermanence module";
disks = mkOption {
type = attrsOf str;
default = {
boot = "";
crypt = "";
root = "";
};
example = {
boot = "4672-C1A9";
crypt = "747ae319-f189-44f5-9737-a42672e2c02d";
root = "04255623-c061-4cf0-89fa-b3d8eb239d59";
};
};
username = mkOption {
type = types.str;
type = str;
default = "twoneis";
example = "anna";
};
hwmonPath = mkOption {
type = types.nullOr types.str;
type = nullOr str;
default = null;
example = "/sys/class/hwmon/hwmon1/temp1_input";
};
stateVersion = mkOption {
type = types.nullOr types.str;
type = nullOr str;
default = null;
example = "24.05";
};
hmStateVersion = mkOption {
type = types.nullOr types.str;
type = nullOr str;
default = null;
example = "24.11";
};