Add multi-user support for various applications and services
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.
This commit is contained in:
@@ -12,13 +12,20 @@ let
|
||||
];
|
||||
in
|
||||
{
|
||||
options.my.services.printing.enable = lib.mkEnableOption "printing services and drivers";
|
||||
options.my.services.printing = {
|
||||
enable = lib.mkEnableOption "printing services and drivers";
|
||||
users = lib.mkOption {
|
||||
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
||||
default = config.my.toggleUsers.services;
|
||||
description = "Users to install printing packages for";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.my.services.printing.enable {
|
||||
users.users =
|
||||
let
|
||||
packages = [ pkgs.simple-scan ];
|
||||
in
|
||||
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.services packages;
|
||||
inputs.self.lib.mkUserPackages lib config.my.services.printing.users packages;
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = printingDrivers;
|
||||
|
||||
Reference in New Issue
Block a user