Files
NixOS/modules/shell/exercism.nix
Danilo Reyes f1e6015d39 Add multi-user support for package installations across various modules
Updated multiple configuration files to include a `merge` option for user management, enhancing the ability to handle multi-user setups for applications and services. This change improves flexibility in managing user-specific package installations, ensuring a more streamlined configuration process.
2026-01-16 13:38:49 -06:00

31 lines
780 B
Nix

{
config,
inputs,
lib,
pkgs,
...
}:
{
options.my.shell.exercism = {
enable = lib.mkEnableOption "Exercism coding practice platform";
users = lib.mkOption {
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
default = config.my.toggleUsers.shell;
merge = inputs.self.lib.mergeUsersOption lib;
description = "Users to install Exercism for";
};
};
config = lib.mkIf config.my.shell.exercism.enable {
users.users =
let
packages = builtins.attrValues {
inherit (pkgs)
exercism # learn to code
bats # testing system, required by Exercism
;
};
in
inputs.self.lib.mkUserPackages lib config.my.shell.exercism.users packages;
};
}