Skip to content
Permalink
Browse files

wip

  • Loading branch information
peterhoeg committed Aug 24, 2020
1 parent 6792240 commit 4ae437a191850925eb95572b7581f56e812774d6
Showing with 40 additions and 0 deletions.
  1. +39 −0 nixos/modules/hardware/sata.nix
  2. +1 −0 nixos/modules/module-list.nix
@@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:

let
cfg = config.hardware.sata;

deviceTimeout = d:
lib.optionalString (d.timeout > -1) ''
${pkgs.smartmontools}/bin/smartctl -l scterc,${d.timeout},${d.timeout} --silent errorsonly ${d.device}
'';

in
{
meta.maintainers = with lib.maintainers; [ peterhoeg ];

options = {

hardware.sata = with lib; {
timeout = mkOption {
default = -1;
example = "70";
type = types.int;
description = ''
Set SCT Error Recovery Control timeout in deciseconds for use in RAID configurations.
Values are as follows:
-1 = do not touch, leave at default
0 = disable SCT ERT
70 = default in consumer drives (7 seconds)
Maximum is disk dependant but probably 60 seconds.
'';
};
};

};

config = lib.mkIf config.hardware.mcelog.enable {
};
}
@@ -63,6 +63,7 @@
./hardware/tuxedo-keyboard.nix
./hardware/usb-wwan.nix
./hardware/onlykey.nix
./hardware/sata.nix
./hardware/wooting.nix
./hardware/uinput.nix
./hardware/video/amdgpu.nix

0 comments on commit 4ae437a

Please sign in to comment.
You can’t perform that action at this time.