trying to get speakers working

This commit is contained in:
Matt Nish-Lapidus 2024-10-05 12:36:08 -04:00
parent becb262e17
commit 36798975c7
5 changed files with 2387 additions and 62 deletions

304
flake.lock generated
View file

@ -1,22 +1,35 @@
{
"nodes": {
"envycontrol": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1724028178,
"narHash": "sha256-3FPpsd43xXXV6ErlMxdQabg9uMS2OW8nm2QklKKe600=",
"owner": "bayasdev",
"repo": "envycontrol",
"rev": "0b502c4027133694e82db9b56eaffbb34fc98642",
"lastModified": 1727261104,
"narHash": "sha256-rxDI7WrxIRV9it9mDCHcLa7xQykf1JloXnoXr5xQ8zI=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "b82fdaff917582a9d568969e15e61b398c71e990",
"type": "github"
},
"original": {
"owner": "bayasdev",
"repo": "envycontrol",
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
@ -59,7 +72,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
@ -96,6 +109,194 @@
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1727532803,
"narHash": "sha256-ZaZ7h7PY8mQc4vtGmVqWLAq9CAO02gHMyNR5yY8zDmM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "b98726e431d4d3ed58bd58bee1047cdb81cec69f",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"systems": "systems",
"xdph": "xdph"
},
"locked": {
"lastModified": 1728031287,
"narHash": "sha256-uGudMapfYGI7mY5mOZrb5tXYeGhp8Oar7w72qyeFiQA=",
"ref": "refs/heads/main",
"rev": "1ed925b69c2854a3f345cbeb7dca29a6286ca926",
"revCount": 5289,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1727451107,
"narHash": "sha256-qV9savtHwmZUa0eJE294WYJjKPGB2+bJhwByFShsVyo=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "6b3261ee13a6d2b99de79a31d352f6996e35bde3",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprland-protocols_2": {
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
"locked": {
"lastModified": 1721326555,
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1725997860,
"narHash": "sha256-d/rZ/fHR5l1n7PeyLw0StWMNLXVU9c4HFyfskw568so=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "dfeb5811dd6485490cce18d6cc1e38a055eea876",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1727300645,
"narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1726874836,
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"kmonad": {
"inputs": {
"nixpkgs": [
@ -163,7 +364,7 @@
"inputs": {
"flake-parts": "flake-parts",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"treefmt-nix": "treefmt-nix"
},
"locked": {
@ -235,15 +436,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1727802920,
"narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
"owner": "nixos",
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -304,6 +505,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1727802920,
"narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1723221148,
"narHash": "sha256-7pjpeQlZUNQ4eeVntytU3jkw9dFK3k1Htgk2iuXjaD8=",
@ -321,18 +538,33 @@
},
"root": {
"inputs": {
"envycontrol": "envycontrol",
"home-manager": "home-manager",
"hyprland": "hyprland",
"kmonad": "kmonad",
"musnix": "musnix",
"nix-flatpak": "nix-flatpak",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-wayland": "nixpkgs-wayland"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -368,6 +600,44 @@
"repo": "treefmt-nix",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": "hyprland-protocols_2",
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1727524473,
"narHash": "sha256-1DGktDtSWIJpnDbVoj/qpvJSH5zg6JbOfuh6xqZMap0=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "7e500e679ede40e79cf2d89b5f5fa3e34923bd26",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",

View file

@ -8,8 +8,10 @@
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch. Use github:gmodena/nix-flatpak/?ref=<tag> to pin releases.
@ -28,13 +30,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};
envycontrol = {
url = github:bayasdev/envycontrol;
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
};
outputs = inputs @ {self, nixpkgs, nixpkgs-stable, home-manager, nix-flatpak, kmonad, musnix, envycontrol, ... }: {
outputs = inputs @ {self, nixpkgs, nixpkgs-stable, home-manager, nix-flatpak, kmonad, musnix, hyprland, ... }: {
nixpkgs.overlays = [ inputs.nixpkgs-wayland.overlay ];
nixosConfigurations = {
@ -57,15 +56,6 @@
"emenel" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
# pkgs = import nixpkgs {
# system = "x86_64-linux"; # whatever your system name is
# config = {
# allowUnfree = true;
# allowUnfreePredicate = _: true;
# };
# };
extraSpecialArgs = { inherit inputs; };
modules = [

View file

@ -1,6 +1,10 @@
{ nix-flatpak, lib, pkgs, inputs, ... }:
{
imports = [
./razer-speaker-fix.nix
];
nixpkgs.config.allowUnfree = true;
home = {
@ -62,7 +66,7 @@
appimage-run
#transmission_4
#transmission_4-gtk
lsof
ruby
janet
jpm
@ -133,7 +137,7 @@
solaar
logitech-udev-rules
syncthingtray
#syncthingtray
impression
zoom-us
nyxt
@ -174,6 +178,7 @@
pavucontrol
qpwgraph
alsa-utils
alsa-tools
clapper
amberol
@ -221,6 +226,7 @@
programs = {
home-manager.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
@ -286,20 +292,27 @@
#waybar.enable = true;
lazygit.enable = true;
jq.enable = true;
firefox.enable = true;
};
wayland.windowManager.hyprland = {
enable = true; # enable Hyprland
xwayland.enable = true;
#systemd.variables = ["--all"];
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
systemd.variables = ["--all"];
# plugins = [
# inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
# ];
settings = {
"$mod" = "SUPER";
# bind =
# [
# "$mod, F, exec, firefox"
# ", Print, exec, grimblast copy area"
# ]
bind =
[
"$mod, F, exec, zen"
"$mod, T, exec, wezterm"
", Print, exec, grimblast copy area"
];
# ++ (
# # workspaces
# # binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
@ -311,8 +324,14 @@
# ]
# )
# 9)
# );
# );
# terminal = "wezterm";
};
extraConfig = ''
# Monitor
monitor=eDP-1,2560x1600@240,auto,1
'';
};
home.sessionVariables.NIXOS_OZONE_WL = "1";
@ -348,7 +367,7 @@
flatpak.enable = true;
syncthing = {
enable = true;
tray.enable = true;
#tray.enable = true;
};
};
@ -376,7 +395,6 @@
xdg.configFile."git".source = ../dotfiles/dot_config/git;
home.file.".sbclrc".source = ../dotfiles/dot_sbclrc;
home.file.".signature".source = ../dotfiles/dot_signature;
home.file.".config/fish/functions" = {
source = ../dotfiles/dot_config/fish/functions;
recursive = true;

2013
home/razer-speaker-fix.nix Normal file

File diff suppressed because it is too large Load diff

View file

@ -26,6 +26,15 @@
gnupg
openrazer-daemon
clinfo
pyprland
hyprpicker
hyprcursor
hyprlock
hypridle
hyprpaper
greetd.tuigreet
alsa-utils
alsa-tools
];
# Bootloader.
@ -34,10 +43,7 @@
boot.kernelPackages = pkgs.linuxPackages_6_10;
boot = {
# TODO: confirm this works
# https://forums.developer.nvidia.com/t/550-54-14-cannot-create-sg-table-for-nvkmskapimemory-spammed-when-launching-chrome-on-wayland/284775/26
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
# extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
kernelParams = [ "nvidia-drm.fbdev=1" "nvidia_drm.modeset=1" ];
};
@ -108,15 +114,35 @@
nix.nixPath = [ "nixos-config=/home/emenel/source/nixos-config" "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" ];
nix.package = pkgs.nixFlakes;
nix.settings.experimental-features = [ "nix-command" "flakes" "repl-flake" ];
nix.settings = {
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
auto-optimise-store = true;
};
nix.gc.automatic = true;
nix.gc.dates = "daily";
nix.gc.options = "--delete-older-than +5";
services.xserver.enable = true;
# Enable hyprland and greetd
# services.greetd = {
# enable = true;
# settings = {
# default_session = {
# command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --time-format '%I:%M %p | %a • %h | %F' --cmd Hyprland";
# user = "greeter";
# };
# };
# };
# programs.hyprland.enable = true; # enable Hyprland
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.wayland = true;
#services.xserver.desktopManager.gnome.enable = true;
programs.hyprland.enable = true; # enable Hyprland
services.xserver.desktopManager.gnome.enable = true;
services.xserver.deviceSection = ''Option "TearFree" "true"''; # For amdgpu.
programs.dconf.enable = true;
@ -137,6 +163,7 @@
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.gnome.gnome-remote-desktop.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
@ -146,16 +173,6 @@
wireplumber.enable = true;
};
users.users.emenel = {
isNormalUser = true;
description = "emenel";
extraGroups = [ "networkmanager" "wheel" "uinput" "input" "audio" "video" "libvirtd" "nvidia" "cups" "openrazer"];
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFvtBCUQEi7r6mXdaULEaMMvGH1IWZBX9tXpjbIECar2 matt@emenel.ca" ];
packages = with pkgs; [
git
];
};
programs.steam = {
enable = true;
extraCompatPackages = [ pkgs.proton-ge-bin ];
@ -172,7 +189,7 @@
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
};
services.flatpak.enable = true;
@ -235,7 +252,24 @@
# enable the OpenSSH daemon.
services.openssh.enable = true;
# add user accounts
users.users.emenel = {
isNormalUser = true;
description = "emenel";
extraGroups = [ "networkmanager" "wheel" "uinput" "input" "audio" "video" "libvirtd" "nvidia" "cups" "openrazer"];
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFvtBCUQEi7r6mXdaULEaMMvGH1IWZBX9tXpjbIECar2 matt@emenel.ca" ];
packages = with pkgs; [
git
];
};
#do not change
system.stateVersion = "24.05";
}