diff --git a/modules/default.nix b/modules/default.nix index b183cad..86ce90f 100755 --- a/modules/default.nix +++ b/modules/default.nix @@ -16,7 +16,7 @@ # defines global user config.users = { users = { - "${inputs.zeroq.devices.admin}" = { + "${config.device.username}" = { isNormalUser = true; description = "Jor Oqyude"; initialPassword = "1234"; @@ -37,17 +37,24 @@ }; # Options - options = { - device.type = lib.mkOption { - type = lib.types.enum [ - "minimal" - "primary" - "server" - "vds" - "wsl" - ]; - default = "minimal"; # Значение по умолчанию, если не указано - description = "Type of device for this host."; - }; - }; + # options = { + # device = { + # type = lib.mkOption { + # type = lib.types.enum [ + # "minimal" + # "primary" + # "server" + # "vds" + # "wsl" + # ]; + # default = "minimal"; + # description = "Type of device for this host."; + # }; + # username = lib.mkOption { + # type = lib.types.str; + # default = "${inputs.zeroq.devices.admin}"; + # description = "Username for host"; + # }; + # }; + # }; } diff --git a/modules/essentials/default.nix b/modules/essentials/default.nix index eddbfce..d70fe28 100755 --- a/modules/essentials/default.nix +++ b/modules/essentials/default.nix @@ -4,6 +4,7 @@ }: { imports = [ + ./options.nix ./packages.nix ./services.nix ./settings.nix diff --git a/modules/essentials/options.nix b/modules/essentials/options.nix new file mode 100644 index 0000000..ad7156b --- /dev/null +++ b/modules/essentials/options.nix @@ -0,0 +1,26 @@ +{ + config, + ... +}: +{ + options = { + device = { + type = lib.mkOption { + type = lib.types.enum [ + "minimal" + "primary" + "server" + "vds" + "wsl" + ]; + default = "minimal"; + description = "Type of device for this host."; + }; + username = lib.mkOption { + type = lib.types.str; + default = "${inputs.zeroq.devices.admin}"; + description = "Username for host"; + }; + }; + }; +}