config

NixOS config
Log | Files | Refs | README | LICENSE

default.nix (524B) - Raw


      1 {
      2   config,
      3   lib,
      4   pkgs,
      5   ...
      6 }:
      7 let
      8   cfg = config.mj.services.printing;
      9 in
     10 {
     11   options.mj.services.printing = with lib.types; {
     12     enable = lib.mkEnableOption "Enable printing";
     13   };
     14 
     15   config = lib.mkIf cfg.enable {
     16     services.printing = {
     17       enable = true;
     18       drivers = [
     19         pkgs.samsung-unified-linux-driver_4_01_17
     20         (pkgs.writeTextDir "share/cups/model/HP_Color_Laser_15x_Series.ppd" (
     21           builtins.readFile ../../../shared/HP_Color_Laser_15x_Series.ppd
     22         ))
     23       ];
     24     };
     25   };
     26 }