cups: Add module

This commit is contained in:
PapaTutuWawa 2022-04-27 13:10:16 +02:00
parent 59f061711a
commit 1361348bf1
4 changed files with 29 additions and 3 deletions

View File

@ -51,9 +51,11 @@
zsh.enable = true; zsh.enable = true;
git.enable = true; git.enable = true;
office.enable = true; office.enable = true;
plasma.enable = true;
}; };
services = { services = {
gdm.enable = true; cups.enable = true;
gnome.enable = true;
kanshi = let kanshi = let
horizontal = "Samsung Electric Company C27F398 H4ZR101145"; horizontal = "Samsung Electric Company C27F398 H4ZR101145";

View File

@ -32,6 +32,7 @@
./services/gamemode ./services/gamemode
./services/i18n ./services/i18n
./services/greetd ./services/greetd
./services/cups
# User # User
#./users/default.nix #./users/default.nix

View File

@ -0,0 +1,23 @@
{ lib, config, pkgs, ...}:
let
cfg = config.ptw.services.cups;
in {
options.ptw.services.cups = {
enable = lib.mkEnableOption "Enable Cups";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ gnome.simple-scan ];
services.printing = {
enable = true;
drivers = with pkgs; [ hplip ];
};
hardware.sane = {
enable = true;
extraBackends = with pkgs; [ sane-airscan hplip ];
};
};
}

View File

@ -4,7 +4,7 @@
config = lib.mkIf (config.ptw.system.singleUser == "alexander") { config = lib.mkIf (config.ptw.system.singleUser == "alexander") {
users.users.alexander = { users.users.alexander = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "audio" "video" "kvm" "input" "libvirtd" ]; extraGroups = [ "wheel" "audio" "video" "kvm" "input" "libvirtd" "scanner" "lp" ];
hashedPassword = "$5$i4aZuQ/WXP.rFOc$lCzDqbrVsqBQt5954O.3bFPknD0jn27MmqzmE4DIAEC"; hashedPassword = "$5$i4aZuQ/WXP.rFOc$lCzDqbrVsqBQt5954O.3bFPknD0jn27MmqzmE4DIAEC";
shell = pkgs.zsh; shell = pkgs.zsh;
useDefaultShell = false; useDefaultShell = false;