Removed the `lib.nix` file and refactored various modules to utilize `inputs.self.lib` for user package and attribute management. This change enhances consistency and maintainability across the configuration files.
30 lines
598 B
Nix
30 lines
598 B
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
printingDrivers = [
|
|
pkgs.hplip
|
|
pkgs.hplipWithPlugin
|
|
];
|
|
in
|
|
{
|
|
options.my.services.printing.enable = lib.mkEnableOption "printing services and drivers";
|
|
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;
|
|
services.printing = {
|
|
enable = true;
|
|
drivers = printingDrivers;
|
|
};
|
|
hardware.sane = {
|
|
enable = true;
|
|
extraBackends = printingDrivers;
|
|
};
|
|
};
|
|
}
|