nixos: Add ADB stuff
All checks were successful
CI / Check, build and cache nixfiles (push) Successful in 1h3m46s

This commit is contained in:
Jack O'Sullivan 2025-01-26 18:33:04 +00:00
parent 72b8bd089c
commit 7a2ebf6872
5 changed files with 1127 additions and 1 deletions

View File

@ -22,6 +22,7 @@ rec {
kea = 404;
keepalived_script = 405;
photoprism = 406;
adbusers = 407;
};
};

View File

@ -150,6 +150,7 @@ in
mstflint
qperf
ethtool
android-tools
];
nix = {

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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" ];
};
};
};
};
}