The options API has been updated, in order for a more flexible setup with `local.modules.desktop.enable` being replaced with an enum of desktops at `local.systemVars.desktop`, which allows for switching desktop environments by changing a single option. This is so that we can switch to cosmic and only enable the programs we need (i.e. disable greetd because we use cosmic-greeter and enable terminals since that is desktop related). This is simpler than having a different module per desktop.
36 lines
665 B
Nix
36 lines
665 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}: {
|
|
config = lib.mkIf (config.local.systemVars.desktop != "none") {
|
|
services = {
|
|
# setup printing service
|
|
printing.enable = true;
|
|
|
|
avahi = {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
printing.drivers = [
|
|
pkgs.gutenprint
|
|
pkgs.hplip
|
|
];
|
|
|
|
udev.packages = [
|
|
pkgs.sane-airscan
|
|
pkgs.utsushi
|
|
];
|
|
};
|
|
|
|
hardware.sane.enable = true; # enables support for SANE scanners
|
|
hardware.sane.extraBackends = [
|
|
pkgs.sane-airscan # generic
|
|
pkgs.hplip # HP
|
|
pkgs.utsushi # other printers
|
|
];
|
|
};
|
|
}
|