Files
nix-flake/modules/global/options.nix
T
greyweather 023fc0c424 add features.applications.shellScripts option
uses a custom function from my helper flake to convert a basic attrset of strings into a format `home.file` will accept
2026-08-30 02:54:08 +01:00

72 lines
1.7 KiB
Nix

{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
options = {
info = {
rootPath = lib.mkOption {
type = lib.types.str;
default = "/home/grey/nixos";
};
hostName = lib.mkOption {
type = lib.types.str;
default = "";
};
stateVersion = lib.mkOption {
type = lib.types.str;
default = "";
};
};
components.bootLoader = lib.mkOption {
type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/components/boot-loaders")
));
default = "grub";
};
features.applications.extraPackages = lib.mkOption {
type = lib.types.listOf (lib.types.package);
default = [];
};
};
};
flake.homeModules.global = { pkgs, config, lib, ... }: {
options = {
info = {
rootPath = lib.mkOption {
type = lib.types.str;
default = "/home/grey/nixos";
};
hostName = lib.mkOption {
type = lib.types.str;
default = "";
};
stateVersion = lib.mkOption {
type = lib.types.str;
default = "";
};
isStandalone = lib.mkOption {
type = lib.types.bool;
default = true;
};
};
features.applications = {
shellScripts = lib.mkOption {
type = lib.types.attrsOf (lib.types.str);
default = [];
};
extraPackages = lib.mkOption {
type = lib.types.listOf (lib.types.package);
default = [];
};
};
};
};
}