diff options
Diffstat (limited to 'system/settings/hardware')
23 files changed, 142 insertions, 79 deletions
diff --git a/system/settings/hardware/adb.nix b/system/settings/hardware/adb.nix index 0c27b380..be151695 100644 --- a/system/settings/hardware/adb.nix +++ b/system/settings/hardware/adb.nix @@ -1,10 +1,12 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { programs.adb.enable = true; users.groups.adbusers = {}; services.udev = { - packages = [ pkgs.android-udev-rules ]; + packages = [pkgs.android-udev-rules]; }; } diff --git a/system/settings/hardware/audio.nix b/system/settings/hardware/audio.nix index 036fb37d..823edaeb 100644 --- a/system/settings/hardware/audio.nix +++ b/system/settings/hardware/audio.nix @@ -1,6 +1,9 @@ -{ config, pkgs, ... }: - -{ services.pipewire = { +{ + config, + pkgs, + ... +}: { + services.pipewire = { enable = true; audio.enable = true; alsa.enable = true; diff --git a/system/settings/hardware/bare-metal.nix b/system/settings/hardware/bare-metal.nix index ce8e57e2..0b8ce6d2 100644 --- a/system/settings/hardware/bare-metal.nix +++ b/system/settings/hardware/bare-metal.nix @@ -1,8 +1,11 @@ -{ config, pkgs, ... }: - -{ environment.systemPackages = with pkgs; [ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ exfat - efibootmgr + efibootmgr cryptsetup dmidecode hdparm @@ -28,7 +31,7 @@ ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq" ''; - boot.kernelModules = [ "tcp_bbr" ]; + boot.kernelModules = ["tcp_bbr"]; boot.kernel.sysctl = { "net.core.default_qdisc" = "cake"; "net.ipv4.tcp_allowed_congestion_control" = "bbr illinois reno lp"; @@ -44,6 +47,6 @@ }; boot.tmpOnTmpfs = true; - fileSystems."/".options = [ "noatime" "nodiratime" ]; - fileSystems."/home".options = [ "noatime" "nodiratime" ]; + fileSystems."/".options = ["noatime" "nodiratime"]; + fileSystems."/home".options = ["noatime" "nodiratime"]; } diff --git a/system/settings/hardware/bluetooth-audio.nix b/system/settings/hardware/bluetooth-audio.nix index 69f46984..26e3ca70 100644 --- a/system/settings/hardware/bluetooth-audio.nix +++ b/system/settings/hardware/bluetooth-audio.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { hardware = { bluetooth = { package = pkgs.bluezFull; diff --git a/system/settings/hardware/bluetooth.nix b/system/settings/hardware/bluetooth.nix index 258fdb29..54a1792a 100644 --- a/system/settings/hardware/bluetooth.nix +++ b/system/settings/hardware/bluetooth.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { hardware = { bluetooth = { enable = true; diff --git a/system/settings/hardware/connman.nix b/system/settings/hardware/connman.nix index 91b6aab1..e8e04244 100644 --- a/system/settings/hardware/connman.nix +++ b/system/settings/hardware/connman.nix @@ -1,9 +1,12 @@ -{ config, pkgs, ... }: - -{ services.connman = { +{ + config, + pkgs, + ... +}: { + services.connman = { enable = true; enableVPN = false; - extraFlags = [ "--nodnsproxy" ]; + extraFlags = ["--nodnsproxy"]; }; networking.useDHCP = false; diff --git a/system/settings/hardware/grub2.nix b/system/settings/hardware/grub2.nix index cd1fd619..a020baa7 100644 --- a/system/settings/hardware/grub2.nix +++ b/system/settings/hardware/grub2.nix @@ -1,6 +1,10 @@ -{ config, pkgs, lib, ... }: - -{ boot.loader = { +{ + config, + pkgs, + lib, + ... +}: { + boot.loader = { grub = { enable = true; splashImage = null; diff --git a/system/settings/hardware/intel-gpu.nix b/system/settings/hardware/intel-gpu.nix index 3503c315..c606de79 100644 --- a/system/settings/hardware/intel-gpu.nix +++ b/system/settings/hardware/intel-gpu.nix @@ -1,13 +1,15 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # https://wiki.gentoo.org/wiki/Intel#Feature_support services.xserver = { useGlamor = true; deviceSection = '' Option "DRI" "3" ''; - videoDrivers = [ "intel" ]; + videoDrivers = ["intel"]; }; boot.kernelParams = [ diff --git a/system/settings/hardware/iwd.nix b/system/settings/hardware/iwd.nix index f1a67764..c0090f26 100644 --- a/system/settings/hardware/iwd.nix +++ b/system/settings/hardware/iwd.nix @@ -1,10 +1,12 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { networking.wireless.iwd = { enable = true; }; - users.users.alan.extraGroups = [ "network" ]; + users.users.alan.extraGroups = ["network"]; services.connman.wifi.backend = "iwd"; } diff --git a/system/settings/hardware/keyboard.nix b/system/settings/hardware/keyboard.nix index c967d561..3ff11b83 100644 --- a/system/settings/hardware/keyboard.nix +++ b/system/settings/hardware/keyboard.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { services.xserver = { layout = "us"; xkbVariant = "intl-unicode"; diff --git a/system/settings/hardware/keyboardio-model01.nix b/system/settings/hardware/keyboardio-model01.nix index 9c44a916..c10533bd 100644 --- a/system/settings/hardware/keyboardio-model01.nix +++ b/system/settings/hardware/keyboardio-model01.nix @@ -1,6 +1,9 @@ -{ config, pkgs, ... }: - -{ services.udev.extraRules = '' +{ + config, + pkgs, + ... +}: { + services.udev.extraRules = '' SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2300", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0" SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2301", SYMLINK+="model01", ENV{ID_MM_DEVICE_IGNORE}:="1", ENV{ID_MM_CANDIDATE}:="0" ''; diff --git a/system/settings/hardware/laptop.nix b/system/settings/hardware/laptop.nix index 946dbda7..ee67d38f 100644 --- a/system/settings/hardware/laptop.nix +++ b/system/settings/hardware/laptop.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { imports = [ ./bluetooth.nix ./bluetooth-audio.nix @@ -10,10 +13,9 @@ ../user-interface.nix ]; - boot.kernelModules = [ "coretemp" ]; + boot.kernelModules = ["coretemp"]; environment.systemPackages = with pkgs; [ - powerstat powertop @@ -28,7 +30,7 @@ enable = true; defaultTarget = "common"; }; - systemd.services.autorandr.wantedBy = [ "graphical.target" ]; + systemd.services.autorandr.wantedBy = ["graphical.target"]; environment.etc.autorandr = { enable = true; diff --git a/system/settings/hardware/mouse.nix b/system/settings/hardware/mouse.nix index 83e76d71..6104ea47 100644 --- a/system/settings/hardware/mouse.nix +++ b/system/settings/hardware/mouse.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - -{ +{ + config, + pkgs, + ... +}: { services.xserver.libinput = { enable = true; mouse = { diff --git a/system/settings/hardware/network-manager.nix b/system/settings/hardware/network-manager.nix index 6ab0c818..22711b10 100644 --- a/system/settings/hardware/network-manager.nix +++ b/system/settings/hardware/network-manager.nix @@ -1,6 +1,9 @@ -{ config, lib, pkgs, ... }: - { + config, + lib, + pkgs, + ... +}: { networking = { networkmanager = { enable = true; diff --git a/system/settings/hardware/nitrokey.nix b/system/settings/hardware/nitrokey.nix index a77ce00c..58e62195 100644 --- a/system/settings/hardware/nitrokey.nix +++ b/system/settings/hardware/nitrokey.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { hardware.nitrokey = { enable = true; }; diff --git a/system/settings/hardware/nvidia-gpu.nix b/system/settings/hardware/nvidia-gpu.nix index 052cd678..4024f069 100644 --- a/system/settings/hardware/nvidia-gpu.nix +++ b/system/settings/hardware/nvidia-gpu.nix @@ -1,16 +1,18 @@ -{ config, pkgs, lib, ... }: - -let - nvidia_x11 = config.boot.kernelPackages.nvidia_x11; -in { - services.xserver.videoDrivers = [ "nvidia" ]; + config, + pkgs, + lib, + ... +}: let + nvidia_x11 = config.boot.kernelPackages.nvidia_x11; +in { + services.xserver.videoDrivers = ["nvidia"]; boot = { - blacklistedKernelModules = [ "nouveau" ]; - extraModulePackages = [ nvidia_x11 ]; + blacklistedKernelModules = ["nouveau"]; + extraModulePackages = [nvidia_x11]; }; - environment.systemPackages = [ nvidia_x11 ]; + environment.systemPackages = [nvidia_x11]; hardware.nvidia = { powerManagement = { enable = true; diff --git a/system/settings/hardware/nvme-root.nix b/system/settings/hardware/nvme-root.nix index 3ba26f50..310a0482 100644 --- a/system/settings/hardware/nvme-root.nix +++ b/system/settings/hardware/nvme-root.nix @@ -1,5 +1,7 @@ -{ config, pkgs, ...}: - { + config, + pkgs, + ... +}: { boot.kernelParams = ["elevator=none"]; } diff --git a/system/settings/hardware/personal-computer.nix b/system/settings/hardware/personal-computer.nix index e8574b3d..e7160950 100644 --- a/system/settings/hardware/personal-computer.nix +++ b/system/settings/hardware/personal-computer.nix @@ -1,6 +1,9 @@ -{ config, pkgs, lib, ... }: - { + config, + pkgs, + lib, + ... +}: { boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; powerManagement.cpuFreqGovernor = "schedutil"; } diff --git a/system/settings/hardware/printing.nix b/system/settings/hardware/printing.nix index fb31e79f..474b37b7 100644 --- a/system/settings/hardware/printing.nix +++ b/system/settings/hardware/printing.nix @@ -1,13 +1,17 @@ -{ config, pkgs, lib, ... }: - -{ services.printing.enable = true; +{ + config, + pkgs, + lib, + ... +}: { + services.printing.enable = true; systemd.services.cups.wantedBy = lib.mkForce []; - systemd.sockets.cups.wantedBy = [ "sockets.target" ]; + systemd.sockets.cups.wantedBy = ["sockets.target"]; systemd.services.cups-browsed.wantedBy = lib.mkForce []; systemd.timers.cups-browsed = { description = "Delayed startup of CUPS Remote Printer Discovery"; - wantedBy = [ "timers.target" ]; + wantedBy = ["timers.target"]; timerConfig = { OnActiveSec = "2 min"; }; diff --git a/system/settings/hardware/systemd-boot.nix b/system/settings/hardware/systemd-boot.nix index bc5fca59..e8c06527 100644 --- a/system/settings/hardware/systemd-boot.nix +++ b/system/settings/hardware/systemd-boot.nix @@ -1,6 +1,9 @@ -{ config, pkgs, ... }: - -{ boot.loader.systemd-boot = { +{ + config, + pkgs, + ... +}: { + boot.loader.systemd-boot = { enable = true; editor = false; # Don't allow modification }; diff --git a/system/settings/hardware/thinkpad.nix b/system/settings/hardware/thinkpad.nix index 4f4e6b8c..99d91263 100644 --- a/system/settings/hardware/thinkpad.nix +++ b/system/settings/hardware/thinkpad.nix @@ -1,7 +1,10 @@ -{ config, pkgs, ... }: - -{ boot.kernelModules = [ ]; - boot.blacklistedKernelModules = [ "thinkpad_ec" ]; +{ + config, + pkgs, + ... +}: { + boot.kernelModules = []; + boot.blacklistedKernelModules = ["thinkpad_ec"]; boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; diff --git a/system/settings/hardware/trackball.nix b/system/settings/hardware/trackball.nix index 9aa5abc0..7445c5bb 100644 --- a/system/settings/hardware/trackball.nix +++ b/system/settings/hardware/trackball.nix @@ -1,6 +1,9 @@ -{ config, pkgs, ... }: - -{ services.xserver.config = '' +{ + config, + pkgs, + ... +}: { + services.xserver.config = '' Section "InputClass" Identifier "Trackball (No Acceleration)" MatchIsPointer "yes" diff --git a/system/settings/hardware/trezor.nix b/system/settings/hardware/trezor.nix index 60867e07..e24fc92e 100644 --- a/system/settings/hardware/trezor.nix +++ b/system/settings/hardware/trezor.nix @@ -1,10 +1,14 @@ -{ config, lib, pkgs, ... }: - -{ services.trezord.enable = true; +{ + config, + lib, + pkgs, + ... +}: { + services.trezord.enable = true; environment.systemPackages = with pkgs; [ gnupg pinentry - (python3.withPackages(ps: with ps; [ trezor_agent wheel ])) + (python3.withPackages (ps: with ps; [trezor_agent wheel])) trezor-suite ]; programs.gnupg.agent = { |