Initial commit
This commit is contained in:
commit
cfcc57a8bd
353 changed files with 18756 additions and 0 deletions
41
flake/den/modules/aspects/provides/user-shell.nix
Normal file
41
flake/den/modules/aspects/provides/user-shell.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ den, ... }:
|
||||
let
|
||||
|
||||
description = ''
|
||||
Sets a user default shell, enables the shell at OS and Home level.
|
||||
|
||||
Usage:
|
||||
|
||||
den.aspects.vic.includes = [
|
||||
# will always love red snappers.
|
||||
(den._.user-shell "fish")
|
||||
];
|
||||
'';
|
||||
|
||||
userShell =
|
||||
shell: user:
|
||||
let
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.${shell}.enable = true;
|
||||
users.users.${user.userName}.shell = pkgs.${shell};
|
||||
};
|
||||
darwin = nixos;
|
||||
homeManager.programs.${shell}.enable = true;
|
||||
in
|
||||
{
|
||||
inherit nixos darwin homeManager;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
den.provides.user-shell = shell: {
|
||||
inherit description;
|
||||
__functor = den.lib.parametric.atLeast;
|
||||
includes = [
|
||||
({ user, ... }: userShell shell user)
|
||||
({ home, ... }: userShell shell home)
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue