uses a custom function from my helper flake to convert a basic attrset of strings into a format `home.file` will accept
17 lines
588 B
Nix
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};
|
|
};
|
|
};
|
|
} |