From fdd1f38a3377abd587b48bf8d321bb2d32baf464 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Tue, 22 Oct 2024 05:52:21 +0300 Subject: [PATCH] Android: Replace Makefile terminal init with terminal option. --- Makefile | 2 -- home/Android.nix | 14 ++++++++------ home/android/default.nix | 9 +++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index b7ee8a7..41ff8ab 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,6 @@ help: android: nix-on-droid switch --flake $(flake) - cp ~/.termux/_font.ttf ~/.termux/font.ttf - cp ~/.termux/_colors.properties ~/.termux/colors.properties cp ~/.Wallpaper /sdcard/Download/Wallpaper.jpg cp ~/.Wallpaper /sdcard/Download/Wallpaper.png diff --git a/home/Android.nix b/home/Android.nix index 20e1426..2ee0d29 100644 --- a/home/Android.nix +++ b/home/Android.nix @@ -27,17 +27,19 @@ in }; config = mkIf cfg.enable { - time.timeZone = const.timeZone; environment.packages = package.core; + time.timeZone = const.timeZone; + + terminal = { + inherit (android) font colors; + }; + home-manager.config = stylix // { imports = [ inputs.stylix.homeManagerModules.stylix ]; home = { - stateVersion = const.droidStateVersion; + file = import ./config args; sessionVariables = import ./variable args; - file = (import ./config args) // { - ".termux/_font.ttf".source = android.font; - ".termux/_colors.properties".text = android.colors; - }; + stateVersion = const.droidStateVersion; }; programs = import ./program args; }; diff --git a/home/android/default.nix b/home/android/default.nix index d99a137..8379cfc 100644 --- a/home/android/default.nix +++ b/home/android/default.nix @@ -6,8 +6,9 @@ }/share/fonts/truetype/NerdFonts/TerminessNerdFontMono-Regular.ttf $out ''; - colors = '' - background=#${config.style.color.bg.dark} - foreground=#${config.style.color.fg.light} - ''; + colors = with config.style.color; { + background = "#${bg.dark}"; + cursor = "#${fg.light}"; + foreground = "#${fg.light}"; + }; }