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
852 B
Nix
39 lines
852 B
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
printingDrivers = [
|
|
pkgs.hplip
|
|
pkgs.hplipWithPlugin
|
|
];
|
|
in
|
|
{
|
|
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.services.printing.users packages;
|
|
services.printing = {
|
|
enable = true;
|
|
drivers = printingDrivers;
|
|
};
|
|
hardware.sane = {
|
|
enable = true;
|
|
extraBackends = printingDrivers;
|
|
};
|
|
};
|
|
}
|