Global nixfmt

This commit is contained in:
Fabian Hauser 2022-01-03 11:54:05 +01:00
parent 8306da0f09
commit 2bcc955f07
3 changed files with 12 additions and 17 deletions

View file

@ -25,10 +25,7 @@
-----END CERTIFICATE----- -----END CERTIFICATE-----
''; '';
}; };
dhcpIps = [ dhcpIps = [ "185.88.236.100" "212.103.68.20" ];
"185.88.236.100"
"212.103.68.20"
];
dhcpOptions = with builtins; dhcpOptions = with builtins;
concatStringsSep "\n" (map (ip: "dhcp-option DNS ${ip}") dhcpIps); concatStringsSep "\n" (map (ip: "dhcp-option DNS ${ip}") dhcpIps);
in { in {

View file

@ -16,25 +16,25 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernelParams = [ "acpi_enforce_resources=lax" ]; boot.kernelParams = [ "acpi_enforce_resources=lax" ];
hardware.firmware = [ pkgs.wireless-regdb ]; hardware.firmware = [ pkgs.wireless-regdb ];
hardware.cpu.amd.updateMicrocode = true; hardware.cpu.amd.updateMicrocode = true;
nix.maxJobs = lib.mkDefault 24; nix.maxJobs = lib.mkDefault 24;
powerManagement.powerUpCommands = let powerManagement.powerUpCommands = let
forceThunderboltOnScript = pkgs.writeScriptBin "force-thunderbolt-power-on" '' forceThunderboltOnScript =
#!${pkgs.stdenv.shell} pkgs.writeScriptBin "force-thunderbolt-power-on" ''
#!${pkgs.stdenv.shell}
#echo 'on' > '/sys/bus/pci/devices/0000:03:00.0/power/control'; #TODO: Is the main controller required? #echo 'on' > '/sys/bus/pci/devices/0000:03:00.0/power/control'; #TODO: Is the main controller required?
THUNDERBOLT_DEVICES="$(${pkgs.pciutils}/bin/lspci -D | ${pkgs.gnugrep}/bin/grep -i thunderbolt | cut --delimiter=' ' --fields=1)" THUNDERBOLT_DEVICES="$(${pkgs.pciutils}/bin/lspci -D | ${pkgs.gnugrep}/bin/grep -i thunderbolt | cut --delimiter=' ' --fields=1)"
echo "Force PCI power on all thunderbolt devices" echo "Force PCI power on all thunderbolt devices"
for DEVICE in $THUNDERBOLT_DEVICES; do for DEVICE in $THUNDERBOLT_DEVICES; do
echo 'on' > "/sys/bus/pci/devices/$DEVICE/power/control" echo 'on' > "/sys/bus/pci/devices/$DEVICE/power/control"
done done
''; '';
in "${forceThunderboltOnScript}/bin/force-thunderbolt-power-on"; in "${forceThunderboltOnScript}/bin/force-thunderbolt-power-on";
} }

View file

@ -1,5 +1,3 @@
{ config, lib, pkgs, modulesPath, ... }: { { config, lib, pkgs, modulesPath, ... }: {
hardware.rasdaemon = { hardware.rasdaemon = { enable = true; };
enable = true;
};
} }