From a5d0f522daa9e77631387f9a4b2d2383f7896173 Mon Sep 17 00:00:00 2001 From: Grey Jones Date: Thu, 3 Sep 2026 13:56:37 +0100 Subject: [PATCH] update some option descriptions --- modules/docs.nix | 3 ++- modules/features/applications/cli/nh.nix | 4 ++-- modules/features/applications/gui/equibop.nix | 2 +- modules/features/shells.nix | 2 +- modules/global/nixos.nix | 2 +- modules/hosts/kitagawa/kitagawa.nix | 2 +- modules/options/global.nix | 16 ++++++++++------ modules/options/graphics.nix | 6 +++--- 8 files changed, 21 insertions(+), 16 deletions(-) diff --git a/modules/docs.nix b/modules/docs.nix index 62d0ddb..9c9eed2 100644 --- a/modules/docs.nix +++ b/modules/docs.nix @@ -120,7 +120,7 @@ in { in { enable = lib.mkOption { type = lib.types.bool; - description = "This option enables documentation for the flake, which is generated with Material for mkDocs and hosted by nginx at localhost:${defaultPort} by default."; + description = "Whether to enable documentation for the flake, generated with [Material for mkDocs](https://squidfunk.github.io/mkdocs-material/) and hosted by (containerised) nginx at localhost:${defaultPort} by default."; default = true; }; @@ -128,6 +128,7 @@ in { type = lib.types.str; description = "This option sets the port used by the nginx server hosting the local documentation site."; default = defaultPort; + readOnly = true; }; }; })) ]; diff --git a/modules/features/applications/cli/nh.nix b/modules/features/applications/cli/nh.nix index 5edccd4..2aa56bb 100644 --- a/modules/features/applications/cli/nh.nix +++ b/modules/features/applications/cli/nh.nix @@ -12,13 +12,13 @@ in { enable = lib.mkEnableOption "automatic cleaning of the system with `nh clean`"; dates = lib.mkOption { type = lib.types.str; - description = "This option defines when the cleaning job should run, in the format of [`systemd.time` calendar events](https://www.man7.org/linux/man-pages/man7/systemd.time.7.html#CALENDAR_EVENTS)."; + description = "Defines when the cleaning job should run, in the format of [`systemd.time` calendar events](https://www.man7.org/linux/man-pages/man7/systemd.time.7.html#CALENDAR_EVENTS)."; default = "daily"; example = "Sun 05:00"; }; extraArgs = lib.mkOption { type = lib.types.str; - description = "This option sets any extra arguments that should be passed to the `nh clean` command when it is called by this automated service."; + description = "Any extra arguments that should be passed to the `nh clean` command when it is called by this service."; default = "--keep 10 --keep-since 7d"; }; }; diff --git a/modules/features/applications/gui/equibop.nix b/modules/features/applications/gui/equibop.nix index fbf4f9c..1748985 100644 --- a/modules/features/applications/gui/equibop.nix +++ b/modules/features/applications/gui/equibop.nix @@ -6,7 +6,7 @@ }; in { imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: { - options.features.applications.gui.equibop.enable = lib.mkEnableOption "Equibop"; + options.features.applications.gui.equibop.enable = lib.mkEnableOption "Equibop, a custom Discord client from the creators of Equicord"; })) ]; flake.nixosModules.graphicsOption = { lib, ... }: { diff --git a/modules/features/shells.nix b/modules/features/shells.nix index ea1c6f4..65b6cd2 100644 --- a/modules/features/shells.nix +++ b/modules/features/shells.nix @@ -2,7 +2,7 @@ imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: { options.features.shells.defaultShell = lib.mkOption { type = inputs.helpers.mkEnumFromDirContents "${self}/modules/features/shells"; - description = "This option controls the shell that should be used as the default, enabling that shell in the process."; + description = "The shell that should be used as the default for all users."; default = "zsh"; }; })) ]; diff --git a/modules/global/nixos.nix b/modules/global/nixos.nix index a596361..2b2c4e3 100644 --- a/modules/global/nixos.nix +++ b/modules/global/nixos.nix @@ -87,7 +87,7 @@ home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) { info = { inherit (config.info) rootPath userName hostName stateVersion; - hostPlatform = config.nixpkgs.hostPlatform.system; + # hostPlatform = config.nixpkgs.hostPlatform.system; isStandalone = false; }; }; diff --git a/modules/hosts/kitagawa/kitagawa.nix b/modules/hosts/kitagawa/kitagawa.nix index fbe7de2..fbf7bd2 100644 --- a/modules/hosts/kitagawa/kitagawa.nix +++ b/modules/hosts/kitagawa/kitagawa.nix @@ -165,4 +165,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/modules/options/global.nix b/modules/options/global.nix index 0229f48..b09a696 100644 --- a/modules/options/global.nix +++ b/modules/options/global.nix @@ -1,12 +1,12 @@ { inputs, self, ... }: let mkExtraPackagesDescription = optionName: "This option is equivalent to `${optionName}`, and exists purely for convenience."; in { - imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: { + imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, config, ... }: { options.info = { rootPath = lib.mkOption { type = lib.types.str; - description = "Used to tell the config the global path to the flake's root directory, in order to perform direct symlinking (not in `/nix/store`)."; - default = "/home/grey/nixos"; + description = "Used to tell the config the absolute path to this flake's root directory, in order to perform actual symlinking (not in `/nix/store` but directly in the directory specified here)."; + defaultText = "/home//flake"; }; userName = lib.mkOption { @@ -21,6 +21,10 @@ in { default = ""; }; }; + + config = { + info.rootPath = lib.mkDefault "/home/${config.info.userName}/flake"; + }; })) ]; flake.nixosModules.globalOptions = { lib, ... }: { @@ -36,19 +40,19 @@ in { bootLoader = { selection = lib.mkOption { type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/boot-loaders"; - description = "This option defines the bootloader that should be used, enabling any config associated with it in the process."; + description = "Defines the bootloader that should be used, enabling any config associated with it in the process."; default = "grub"; }; timeout = lib.mkOption { type = lib.types.int; - description = "This option defines the timeout length that the bootloader should use, which controls the wait time for keyboard input before selecting the default entry."; + description = "Defines the timeout length that the bootloader should use (the wait time for keyboard input before selecting the default entry)."; default = 5; }; maxGenerations = lib.mkOption { type = lib.types.int; - description = "This option defines how many entries should be displayed in the bootloader, which can be useful when there are many NixOS generations present before garbage-collection."; + description = "Limits how many entries should be displayed in the bootloader, which can be useful when there are many NixOS generations present before garbage-collection."; default = 10; }; }; diff --git a/modules/options/graphics.nix b/modules/options/graphics.nix index 70e5624..d4788c3 100644 --- a/modules/options/graphics.nix +++ b/modules/options/graphics.nix @@ -4,13 +4,13 @@ components = { windowManagers = lib.mkOption { type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/window-managers"); - description = "This option defines the window manager(s) that should be installed, enabling any config associated with it in the process. It can be either a list or just one value."; + description = "Defines the window manager(s) that should be installed, enabling any config associated with them in the process. It can be either a list or just one value."; default = []; }; shells = lib.mkOption { type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/shells"); - description = "This option defines the graphical shell(s) that should be installed (e.g. Noctalia, DMS), enabling any config associated with it in the process. It can be either a list or just one value."; + description = "Defines the graphical shell(s) that should be installed (e.g. Noctalia, DMS), enabling any config associated with them in the process. It can be either a list or just one value."; default = []; }; }; @@ -20,7 +20,7 @@ flake.nixosModules.graphicsOptions = { lib, ... }: { options.components.displayManager = lib.mkOption { type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/display-managers"; - description = "This option defines the bootloader that should be used, enabling any config associated with it in the process."; + description = "Defines the bootloader that should be used, enabling any config associated with it in the process."; default = "lightdm"; }; };