nixos: Add ADB stuff
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				CI / Check, build and cache nixfiles (push) Successful in 1h3m46s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	CI / Check, build and cache nixfiles (push) Successful in 1h3m46s
				
			This commit is contained in:
		@@ -14,7 +14,7 @@
 | 
			
		||||
    network = ./network.nix;
 | 
			
		||||
    pdns = ./pdns.nix;
 | 
			
		||||
    nginx-sso = ./nginx-sso.nix;
 | 
			
		||||
    gui = ./gui.nix;
 | 
			
		||||
    gui = ./gui;
 | 
			
		||||
    l2mesh = ./l2mesh.nix;
 | 
			
		||||
    borgthin = ./borgthin.nix;
 | 
			
		||||
    nvme = ./nvme;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1101
									
								
								nixos/modules/gui/android-udev.rules
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1101
									
								
								nixos/modules/gui/android-udev.rules
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -4,6 +4,12 @@ let
 | 
			
		||||
  inherit (lib.my) mkBoolOpt';
 | 
			
		||||
 | 
			
		||||
  cfg = config.my.gui;
 | 
			
		||||
 | 
			
		||||
  androidUdevRules = pkgs.runCommand "udev-rules-android" {
 | 
			
		||||
    rulesFile = ./android-udev.rules;
 | 
			
		||||
  } ''
 | 
			
		||||
    install -D "$rulesFile" "$out"/lib/udev/rules.d/51-android.rules
 | 
			
		||||
  '';
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  options.my.gui = with lib.types; {
 | 
			
		||||
@@ -26,6 +32,12 @@ in
 | 
			
		||||
      pam.services.swaylock-plugin = {};
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    users = {
 | 
			
		||||
      groups = {
 | 
			
		||||
        adbusers.gid = lib.my.c.ids.gids.adbusers;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    environment.systemPackages = with pkgs; [
 | 
			
		||||
      # for pw-jack
 | 
			
		||||
      pipewire.jack
 | 
			
		||||
@@ -46,6 +58,9 @@ in
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      udev = {
 | 
			
		||||
        packages = [
 | 
			
		||||
          androidUdevRules
 | 
			
		||||
        ];
 | 
			
		||||
        extraRules = ''
 | 
			
		||||
          # Nvidia
 | 
			
		||||
          SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="wheel"
 | 
			
		||||
@@ -88,5 +103,13 @@ in
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    my = {
 | 
			
		||||
      user = {
 | 
			
		||||
        config = {
 | 
			
		||||
          extraGroups = [ "adbusers" ];
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user