Hi, Nix newbie here. I’ve recently bought the System76 Pangolin and installed NixOS straight away. I’ve had a lot of fun tinkering and setting up my workspaces, but one thing I have not been able to figure out is how to enable my microphone. It works properly in the Pop!_OS installation USB, but I can’t figure out how to get my NixOS setup to detect it. I believe that the problem is related to the output of arecord -l
. Here’s the output I get on the Pop!_OS installation medium:
pop-os@pop-os:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Generic_1 [HD-Audio Generic], device 0: CX11970 Analog [CX11970 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: acp6x [acp6x], device 0: DMIC capture dmic-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
and here’s what I get from NixOS:
[isaac:~]$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Generic_1 [HD-Audio Generic], device 0: CX11970 Analog [CX11970 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
Obviously, the missing piece is card 2: acp6x
. Anyone know how I can get this working? My audio output is working just fine. Thanks in advance
Edit: Here’s my full configuration.nix
:
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, lib, pkgs, ... }:
let
i3-modifier = "Mod4";
in
{
imports = [
./hardware-configuration.nix
<home-manager/nixos>
<nixos-hardware/system76>
];
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
environment.systemPackages = with pkgs; [
authy
chromium
glances
gnumake
lightlocker
lxqt.lxqt-policykit
nixpkgs-fmt
pavucontrol
shutter
spotify
thunderbird
wget
];
hardware = {
bluetooth.enable = true;
bluetooth.settings = {
General = {
ControllerMode = "bredr";
};
};
pulseaudio.enable = true;
system76 = {
enableAll = true;
kernel-modules.enable = true;
};
};
home-manager = {
useGlobalPkgs = true;
users.isaac = { pkgs, ... }: {
home = {
file.".git-prompt.sh".source = "${pkgs.git}/share/git/contrib/completion/git-prompt.sh";
stateVersion = "23.05";
};
programs = {
bash = {
enable = true;
# urxvt has a bug that starts text 23ish lines in. Remove clear from initExtra when this is fixed.
initExtra = ''
source ~/.git-prompt.sh;
PS1='\n\[\033[1;32m\][\[\e]0;\u@\h: \w\a\]\u:\w\033[35m\]$(__git_ps1 " (%s)")\033[32m\]]\$\[\033[0m\] '
clear
'';
shellAliases = {
dual-monitor = "xrandr --output HDMI-1 --right-of eDP-1 --auto";
rebuild = "sudo nixos-rebuild switch";
single-monitor = "xrandr --output HDMI-1 --off";
};
};
git = {
enable = true;
extraConfig = {
push.autoSetupRemote = true;
};
userEmail = "isaac.shaha64@gmail.com";
userName = "Isaac Shaha";
};
i3status = {
enable = true;
enableDefault = false;
general = {
colors = true;
interval = 1;
};
modules = {
"battery all" = {
enable = true;
position = 4;
settings = {
format = "%status %percentage ⏳%remaining";
integer_battery_capacity = true;
low_threshold = 20;
status_bat = "🔋";
status_chr = "🔌";
threshold_type = "percentage";
};
};
"ethernet _first_" = {
enable = true;
position = 3;
settings = {
format_down = "";
format_up = "🌐Ethernet: %speed";
};
};
"tztime local" = {
enable = true;
position = 1;
settings = {
format = "📅%A, %B %e, %Y ⌚%l:%M:%S %p";
};
};
"volume master" = {
enable = true;
position = 5;
settings = {
format = "🔊%volume";
format_muted = "🔇%volume";
};
};
"wireless _first_" = {
enable = true;
position = 2;
settings = {
format_down = "";
format_up = "🌐%essid: %quality";
};
};
};
};
urxvt = {
enable = true;
extraConfig = {
background = "black";
foreground = "white";
};
fonts = [
"xft:Mono:size=10"
];
iso14755 = false;
keybindings = {
"Shift-Control-C" = "eval:selection_to_clipboard";
"Shift-Control-V" = "eval:paste_clipboard";
};
shading = 20;
transparent = true;
};
vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
esbenp.prettier-vscode
github.copilot
grapecity.gc-excelviewer
jnoortheen.nix-ide
ms-vscode-remote.remote-ssh
];
};
};
services.picom = {
enable = true;
fade = true;
fadeSteps = [
0.1
0.1
];
};
xsession.windowManager.i3 = {
config = {
bars = [
{
colors = {
background = "#000000CB";
};
command = "i3bar --transparency";
fonts = {
names = [ "Futura" ];
style = "Bold";
size = 10.0;
};
statusCommand = "i3status";
}
];
defaultWorkspace = "workspace number 1";
keybindings = lib.mkOptionDefault {
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status";
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status";
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status";
"XF86MonBrightnessUp" = "exec --no-startup-id light -A 10";
"XF86MonBrightnessDown" = "exec --no-startup-id light -U 10";
};
modes = {
resize = {
"${i3-modifier}+r" = "mode default";
Down = "resize grow height 10 px or 10 ppt";
Escape = "mode default";
Left = "resize shrink width 10 px or 10 ppt";
Return = "mode default";
Right = "resize grow width 10 px or 10 ppt";
Up = "resize shrink height 10 px or 10 ppt";
};
};
modifier = i3-modifier;
startup = [
{ command = "--no-startup-id light-locker"; }
{ command = "--no-startup-id lxqt-policykit-agent"; }
];
window.commands = [
{
command = "move position center";
criteria = {
floating = true;
};
}
];
};
enable = true;
extraConfig = "floating_maximum_size 1920 x 1080";
};
};
};
i18n.defaultLocale = "en_CA.UTF-8";
networking = {
extraHosts = ''
127.0.0.1 openparl.cluster-cia2zobysfwo.us-west-2.neptune.amazonaws.com
'';
hostName = "isaac-nixos";
networkmanager.enable = true;
};
nixpkgs.config.allowUnfree = true;
programs = {
light.enable = true;
ssh.startAgent = true;
xss-lock = {
enable = true;
lockerCommand = "light-locker-command -l";
};
};
security.polkit.enable = true;
services = {
blueman.enable = true;
gnome.gnome-keyring.enable = true;
xserver = {
displayManager = {
defaultSession = "none+i3";
sessionCommands = "xrandr --output HDMI-1 --right-of eDP-1 --auto";
};
dpi = 120;
enable = true;
layout = "us";
libinput = {
enable = true;
touchpad.naturalScrolling = true;
};
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu
i3status
];
};
};
};
system.stateVersion = "23.05";
time.timeZone = "America/Vancouver";
users.users.isaac = {
description = "Isaac Shaha";
extraGroups = [ "docker" "networkmanager" "video" "wheel" ];
isNormalUser = true;
packages = with pkgs; [];
};
virtualisation.docker.enable = true;
}
I believe the only configurations I have that may relate to this problem are:
hardware.pulseaudio.enable = true
hardware.system76.enableAll = true
hardware.system76.kernel-modules.enable = true