summaryrefslogtreecommitdiff
path: root/sys/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'sys/hardware')
-rw-r--r--sys/hardware/altera.nix9
-rw-r--r--sys/hardware/apc.nix9
-rw-r--r--sys/hardware/athena.nix14
-rw-r--r--sys/hardware/bluetooth.nix9
-rw-r--r--sys/hardware/epson.nix10
-rw-r--r--sys/hardware/laptop.nix9
-rw-r--r--sys/hardware/printing.nix15
-rw-r--r--sys/hardware/thinkpad.nix18
-rw-r--r--sys/hardware/yubico.nix12
9 files changed, 68 insertions, 37 deletions
diff --git a/sys/hardware/altera.nix b/sys/hardware/altera.nix
index 2fc1bb6..fddd722 100644
--- a/sys/hardware/altera.nix
+++ b/sys/hardware/altera.nix
@@ -1,8 +1,11 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ ...
+}:
with lib; let
cfg = config.local.hardware.altera;
-in
-{
+in {
options.local.hardware.altera = {
enable = mkEnableOption "Altera USB Blaster";
};
diff --git a/sys/hardware/apc.nix b/sys/hardware/apc.nix
index 9614c48..97a5bb0 100644
--- a/sys/hardware/apc.nix
+++ b/sys/hardware/apc.nix
@@ -1,8 +1,11 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ ...
+}:
with lib; let
cfg = config.local.hardware.apc;
-in
-{
+in {
options.local.hardware.apc = {
enable = mkEnableOption "APC UPS support";
};
diff --git a/sys/hardware/athena.nix b/sys/hardware/athena.nix
index 06d10b3..755c184 100644
--- a/sys/hardware/athena.nix
+++ b/sys/hardware/athena.nix
@@ -1,10 +1,14 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
with lib; let
cfg = config.local.hardware.athena;
athena = pkgs.local.athena-bccr.${cfg.release};
-in
-{
+in {
options.local.hardware.athena = {
enable = mkEnableOption "Athena ASEDrive III smartcard reader";
@@ -25,11 +29,11 @@ in
'';
};
- systemPackages = [ athena.ase-pkcs11 ];
+ systemPackages = [athena.ase-pkcs11];
};
#FIXME: Extremadamente peligroso si BCCR o MICITT caen, investigar polĂ­tica nacional de root CA
- security.pki.certificateFiles = [ "${athena.bccr-cacerts}/root-ca.pem" ];
+ security.pki.certificateFiles = ["${athena.bccr-cacerts}/root-ca.pem"];
services = {
pcscd.enable = true;
diff --git a/sys/hardware/bluetooth.nix b/sys/hardware/bluetooth.nix
index 0d53750..63e3f0c 100644
--- a/sys/hardware/bluetooth.nix
+++ b/sys/hardware/bluetooth.nix
@@ -1,8 +1,11 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ ...
+}:
with lib; let
cfg = config.local.hardware.bluetooth;
-in
-{
+in {
options.local.hardware.bluetooth = {
enable = mkEnableOption "bluetooth services";
};
diff --git a/sys/hardware/epson.nix b/sys/hardware/epson.nix
index 66304f9..30b1303 100644
--- a/sys/hardware/epson.nix
+++ b/sys/hardware/epson.nix
@@ -1,8 +1,12 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
with lib; let
cfg = config.local.hardware.epson;
-in
-{
+in {
options.local.hardware.epson = {
enable = mkEnableOption "Epson printers and scanners";
};
diff --git a/sys/hardware/laptop.nix b/sys/hardware/laptop.nix
index d9ba753..3b5b772 100644
--- a/sys/hardware/laptop.nix
+++ b/sys/hardware/laptop.nix
@@ -1,8 +1,11 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ ...
+}:
with lib; let
cfg = config.local.hardware.laptop;
-in
-{
+in {
options.local.hardware.laptop = {
enable = mkEnableOption "laptop stuff";
};
diff --git a/sys/hardware/printing.nix b/sys/hardware/printing.nix
index 30c6962..e11a016 100644
--- a/sys/hardware/printing.nix
+++ b/sys/hardware/printing.nix
@@ -1,15 +1,18 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ ...
+}:
with lib; let
cfg = config.local.hardware.printing;
inherit (config.local.net) dhcpInterface;
-in
-{
+in {
options.local.hardware.printing = {
enable = mkEnableOption "print and scan services";
users = mkOption {
type = with types; listOf str;
- default = [ ];
+ default = [];
};
};
@@ -32,7 +35,7 @@ in
hardware.sane.enable = true;
networking.firewall.interfaces = mkIf (dhcpInterface != null) {
- ${dhcpInterface}.allowedUDPPorts = [ 5353 ];
+ ${dhcpInterface}.allowedUDPPorts = [5353];
};
services.printing.enable = true;
@@ -40,7 +43,7 @@ in
users.users = listToAttrs (map
(user: {
name = user;
- value.extraGroups = [ "scanner" "lp" ];
+ value.extraGroups = ["scanner" "lp"];
})
cfg.users);
};
diff --git a/sys/hardware/thinkpad.nix b/sys/hardware/thinkpad.nix
index 7341e68..ab18694 100644
--- a/sys/hardware/thinkpad.nix
+++ b/sys/hardware/thinkpad.nix
@@ -1,8 +1,12 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
with lib; let
cfg = config.local.hardware.thinkpad;
-in
-{
+in {
options.local.hardware.thinkpad = {
enable = mkEnableOption "Thinkpad hardware support";
};
@@ -13,18 +17,18 @@ in
# Fingerprint sensor requires a firmware-update to work.
boot = {
- extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
+ extraModulePackages = with config.boot.kernelPackages; [acpi_call];
extraModprobeConfig = "options iwlwifi 11n_disable=1 wd_disable=1";
# acpi_call makes tlp work for newer thinkpads
- kernelModules = [ "acpi_call" ];
+ kernelModules = ["acpi_call"];
# Force use of the thinkpad_acpi driver for backlight control.
# This allows the backlight save/load systemd service to work.
- kernelParams = [ "acpi_backlight=native" ];
+ kernelParams = ["acpi_backlight=native"];
};
- hardware.firmware = [ pkgs.sof-firmware ];
+ hardware.firmware = [pkgs.sof-firmware];
local.hardware.laptop.enable = true;
diff --git a/sys/hardware/yubico.nix b/sys/hardware/yubico.nix
index 0078210..0c8478c 100644
--- a/sys/hardware/yubico.nix
+++ b/sys/hardware/yubico.nix
@@ -1,8 +1,12 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
with lib; let
cfg = config.local.hardware.yubico;
-in
-{
+in {
options.local.hardware.yubico = {
enable = mkEnableOption "Yubico hardware support";
};
@@ -14,7 +18,7 @@ in
services = {
pcscd.enable = true;
- udev.packages = [ pkgs.yubikey-personalization ];
+ udev.packages = [pkgs.yubikey-personalization];
};
};
}