add printing
This commit is contained in:
parent
16110bb326
commit
ae437bff51
3 changed files with 28 additions and 4 deletions
14
default.nix
14
default.nix
|
@ -6,13 +6,21 @@ in {
|
|||
options.grimmShared = {
|
||||
enable = mkEnableOption "grimm-shared-modules";
|
||||
|
||||
enableLocale = mkOption {
|
||||
locale = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Sets german units but english language";
|
||||
};
|
||||
|
||||
printing = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enables print and scan related options";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [./modules/localisation.nix]
|
||||
;
|
||||
imports = [
|
||||
./modules/localisation.nix
|
||||
./modules/printing.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, ... }: let
|
||||
cfg = config.grimmShared;
|
||||
in {
|
||||
config = with cfg; lib.mkIf (enable && enableLocale) {
|
||||
config = with cfg; lib.mkIf (enable && locale) {
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
|
|
16
modules/printing.nix
Normal file
16
modules/printing.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, config, lib, ... }: let
|
||||
cfg = config.grimmShared;
|
||||
in {
|
||||
config = with cfg; lib.mkIf (enable && printing) {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.printing.drivers = with pkgs; [ brgenml1lpr brgenml1cupswrapper ];
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
services.printing.cups-pdf.enable = true;
|
||||
hardware.sane.brscan4.enable = true; # enables support for SANE scanners
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue