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:
parent
72b8bd089c
commit
7a2ebf6872
@ -22,6 +22,7 @@ rec {
|
||||
kea = 404;
|
||||
keepalived_script = 405;
|
||||
photoprism = 406;
|
||||
adbusers = 407;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -150,6 +150,7 @@ in
|
||||
mstflint
|
||||
qperf
|
||||
ethtool
|
||||
android-tools
|
||||
];
|
||||
|
||||
nix = {
|
||||
|
@ -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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user