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
This commit is contained in:
7 files changed
+69
-34
No files matched your search
@@ -0,0 +1,17 @@
|
||||
{ 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};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user