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:
greyweather committed 2026-08-30 02:54:08 +01:00
1 parent 06e958ae71
commit 023fc0c424
7 files changed
+69 -34

No files matched your search

+17
View File
@@ -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};
};
};
}