refactor: remove adb custom module
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-11-22 18:51:49 -05:00
parent b5ccf3e287
commit fab9209726
5 changed files with 7 additions and 40 deletions

View file

@ -13,7 +13,6 @@ in {
./modules ./modules
self.nixosModules.adb
self.nixosModules.desktop self.nixosModules.desktop
self.nixosModules.kmscon self.nixosModules.kmscon
self.nixosModules.server self.nixosModules.server
@ -36,9 +35,12 @@ in {
"adm" "adm"
"video" "video"
"libvirtd" "libvirtd"
"adbusers"
]; ];
}; };
programs.adb.enable = true;
networking = { networking = {
hostName = "binto"; hostName = "binto";
networkmanager.enable = true; networkmanager.enable = true;
@ -66,11 +68,6 @@ in {
sshd.enable = true; sshd.enable = true;
}; };
programs.adb = {
enable = true;
user = mainUser;
};
services.kmscon.enable = true; services.kmscon.enable = true;
home-manager.users.${mainUser} = { home-manager.users.${mainUser} = {

View file

@ -14,7 +14,6 @@ in {
./modules ./modules
self.nixosModules.adb
self.nixosModules.desktop self.nixosModules.desktop
self.nixosModules.docker self.nixosModules.docker
self.nixosModules.kmscon self.nixosModules.kmscon
@ -39,9 +38,12 @@ in {
"adm" "adm"
"video" "video"
"libvirtd" "libvirtd"
"adbusers"
]; ];
}; };
programs.adb.enable = true;
networking = { networking = {
hostName = "wim"; hostName = "wim";
networkmanager = { networkmanager = {
@ -76,11 +78,6 @@ in {
tailscale.enable = true; tailscale.enable = true;
}; };
programs.adb = {
enable = true;
user = mainUser;
};
boot.plymouth = { boot.plymouth = {
enable = true; enable = true;
theme = "dracula"; theme = "dracula";

View file

@ -1,27 +0,0 @@
{
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;
}

View file

@ -1,5 +1,4 @@
self: { self: {
adb = import ./adb;
borgbackup = import ./borgbackup; borgbackup = import ./borgbackup;
desktop = import ./desktop self; desktop = import ./desktop self;
docker = import ./docker self.inputs.khepri; docker = import ./docker self.inputs.khepri;

View file

@ -18,6 +18,7 @@ in {
}; };
}; };
# FIXME: Move to mkNixOS
users.users.${cfg.user} = { users.users.${cfg.user} = {
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE39uk52+NIDLdHeoSHIEsOUUFRzj06AGn09z4TUOYm matt@OP9" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE39uk52+NIDLdHeoSHIEsOUUFRzj06AGn09z4TUOYm matt@OP9"