Updated multiple configuration files to replace the user option type with a unified `usersOptionType`, enhancing consistency in user management across applications and services. This change simplifies the user configuration process and improves maintainability.
30 lines
700 B
Nix
30 lines
700 B
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
options.my.shell.exercism = {
|
|
enable = lib.mkEnableOption "Exercism coding practice platform";
|
|
users = lib.mkOption {
|
|
type = inputs.self.lib.usersOptionType lib;
|
|
default = config.my.toggleUsers.shell;
|
|
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;
|
|
};
|
|
}
|