mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-06-07 21:39:23 +02:00
move nixos modules to nixos-modules
This commit is contained in:
parent
7394c5f317
commit
611796f02e
29 changed files with 225 additions and 7 deletions
36
nixos-modules/printing/default.nix
Normal file
36
nixos-modules/printing/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.jopejoe1.printing;
|
||||
in
|
||||
{
|
||||
options.jopejoe1.printing = {
|
||||
enable = lib.mkEnableOption "Enable Printing";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.printing = {
|
||||
enable = true;
|
||||
webInterface = true;
|
||||
drivers = with pkgs; [ ];
|
||||
};
|
||||
|
||||
hardware = {
|
||||
sane = {
|
||||
enable = true;
|
||||
extraBackends = with pkgs; [ sane-airscan ];
|
||||
};
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue