Migrated from import based to config based
This commit is contained in:
@@ -1,8 +1,23 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.hplip ];
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.hardware.printing;
|
||||
in {
|
||||
options = {
|
||||
settings.hardware.printing.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable printer configuration
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.hplip ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user