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;
|
kea = 404;
|
||||||
keepalived_script = 405;
|
keepalived_script = 405;
|
||||||
photoprism = 406;
|
photoprism = 406;
|
||||||
|
adbusers = 407;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -150,6 +150,7 @@ in
|
|||||||
mstflint
|
mstflint
|
||||||
qperf
|
qperf
|
||||||
ethtool
|
ethtool
|
||||||
|
android-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
network = ./network.nix;
|
network = ./network.nix;
|
||||||
pdns = ./pdns.nix;
|
pdns = ./pdns.nix;
|
||||||
nginx-sso = ./nginx-sso.nix;
|
nginx-sso = ./nginx-sso.nix;
|
||||||
gui = ./gui.nix;
|
gui = ./gui;
|
||||||
l2mesh = ./l2mesh.nix;
|
l2mesh = ./l2mesh.nix;
|
||||||
borgthin = ./borgthin.nix;
|
borgthin = ./borgthin.nix;
|
||||||
nvme = ./nvme;
|
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';
|
inherit (lib.my) mkBoolOpt';
|
||||||
|
|
||||||
cfg = config.my.gui;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.my.gui = with lib.types; {
|
options.my.gui = with lib.types; {
|
||||||
@ -26,6 +32,12 @@ in
|
|||||||
pam.services.swaylock-plugin = {};
|
pam.services.swaylock-plugin = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users = {
|
||||||
|
groups = {
|
||||||
|
adbusers.gid = lib.my.c.ids.gids.adbusers;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# for pw-jack
|
# for pw-jack
|
||||||
pipewire.jack
|
pipewire.jack
|
||||||
@ -46,6 +58,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
udev = {
|
udev = {
|
||||||
|
packages = [
|
||||||
|
androidUdevRules
|
||||||
|
];
|
||||||
extraRules = ''
|
extraRules = ''
|
||||||
# Nvidia
|
# Nvidia
|
||||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="wheel"
|
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="wheel"
|
||||||
@ -88,5 +103,13 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my = {
|
||||||
|
user = {
|
||||||
|
config = {
|
||||||
|
extraGroups = [ "adbusers" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user