nixos-configs/nixosModules/adb/default.nix
matt1432 24aa4b9842
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: make modules independant and exposed in the flake for outside use
2024-08-02 22:32:29 -04:00

27 lines
482 B
Nix

{
config,
lib,
...
}: let
inherit (lib) mkIf mkOption types;
cfg = config.programs.adb;
in {
options.programs.adb = {
user = mkOption {
type = types.str;
default = "root";
description = ''
The name of the user who is going to interact with
the android devices.
'';
};
};
config = mkIf cfg.enable {
users.users.${cfg.user}.extraGroups = ["adbusers"];
};
# For accurate stack trace
_file = ./default.nix;
}