Enhanced the configuration files to support multi-user management by introducing user options for multiple applications, including art, gaming, multimedia, and development tools. Updated existing modules to utilize these new user options, improving flexibility and maintainability in user package installations.
39 lines
969 B
Nix
39 lines
969 B
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
packages = builtins.attrValues {
|
|
inherit (pkgs) julia; # High-performance dynamic language for technical computing
|
|
};
|
|
in
|
|
{
|
|
options = {
|
|
my.dev.julia = {
|
|
enable = lib.mkEnableOption "Install Julia globally";
|
|
users = lib.mkOption {
|
|
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
|
default = config.my.toggleUsers.dev;
|
|
description = "Users to install Julia packages for";
|
|
};
|
|
};
|
|
devShells.julia = lib.mkOption {
|
|
type = lib.types.package;
|
|
default = pkgs.mkShell {
|
|
inherit packages;
|
|
name = "julia-dev-shell";
|
|
shellHook = ''
|
|
echo "🔬 Julia dev environment"
|
|
'';
|
|
};
|
|
description = "Julia development shell";
|
|
};
|
|
};
|
|
config = lib.mkIf config.my.dev.julia.enable {
|
|
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.julia.users { inherit packages; };
|
|
};
|
|
}
|