diff options
author | Soispha <soispha@vhack.eu> | 2023-09-17 11:26:11 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-09-17 11:26:11 +0200 |
commit | 7c90c1540585c28dfc0389c717bbdd5e1ef47b82 (patch) | |
tree | 56b31f01881737e58d4f929aea94a99e49187d42 | |
parent | build(flake): Update (diff) | |
download | nixos-config-7c90c1540585c28dfc0389c717bbdd5e1ef47b82.tar.gz nixos-config-7c90c1540585c28dfc0389c717bbdd5e1ef47b82.zip |
feat(sys/srvs/adb): Init
-rw-r--r-- | sys/svcs/adb/default.nix | 23 | ||||
-rw-r--r-- | sys/svcs/default.nix | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sys/svcs/adb/default.nix b/sys/svcs/adb/default.nix new file mode 100644 index 00000000..42eefcb8 --- /dev/null +++ b/sys/svcs/adb/default.nix @@ -0,0 +1,23 @@ +{ + lib, + config, + ... +}: let + cfg = config.soispha.adb; +in { + options.soispha.adb = { + enable = lib.mkEnableOption "Android adb bridge"; + user = lib.mkOption { + type = lib.types.str; + example = "soispha"; + default = "soispha"; + description = "Username to grant access to adb bridge"; + }; + }; + + config = + lib.mkIf cfg.enable { + programs.adb.enable = true; + users.users."${cfg.user}".extraGroups = ["adbusers"]; + }; +} diff --git a/sys/svcs/default.nix b/sys/svcs/default.nix index d4698310..56a16055 100644 --- a/sys/svcs/default.nix +++ b/sys/svcs/default.nix @@ -1,5 +1,6 @@ {...}: { imports = [ + ./adb ./backup ./dconf ./fwupd |