Files
nix-flake/modules/features/shells.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

17 lines
588 B
Nix

{ inputs, self, ... }: {
flake.nixosModules.global = { config, pkgs, lib, ... }: {
options.features.shells.defaultShell = lib.mkOption {
type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/features/shells")
));
default = "zsh";
};
config = {
programs.${config.features.shells.defaultShell}.enable = true;
users.defaultUserShell = pkgs.${config.features.shells.defaultShell};
users.users."grey".shell = pkgs.${config.features.shells.defaultShell};
};
};
}