mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-09 03:56:09 +01:00
Merge 6c870034bf into 52113c4f5c
This commit is contained in:
commit
e04662a6ea
3 changed files with 123 additions and 0 deletions
25
acer/chromebook/cp713-1wn/alsa-ucm-conf-cros.nix
Normal file
25
acer/chromebook/cp713-1wn/alsa-ucm-conf-cros.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, alsa-ucm-conf
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
alsa-ucm-conf.overrideAttrs (oldAttrs: {
|
||||
wttsrc = fetchFromGitHub {
|
||||
owner = "WeirdTreeThing";
|
||||
repo = "alsa-ucm-conf-cros";
|
||||
rev = "1908a457c7f2bf8b63264fe3b1e0522ea632ac5a";
|
||||
hash = "sha256-h4qphJgXlEGMjpV4+llTaJeM3hoglmmgkXY8rOp+MAI=";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
cp -rf $wttsrc/ucm2 $out/share/alsa/
|
||||
'';
|
||||
|
||||
meta = oldAttrs.meta // {
|
||||
platforms = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
97
acer/chromebook/cp713-1wn/default.nix
Normal file
97
acer/chromebook/cp713-1wn/default.nix
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
alsa-ucm-conf-cros = pkgs.callPackage ./alsa-ucm-conf-cros.nix { };
|
||||
in {
|
||||
imports = [
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/hidpi.nix
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options snd-intel-dspcfg dsp_driver=4
|
||||
options snd-soc-avs ignore_fw_version=1
|
||||
options snd-soc-avs obsolete_card_names=1
|
||||
'';
|
||||
|
||||
boot.initrd.systemd.tpm2.enable = lib.mkDefault false;
|
||||
boot.kernelParams = [ "iomem=relaxed" ];
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
hardware.sensor.iio.enable = lib.mkDefault true;
|
||||
services = {
|
||||
libinput.enable = lib.mkDefault true;
|
||||
keyd.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
services.keyd = {
|
||||
keyboards = {
|
||||
# The name is just the name of the configuration file, it does not really matter
|
||||
default = {
|
||||
ids = [ "*" ]; # what goes into the [id] section, here we select all keyboards
|
||||
# Everything but the ID section:
|
||||
settings = {
|
||||
# The main layer, if you choose to declare it in Nix
|
||||
main = {
|
||||
f1 = "A-left";
|
||||
f2 = "A-right";
|
||||
f3 = "refresh";
|
||||
f4 = "A-f10";
|
||||
f5 = "A-tab";
|
||||
f6 = "brightnessdown";
|
||||
f7 = "brightnessup";
|
||||
f8 = "mute";
|
||||
f9 = "volumedown";
|
||||
f10 = "volumeup";
|
||||
f13 = "coffee";
|
||||
};
|
||||
control = {
|
||||
f5 = "sysrq";
|
||||
};
|
||||
alt = {
|
||||
leftmeta = "capslock";
|
||||
left = "home";
|
||||
right = "end";
|
||||
up = "pageup";
|
||||
down = "pagedown";
|
||||
backspace = "delete";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
# put here any extra-config, e.g. you can copy/paste here directly a configuration, just remove the ids part
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Optional, but makes sure that when you type the make palm rejection work with keyd
|
||||
# https://github.com/rvaiya/keyd/issues/723
|
||||
environment.etc."libinput/local-overrides.quirks".text = ''
|
||||
[Serial Keyboards]
|
||||
MatchUdevType=keyboard
|
||||
MatchName=keyd virtual keyboard
|
||||
AttrKeyboardIntegration=internal
|
||||
'';
|
||||
|
||||
security.tpm2.enable = lib.mkDefault false;
|
||||
|
||||
environment.sessionVariables.ALSA_CONFIG_UCM2 = lib.mkDefault "${alsa-ucm-conf-cros}/share/alsa/ucm2";
|
||||
|
||||
services.pipewire.wireplumber.extraConfig."51-increase-headroom" = {
|
||||
"monitor.alsa.rules" = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
"node.name" = "~alsa_output.*";
|
||||
}
|
||||
];
|
||||
actions = {
|
||||
"update-props" = {
|
||||
"api.alsa.headroom" = 4096;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -46,6 +46,7 @@
|
|||
in
|
||||
{
|
||||
acer-aspire-4810t = import ./acer/aspire/4810t;
|
||||
acer-chromebook-cp713-1wn = import ./acer/chromebook/cp713-1wn;
|
||||
airis-n990 = import ./airis/n990;
|
||||
aoostar-r1-n100 = import ./aoostar/r1/n100;
|
||||
apple-imac-14-2 = import ./apple/imac/14-2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue