mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(adb): service module
This commit is contained in:
parent
95e827221f
commit
594605ea69
6 changed files with 196 additions and 0 deletions
26
nixos/adb.nix
Normal file
26
nixos/adb.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
cfg = config.services.adb;
|
||||
in {
|
||||
services.adb = {
|
||||
enable = mkDefault true;
|
||||
settings = {
|
||||
#a = mkDefault true;
|
||||
};
|
||||
devices = {
|
||||
bedroom-tv.serial = "10.1.1.67:5555";
|
||||
};
|
||||
};
|
||||
systemd.services = mkIf cfg.enable {
|
||||
adb = {
|
||||
environment.ADB_TRACE = mkDefault (toString [ "adb" ]);
|
||||
};
|
||||
};
|
||||
networking.firewall.interfaces.lan = mkIf (cfg.enable && cfg.settings.a or false == true) {
|
||||
allowedTCPPorts = [ cfg.port ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue