summary refs log tree commit diff stats
path: root/system/modules/hardware
diff options
context:
space:
mode:
authorAlan Pearce2019-10-08 21:44:57 +0200
committerAlan Pearce2019-10-08 21:44:57 +0200
commit0a50d682ec85bf023bebd68a3ca388001f0c0677 (patch)
tree3f725c5a36633ec5b59df37f156a03ee2a971656 /system/modules/hardware
parent40fd4964068d0b7628b6f699dab4aec200eadb0a (diff)
downloadnixfiles-0a50d682ec85bf023bebd68a3ca388001f0c0677.tar.lz
nixfiles-0a50d682ec85bf023bebd68a3ca388001f0c0677.tar.zst
nixfiles-0a50d682ec85bf023bebd68a3ca388001f0c0677.zip
mv modules settings
Diffstat (limited to 'system/modules/hardware')
-rw-r--r--system/modules/hardware/adb.nix9
-rw-r--r--system/modules/hardware/audio.nix20
-rw-r--r--system/modules/hardware/bare-metal.nix29
-rw-r--r--system/modules/hardware/connman.nix14
-rw-r--r--system/modules/hardware/grub2.nix13
-rw-r--r--system/modules/hardware/hidpi.nix9
-rw-r--r--system/modules/hardware/intel-gpu.nix15
-rw-r--r--system/modules/hardware/keyboardio-model01.nix13
-rw-r--r--system/modules/hardware/laptop.nix87
-rw-r--r--system/modules/hardware/mouse.nix12
-rw-r--r--system/modules/hardware/network-manager.nix12
-rw-r--r--system/modules/hardware/nitrokey.nix13
-rw-r--r--system/modules/hardware/nvidia-gpu.nix5
-rw-r--r--system/modules/hardware/printing.nix19
-rw-r--r--system/modules/hardware/qwerty.nix9
-rw-r--r--system/modules/hardware/synaptics.nix27
-rw-r--r--system/modules/hardware/systemd-boot.nix10
-rw-r--r--system/modules/hardware/thinkpad.nix26
-rw-r--r--system/modules/hardware/trackball.nix13
-rw-r--r--system/modules/hardware/trezor.nix13
20 files changed, 0 insertions, 368 deletions
diff --git a/system/modules/hardware/adb.nix b/system/modules/hardware/adb.nix
deleted file mode 100644
index 8b511f55..00000000
--- a/system/modules/hardware/adb.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ config, pkgs, ... }:
-
-{ programs.adb.enable = true;
-  users.groups.adbusers = {};
-
-  services.udev = {
-   packages = [ pkgs.android-udev-rules ];
-  };
-}
diff --git a/system/modules/hardware/audio.nix b/system/modules/hardware/audio.nix
deleted file mode 100644
index ed956919..00000000
--- a/system/modules/hardware/audio.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ config, pkgs, ... }:
-
-{ hardware.pulseaudio = {
-    enable = true;
-    support32Bit = true;
-    daemon.config = {
-      flat-volumes = "no";
-    };
-    package = if config.hardware.bluetooth.enable
-      then pkgs.pulseaudioFull
-      else pkgs.pulseaudio;
-  };
-
-  sound.enable = true;
-
-  environment.systemPackages = with pkgs; [
-    pamixer
-    pavucontrol
-  ];
-}
diff --git a/system/modules/hardware/bare-metal.nix b/system/modules/hardware/bare-metal.nix
deleted file mode 100644
index 0a61790a..00000000
--- a/system/modules/hardware/bare-metal.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ config, pkgs, ... }:
-
-{ environment.systemPackages = with pkgs; [
-    fuse_exfat
-    cryptsetup
-    dmidecode
-    hdparm
-    pciutils
-    usbutils
-  ];
-
-  hardware.cpu.intel.updateMicrocode = true;
-
-  boot.kernel.sysctl = {
-    "net.ipv4.tcp_allowed_congestion_control" = "illinois reno lp";
-    "net.ipv4.tcp_congestion_control" = "illinois";
-  };
-
-  zramSwap = {
-    enable = true;
-    algorithm = "zstd";
-  };
-  boot.tmpOnTmpfs = true;
-
-  boot.kernelModules = [ "bfq" ];
-
-  fileSystems."/".options = [ "noatime" "nodiratime" ];
-  fileSystems."/home".options = [ "noatime" "nodiratime" ];
-}
diff --git a/system/modules/hardware/connman.nix b/system/modules/hardware/connman.nix
deleted file mode 100644
index 0361f9cb..00000000
--- a/system/modules/hardware/connman.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ config, pkgs, ... }:
-
-{ networking.connman = {
-    enable = true;
-    enableVPN = false;
-  };
-  networking.wireless.enable = true;
-
-  environment.systemPackages = with pkgs; [
-    cmst
-    connman-notify
-    connman_dmenu
-  ];
-}
diff --git a/system/modules/hardware/grub2.nix b/system/modules/hardware/grub2.nix
deleted file mode 100644
index 70e86e71..00000000
--- a/system/modules/hardware/grub2.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ config, pkgs, ... }:
-
-{ boot.loader = {
-    grub = {
-      enable = true;
-      splashImage = null;
-      version = 2;
-      device = "nodev";
-      efiSupport = true;
-    };
-    efi.canTouchEfiVariables = true;
-  };
-}
diff --git a/system/modules/hardware/hidpi.nix b/system/modules/hardware/hidpi.nix
deleted file mode 100644
index 1f4644c5..00000000
--- a/system/modules/hardware/hidpi.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ config, pkgs, ... }:
-
-{ i18n = {
-    consoleFont = "ter-v24b";
-    consolePackages = with pkgs; [
-      terminus_font
-    ];
-  };
-}
diff --git a/system/modules/hardware/intel-gpu.nix b/system/modules/hardware/intel-gpu.nix
deleted file mode 100644
index fc6b6fa3..00000000
--- a/system/modules/hardware/intel-gpu.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ config, pkgs, ... }:
-
-{ hardware.opengl.extraPackages = with pkgs; [
-    vaapiIntel
-    vaapiVdpau
-    libvdpau-va-gl
-  ];
-
-  services.xserver.videoDrivers = [ "intel" "modesetting" ];
-
-  boot.earlyVconsoleSetup = true;
-  boot.initrd.kernelModules = [
-    "i915"
-  ];
-}
diff --git a/system/modules/hardware/keyboardio-model01.nix b/system/modules/hardware/keyboardio-model01.nix
deleted file mode 100644
index 7a624f56..00000000
--- a/system/modules/hardware/keyboardio-model01.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ 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"
-  '';
-
-  environment.systemPackages = with pkgs; [
-    arduino_core
-  ];
-
-  environment.variables.ARDUINO_PATH = "${pkgs.arduino_core}/share/arduino";
-}
diff --git a/system/modules/hardware/laptop.nix b/system/modules/hardware/laptop.nix
deleted file mode 100644
index 17e27b63..00000000
--- a/system/modules/hardware/laptop.nix
+++ /dev/null
@@ -1,87 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-{ boot.kernelModules = [ "coretemp" ];
-  boot.extraModulePackages = with config.boot.kernelPackages; [
-    x86_energy_perf_policy
-  ];
-
-  hardware = {
-    bluetooth = {
-      enable = true;
-      powerOnBoot = false;
-      package = pkgs.bluezFull;
-    };
-    pulseaudio = {
-      extraModules = with pkgs; [
-        pulseaudio-modules-bt
-      ];
-    };
-  };
-  systemd.services.bluetooth.wantedBy = lib.mkForce [];
-  systemd.timers.bluetooth = {
-    description = "Delayed startup of Bluetooth";
-    wantedBy = [ "timers.target" ];
-    timerConfig = {
-      OnActiveSec = "1 min";
-    };
-  };
-
-  environment.systemPackages = with pkgs; [
-    blueman
-    bluez-tools
-
-    powerstat
-    powertop
-
-    arandr
-    autorandr
-    disper
-  ];
-
-  programs.light.enable = true;
-
-  services.autorandr.enable = true;
-
-  services.logind.extraConfig = ''
-    IdleAction=suspend
-    IdleActionSec=600
-  '';
-
-  services.acpid = {
-    enable = true;
-    lidEventCommands = ''
-      ${pkgs.autorandr}/bin/autorandr --batch --change
-    '';
-  };
-
-  services.tlp = {
-    enable = true;
-    extraConfig = ''
-      CPU_SCALING_GOVERNOR_ON_BAT=powersave
-      ENERGY_PERF_POLICY_ON_BAT="balance_power"
-
-      SOUND_POWER_SAVE_ON_AC=60
-      DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wwan"
-    '';
-  };
-
-  services.xserver = {
-    libinput = {
-      enable = lib.mkDefault true;
-      naturalScrolling = true;
-      disableWhileTyping = true;
-    };
-    displayManager.sessionCommands = ''
-      ${pkgs.autorandr}/bin/autorandr --change --force
-      ${pkgs.blueman}/bin/blueman-applet &
-    '';
-  };
-
-  systemd.services.nixos-upgrade.unitConfig.ConditionACPower = true;
-  systemd.services.nix-gc.unitConfig.ConditionACPower = true;
-  systemd.services.docker-prune.unitConfig.ConditionACPower = true;
-
-  imports = [
-    ../user-interface.nix
-  ];
-}
diff --git a/system/modules/hardware/mouse.nix b/system/modules/hardware/mouse.nix
deleted file mode 100644
index b30d4124..00000000
--- a/system/modules/hardware/mouse.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ config, pkgs, ... }:
-
-{ services.xserver.config = ''
-    Section "InputClass"
-        Identifier "Mouse (No Acceleration)"
-        MatchIsPointer "yes"
-        MatchIsTouchpad "no"
-        Option "AccelerationProfile" "-1"
-        Option "AccelerationScheme" "none"
-    EndSection
-  '';
-}
diff --git a/system/modules/hardware/network-manager.nix b/system/modules/hardware/network-manager.nix
deleted file mode 100644
index f28548a1..00000000
--- a/system/modules/hardware/network-manager.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ config, pkgs, ... }:
-
-{ networking.networkmanager = {
-    enable = true;
-    dns = "unbound";
-  };
-
-  environment.systemPackages = with pkgs; [
-    networkmanagerapplet
-    networkmanager_dmenu
-  ];
-}
diff --git a/system/modules/hardware/nitrokey.nix b/system/modules/hardware/nitrokey.nix
deleted file mode 100644
index a77ce00c..00000000
--- a/system/modules/hardware/nitrokey.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-{
-  hardware.nitrokey = {
-    enable = true;
-  };
-
-  services.pcscd.enable = true;
-
-  environment.systemPackages = with pkgs; [
-    nitrokey-app
-  ];
-}
diff --git a/system/modules/hardware/nvidia-gpu.nix b/system/modules/hardware/nvidia-gpu.nix
deleted file mode 100644
index 9fc34169..00000000
--- a/system/modules/hardware/nvidia-gpu.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ config, pkgs, ... }:
-
-{ services.xserver.videoDrivers = [ "nvidia" ];
-  nixpkgs.config.allowUnfree = true;
-}
diff --git a/system/modules/hardware/printing.nix b/system/modules/hardware/printing.nix
deleted file mode 100644
index 96d3a959..00000000
--- a/system/modules/hardware/printing.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-{ services.printing.enable = true;
-  systemd.services.cups.wantedBy = lib.mkForce [];
-  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" ];
-    timerConfig = {
-      OnActiveSec = "2 min";
-    };
-  };
-
-  imports = [
-    ../services/zeroconf.nix
-  ];
-}
diff --git a/system/modules/hardware/qwerty.nix b/system/modules/hardware/qwerty.nix
deleted file mode 100644
index c967d561..00000000
--- a/system/modules/hardware/qwerty.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ config, pkgs, ... }:
-
-{
-  services.xserver = {
-    layout = "us";
-    xkbVariant = "intl-unicode";
-    xkbOptions = "altwin:prtsc_rwin,caps:escape";
-  };
-}
diff --git a/system/modules/hardware/synaptics.nix b/system/modules/hardware/synaptics.nix
deleted file mode 100644
index 9f075cce..00000000
--- a/system/modules/hardware/synaptics.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ config, pkgs, ... }:
-
-{ services.xserver = {
-    libinput.enable = false;
-    synaptics = {
-      enable = true;
-
-      accelFactor = "0.04";
-
-      minSpeed = "0.3";
-      maxSpeed = "0.6";
-
-      palmDetect = true;
-      palmMinWidth = 5;
-      palmMinZ = 20;
-
-      twoFingerScroll = true;
-      vertTwoFingerScroll = true;
-      horizTwoFingerScroll = true;
-      additionalOptions = ''
-        Option "RBCornerButton" "3"
-        Option "VertScrollDelta" "-111"
-        Option "HorizScrollDelta" "-111"
-      '';
-    };
-  };
-}
diff --git a/system/modules/hardware/systemd-boot.nix b/system/modules/hardware/systemd-boot.nix
deleted file mode 100644
index 80e79fdc..00000000
--- a/system/modules/hardware/systemd-boot.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ config, pkgs, ... }:
-
-{ boot.loader.systemd-boot = {
-    enable = true;
-    editor = false; # Don't allow modification
-  };
-  boot.loader.efi.canTouchEfiVariables = true;
-  boot.vesa = true;
-  boot.earlyVconsoleSetup = true;
-}
diff --git a/system/modules/hardware/thinkpad.nix b/system/modules/hardware/thinkpad.nix
deleted file mode 100644
index 903e819b..00000000
--- a/system/modules/hardware/thinkpad.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ config, pkgs, ... }:
-
-{ boot.kernelModules = [ ];
-  boot.blacklistedKernelModules = [ "thinkpad_ec" ];
-  boot.extraModulePackages = with config.boot.kernelPackages; [
-    acpi_call
-  ];
-
-  hardware.trackpoint = {
-    enable = true;
-    emulateWheel = true;
-  };
-
-  services.thinkfan = {
-    enable = true;
-  };
-
-  services.tlp = {
-    enable = true;
-  };
-
-  imports = [
-    ./bare-metal.nix
-    ./laptop.nix
-  ];
-}
diff --git a/system/modules/hardware/trackball.nix b/system/modules/hardware/trackball.nix
deleted file mode 100644
index 9aa5abc0..00000000
--- a/system/modules/hardware/trackball.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ config, pkgs, ... }:
-
-{ services.xserver.config = ''
-    Section "InputClass"
-        Identifier "Trackball (No Acceleration)"
-        MatchIsPointer "yes"
-        MatchIsTouchpad "no"
-        MatchProduct "Trackball"
-        Option "AccelerationProfile" "-1"
-        Option "AccelerationScheme" "none"
-    EndSection
-  '';
-}
diff --git a/system/modules/hardware/trezor.nix b/system/modules/hardware/trezor.nix
deleted file mode 100644
index 33cc6f25..00000000
--- a/system/modules/hardware/trezor.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{ services.trezord.enable = true;
-  environment.systemPackages = with pkgs; [
-    gnupg
-    pinentry
-    (python3.withPackages(ps: with ps; [ trezor_agent wheel ]))
-  ];
-  programs.gnupg.agent = {
-    enable = lib.mkForce false;
-    enableSSHSupport = lib.mkForce false;
-  };
-}