From c71b07a90311f9f479196d7787e3a9a601ecb234 Mon Sep 17 00:00:00 2001 From: Niten Date: Wed, 18 Aug 2021 10:00:18 -0700 Subject: [PATCH] Fixed for deploy again --- config/hosts/spark.nix | 1 + config/hosts/system3.nix | 1 + config/hosts/zbox.nix | 1 + initialize.nix | 2 +- lib/fudo/hosts.nix | 9 +++++++++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/config/hosts/spark.nix b/config/hosts/spark.nix index 3b0b0c4..47d584a 100644 --- a/config/hosts/spark.nix +++ b/config/hosts/spark.nix @@ -14,4 +14,5 @@ profile = "desktop"; domain = "sea.fudo.org"; site = "seattle"; + android-dev = true; } diff --git a/config/hosts/system3.nix b/config/hosts/system3.nix index 585791f..672671f 100644 --- a/config/hosts/system3.nix +++ b/config/hosts/system3.nix @@ -14,4 +14,5 @@ profile = "desktop"; domain = "sea.fudo.org"; site = "seattle"; + android-dev = true; } diff --git a/config/hosts/zbox.nix b/config/hosts/zbox.nix index c257835..94a9404 100644 --- a/config/hosts/zbox.nix +++ b/config/hosts/zbox.nix @@ -14,4 +14,5 @@ profile = "desktop"; domain = "sea.fudo.org"; site = "seattle"; + android-dev = true; } diff --git a/initialize.nix b/initialize.nix index 7681463..49e3604 100644 --- a/initialize.nix +++ b/initialize.nix @@ -9,7 +9,7 @@ in { ./config ./packages "${home-manager-package}/nixos" - ] ++ pkgs.lib.optional host-config.nixos-system [ + ] ++ [ (./. + "/config/hardware/${hostname}.nix") (./. + "/config/host-config/${hostname}.nix") (./. + "/config/profile-config/${host-config.profile}.nix") diff --git a/lib/fudo/hosts.nix b/lib/fudo/hosts.nix index b97437a..59b074f 100644 --- a/lib/fudo/hosts.nix +++ b/lib/fudo/hosts.nix @@ -149,9 +149,13 @@ let description = "System architecture of the system."; default = "x86_64-linux"; }; + + android-dev = mkEnableOption "Enable ADB on the host."; }; }; + system = import ../system.nix { inherit config lib; }; + in { options.fudo.hosts = with types; mkOption { @@ -246,6 +250,11 @@ in { user = "root"; }; + programs.adb.enable = host-cfg.android-dev; + users.groups.adbusers = mkIf host-cfg.android-dev { + members = system.local-admins; + }; + programs.ssh.knownHosts = let keyed-hosts = filterAttrs (host: opts: opts.ssh-pubkey != null) config.fudo.hosts;