refactor
This commit is contained in:
		
							parent
							
								
									7ba7f967fa
								
							
						
					
					
						commit
						db5f55bfd1
					
				@ -12,6 +12,7 @@
 | 
				
			|||||||
      ./qemu-user.nix
 | 
					      ./qemu-user.nix
 | 
				
			||||||
      ./atmega.nix
 | 
					      ./atmega.nix
 | 
				
			||||||
      ./v4l2loopback.nix
 | 
					      ./v4l2loopback.nix
 | 
				
			||||||
 | 
					      ./huion.nix
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  environment.etc."lvm/lvm.conf".text = ''
 | 
					  environment.etc."lvm/lvm.conf".text = ''
 | 
				
			||||||
@ -58,8 +59,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  services.thermald.enable = true;
 | 
					  services.thermald.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  users.extraUsers.gebner.extraGroups = [ "libvirtd" "vboxusers" ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  virtualisation.virtualbox.host = {
 | 
					  virtualisation.virtualbox.host = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    # enableExtensionPack = true;
 | 
					    # enableExtensionPack = true;
 | 
				
			||||||
@ -77,8 +76,6 @@
 | 
				
			|||||||
      "forceuid" "forcegid" "uid=0" "gid=0" ];
 | 
					      "forceuid" "forcegid" "uid=0" "gid=0" ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  hardware.opengl.driSupport32Bit = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  hardware.opengl.extraPackages = with pkgs; [
 | 
					  hardware.opengl.extraPackages = with pkgs; [
 | 
				
			||||||
    rocm-opencl-icd
 | 
					    rocm-opencl-icd
 | 
				
			||||||
    # rocm-runtime-ext
 | 
					    # rocm-runtime-ext
 | 
				
			||||||
@ -121,13 +118,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  services.ratbagd.enable = true;
 | 
					  services.ratbagd.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  services.xserver.digimend.enable = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  services.udev.extraRules = ''
 | 
					 | 
				
			||||||
    SUBSYSTEM=="input", ENV{ID_BUS}=="usb" ENV{ID_VENDOR_ID}=="256c", \
 | 
					 | 
				
			||||||
      ATTRS{name}=="* Touch *", ENV{ID_INPUT.tags}="low_res_touch"
 | 
					 | 
				
			||||||
  '';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # virtualisation.anbox = {
 | 
					  # virtualisation.anbox = {
 | 
				
			||||||
  #   enable = true;
 | 
					  #   enable = true;
 | 
				
			||||||
  # };
 | 
					  # };
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										69
									
								
								bluez-alsa.nix
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										69
									
								
								bluez-alsa.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,69 @@
 | 
				
			|||||||
 | 
					{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook
 | 
				
			||||||
 | 
					, alsaLib, bluez, glib, sbc, dbus
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# optional, but useful utils
 | 
				
			||||||
 | 
					, readline, libbsd, ncurses
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# optional codecs
 | 
				
			||||||
 | 
					, aacSupport ? true, fdk_aac
 | 
				
			||||||
 | 
					# TODO: aptxSupport
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					with stdenv.lib;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					stdenv.mkDerivation rec {
 | 
				
			||||||
 | 
					  pname = "bluez-alsa";
 | 
				
			||||||
 | 
					  version = "3.0.0";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  src = fetchFromGitHub {
 | 
				
			||||||
 | 
					    owner = "Arkq";
 | 
				
			||||||
 | 
					    repo = "bluez-alsa";
 | 
				
			||||||
 | 
					    rev = "v${version}";
 | 
				
			||||||
 | 
					    sha256 = "1jlsgxyqfhncfhx1sy3ry0dp6p95kd4agh7g2b7g51h0c4cv74h8";
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  nativeBuildInputs = [ pkgconfig autoreconfHook ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  buildInputs = [
 | 
				
			||||||
 | 
					    alsaLib bluez glib sbc dbus
 | 
				
			||||||
 | 
					    readline libbsd ncurses
 | 
				
			||||||
 | 
					  ]
 | 
				
			||||||
 | 
					  ++ optional aacSupport fdk_aac;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  configureFlags = [
 | 
				
			||||||
 | 
					    "--with-alsaplugindir=${placeholder "out"}/lib/alsa-lib"
 | 
				
			||||||
 | 
					    "--with-dbusconfdir=${placeholder "out"}/share/dbus-1/system.d"
 | 
				
			||||||
 | 
					    "--enable-rfcomm"
 | 
				
			||||||
 | 
					    "--enable-hcitop"
 | 
				
			||||||
 | 
					    "--enable-msbc"
 | 
				
			||||||
 | 
					  ]
 | 
				
			||||||
 | 
					  ++ optional aacSupport "--enable-aac";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  meta = {
 | 
				
			||||||
 | 
					    description = "Bluez 5 Bluetooth Audio ALSA Backend";
 | 
				
			||||||
 | 
					    longDescription = ''
 | 
				
			||||||
 | 
					      Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface.
 | 
				
			||||||
 | 
					      Bluez-ALSA registers all Bluetooth devices with audio profiles in Bluez
 | 
				
			||||||
 | 
					      under a virtual ALSA PCM device called `bluealsa` that supports both
 | 
				
			||||||
 | 
					      playback and capture.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      Some backstory: Bluez 5 removed built-in support for ALSA in favor of a
 | 
				
			||||||
 | 
					      generic interface for 3rd party appliations. Thereafter, PulseAudio
 | 
				
			||||||
 | 
					      implemented a backend for that interface and became the only way to get
 | 
				
			||||||
 | 
					      Bluetooth audio with Bluez 5. Users prefering ALSA stayed on Bluez 4.
 | 
				
			||||||
 | 
					      However, Bluez 4 eventually became deprecated.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      This package is a rebirth of a direct interface between ALSA and Bluez 5,
 | 
				
			||||||
 | 
					      that, unlike PulseAudio, provides KISS near-metal-like experience. It is
 | 
				
			||||||
 | 
					      not possible to run BluezALSA and PulseAudio Bluetooth at the same time
 | 
				
			||||||
 | 
					      due to limitations in Bluez, but it is possible to run PulseAudio over
 | 
				
			||||||
 | 
					      BluezALSA if you disable `bluetooth-discover` and `bluez5-discover`
 | 
				
			||||||
 | 
					      modules in PA and configure it to play/capture sound over `bluealsa` PCM.
 | 
				
			||||||
 | 
					    '';
 | 
				
			||||||
 | 
					    homepage = src.meta.homepage;
 | 
				
			||||||
 | 
					    license = licenses.mit;
 | 
				
			||||||
 | 
					    platforms = platforms.linux;
 | 
				
			||||||
 | 
					    maintainers = [ maintainers.oxij maintainers.lheckemann ];
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -77,7 +77,16 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  users.extraUsers.gebner = {
 | 
					  users.extraUsers.gebner = {
 | 
				
			||||||
    isNormalUser = true;
 | 
					    isNormalUser = true;
 | 
				
			||||||
    extraGroups = [ "wheel" "networkmanager" "audio" "transmission" ];
 | 
					    extraGroups = [
 | 
				
			||||||
 | 
					      "wheel"
 | 
				
			||||||
 | 
					      "networkmanager"
 | 
				
			||||||
 | 
					      "audio"
 | 
				
			||||||
 | 
					      "transmission"
 | 
				
			||||||
 | 
					      "lxd"
 | 
				
			||||||
 | 
					      "libvirtd"
 | 
				
			||||||
 | 
					      "vboxusers"
 | 
				
			||||||
 | 
					      "wireshark"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    # shell = "${pkgs.zsh}/bin/zsh";
 | 
					    # shell = "${pkgs.zsh}/bin/zsh";
 | 
				
			||||||
    shell = "/run/current-system/sw/bin/fish";
 | 
					    shell = "/run/current-system/sw/bin/fish";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -10,6 +10,7 @@
 | 
				
			|||||||
      ./fstrim.nix
 | 
					      ./fstrim.nix
 | 
				
			||||||
      ./atmega.nix
 | 
					      ./atmega.nix
 | 
				
			||||||
      ./v4l2loopack.nix
 | 
					      ./v4l2loopack.nix
 | 
				
			||||||
 | 
					      ./huion.nix
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  environment.etc."lvm/lvm.conf".text = ''
 | 
					  environment.etc."lvm/lvm.conf".text = ''
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,8 @@ let mpdStreamingPort = 8080; in
 | 
				
			|||||||
  networking.hostName = "euhadra";
 | 
					  networking.hostName = "euhadra";
 | 
				
			||||||
  networking.hostId = "ddb5f0fd";
 | 
					  networking.hostId = "ddb5f0fd";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  hardware.cpu.intel.updateMicrocode = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  services.mpd = {
 | 
					  services.mpd = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    network.listenAddress = "any";
 | 
					    network.listenAddress = "any";
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										10
									
								
								huion.nix
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										10
									
								
								huion.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  services.xserver.digimend.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  services.udev.extraRules = ''
 | 
				
			||||||
 | 
					    SUBSYSTEM=="input", ENV{ID_BUS}=="usb" ENV{ID_VENDOR_ID}=="256c", \
 | 
				
			||||||
 | 
					      ATTRS{name}=="* Touch *", ENV{ID_INPUT.tags}="low_res_touch"
 | 
				
			||||||
 | 
					  '';
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -58,6 +58,7 @@
 | 
				
			|||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    package = pkgs.wireshark;
 | 
					    package = pkgs.wireshark;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  users.extraUsers.gebner.extraGroups = [ "wireshark" ];
 | 
					
 | 
				
			||||||
 | 
					  hardware.opengl.driSupport32Bit = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -10,6 +10,7 @@
 | 
				
			|||||||
      ./fstrim.nix
 | 
					      ./fstrim.nix
 | 
				
			||||||
      ./atmega.nix
 | 
					      ./atmega.nix
 | 
				
			||||||
      ./v4l2loopback.nix
 | 
					      ./v4l2loopback.nix
 | 
				
			||||||
 | 
					      ./huion.nix
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  environment.etc."lvm/lvm.conf".text = ''
 | 
					  environment.etc."lvm/lvm.conf".text = ''
 | 
				
			||||||
@ -48,6 +49,8 @@
 | 
				
			|||||||
  networking.hostName = "petalius";
 | 
					  networking.hostName = "petalius";
 | 
				
			||||||
  networking.hostId = "cf58caa9";
 | 
					  networking.hostId = "cf58caa9";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  hardware.cpu.intel.updateMicrocode = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # systemd.services.ModemManager = {
 | 
					  # systemd.services.ModemManager = {
 | 
				
			||||||
  #   enable = true;
 | 
					  #   enable = true;
 | 
				
			||||||
  #   wantedBy = [ "multi-user.target" ];
 | 
					  #   wantedBy = [ "multi-user.target" ];
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user