mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 05:39:05 +08:00
整理 printer 设置
This commit is contained in:
parent
11e6287c26
commit
649c48ce09
@ -177,6 +177,7 @@
|
||||
{
|
||||
bluetooth.enable = true;
|
||||
joystick.enable = true;
|
||||
printer.enable = true;
|
||||
};
|
||||
packages =
|
||||
{
|
||||
@ -192,7 +193,6 @@
|
||||
./modules/sops.nix
|
||||
./modules/boot/chn-PC.nix
|
||||
[ ./modules/hardware/nvidia-prime.nix { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; } ]
|
||||
./modules/hardware/printer.nix
|
||||
./modules/hardware/sound.nix
|
||||
./modules/hardware/chn-PC.nix
|
||||
./modules/networking/basic.nix
|
||||
|
@ -4,7 +4,19 @@ inputs:
|
||||
{
|
||||
bluetooth.enable = mkOption { type = types.bool; default = false; };
|
||||
joystick.enable = mkOption { type = types.bool; default = false; };
|
||||
printer.enable = mkOption { type = types.bool; default = false; };
|
||||
};
|
||||
config =
|
||||
{
|
||||
hardware = {}
|
||||
// (if inputs.config.nixos.hardware.bluetooth.enable then { bluetooth.enable = true; } else {})
|
||||
// (if inputs.config.nixos.hardware.joystick.enable then { xone.enable = true; xpadneo.enable = true; } else {});
|
||||
services = {}
|
||||
// (if inputs.config.nixos.hardware.printer.enable then
|
||||
{
|
||||
printing = { enable = true; drivers = [ inputs.pkgs.cnijfilter2 ]; };
|
||||
avahi = { enable = true; nssmdns = true; openFirewall = true; };
|
||||
}
|
||||
else {});
|
||||
};
|
||||
config.hardware = { bluetooth.enable = inputs.config.nixos.hardware.bluetooth.enable; }
|
||||
// (if inputs.config.nixos.hardware.joystick.enable then { xone.enable = true; xpadneo.enable = true; } else {});
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config.services =
|
||||
{
|
||||
printing = { enable = true; drivers = [ inputs.pkgs.cnijfilter2 ]; };
|
||||
avahi = { enable = true; nssmdns = true; openFirewall = true; };
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user