refactor: move adb to flake module
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
cc2329ec67
commit
89ebaa520f
5 changed files with 37 additions and 8 deletions
|
@ -8,7 +8,6 @@ in {
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../modules/android.nix
|
||||
../../modules/ags
|
||||
../../modules/audio.nix
|
||||
../../modules/kmscon.nix
|
||||
|
@ -20,6 +19,7 @@ in {
|
|||
./modules/gpu-replay.nix
|
||||
./modules/nix-gaming.nix
|
||||
|
||||
self.nixosModules.adb
|
||||
self.nixosModules.desktop
|
||||
];
|
||||
|
||||
|
@ -38,6 +38,11 @@ in {
|
|||
fontSize = 12.5;
|
||||
};
|
||||
|
||||
programs.adb = {
|
||||
enable = true;
|
||||
user = mainUser;
|
||||
};
|
||||
|
||||
users.users.${mainUser} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
|
|
|
@ -8,7 +8,6 @@ in {
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../modules/android.nix
|
||||
../../modules/ags
|
||||
../../modules/audio.nix
|
||||
../../modules/kmscon.nix
|
||||
|
@ -17,6 +16,7 @@ in {
|
|||
|
||||
./modules/security.nix
|
||||
|
||||
self.nixosModules.adb
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.plymouth
|
||||
];
|
||||
|
@ -37,6 +37,11 @@ in {
|
|||
fontSize = 12.5;
|
||||
};
|
||||
|
||||
programs.adb = {
|
||||
enable = true;
|
||||
user = mainUser;
|
||||
};
|
||||
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "dracula";
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
attrs system (mkPkgs system nixpkgs));
|
||||
in {
|
||||
nixosModules = {
|
||||
adb = import ./modules/adb.nix;
|
||||
desktop = import ./modules/desktop;
|
||||
nvidia = import ./modules/nvidia.nix;
|
||||
plymouth = import ./modules/plymouth.nix;
|
||||
|
|
24
modules/adb.nix
Normal file
24
modules/adb.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
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"];
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{config, ...}: let
|
||||
inherit (config.vars) mainUser;
|
||||
in {
|
||||
programs.adb.enable = true;
|
||||
users.users.${mainUser}.extraGroups = ["adbusers"];
|
||||
}
|
Loading…
Reference in a new issue