misc improvements to modularity

This commit is contained in:
greyweather committed 2026-09-02 15:50:37 +01:00
1 parent 9c13923c2e
commit 6d8673ea1e
29 files changed
+111 -108

No files matched your search

+28 -9
View File
@@ -5,20 +5,19 @@ in {
options.info = {
rootPath = lib.mkOption {
type = lib.types.str;
description = "This option is used to tell the config the global path to the flake's root directory, in order to perform impure actions (in a Nix sense, not morally impure, I promise).";
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";
};
userName = lib.mkOption {
type = lib.types.str;
description = "Used to tell the config the name of the primary user (the user that this flake should focus on for things like Home Manager configurations, etc).";
default = "grey";
};
hostName = lib.mkOption {
type = lib.types.str;
description = "This option is used to tell the config the hostname of the current machine, mostly for symlinking the right dotfiles.";
default = "";
};
stateVersion = lib.mkOption {
type = lib.types.str;
description = "This option is used to set the stateVersion value.";
example = "26.11";
description = "Used to tell the config the hostname of the current machine, mostly for symlinking the right dotfiles.";
default = "";
};
};
@@ -26,6 +25,13 @@ in {
flake.nixosModules.globalOptions = { lib, ... }: {
options = {
info.stateVersion = lib.mkOption {
type = lib.types.str;
description = "Used to set the `system.stateVersion` value.";
example = "26.11";
default = "";
};
components = {
bootLoader = {
selection = lib.mkOption {
@@ -59,6 +65,19 @@ in {
flake.homeModules.globalOptions = { lib, ... }: {
options = {
info = {
/* hostPlatform = lib.mkOption {
type = lib.types.str;
description = "Tells the config the platform string that should be used to generate `pkgs`, since `nixpkgs.hostPlatform` does not exist in a standalone Home Manager setup.";
default = "x86_64-linux";
}; */
stateVersion = lib.mkOption {
type = lib.types.str;
description = "Used to set the `home.stateVersion` value.";
example = "26.11";
default = "";
};
isStandalone = lib.mkOption {
type = lib.types.bool;
description = "This option tells the config whether this home-manager config is part of a larger NixOS config or not, and is read-only.";