Android : Use default style colors.

This commit is contained in:
Dmitry Voronin 2024-04-04 11:46:21 +03:00
parent 8cfe3cdd94
commit 16e3faac54
2 changed files with 19 additions and 56 deletions

View file

@ -108,8 +108,14 @@
timeZone = "Europe/Moscow";
};
# Styles.
style = { config, ... }: {
color_bg = config.lib.stylix.colors.base00 ? "ffffff";
color_fg = "000000";
};
# Wallpaper.
wallpaper = { pkgs, ...}: let
wallpaper = { pkgs, ... }: let
url = "https://4kwallpapers.com/images/wallpapers/tuscany-pixel-art-3840x2160-15225.jpg";
sha256 = "sha256-kc87Q3EIuWMM6U6+si/V58RcH7FJKaImzM8VLzorOkI=";
in {
@ -165,6 +171,7 @@
const = self.nixosModules.const;
flake = self;
inputs = inputs;
style = self.style;
wallpaper = self.wallpaper { pkgs = nixpkgs.legacyPackages.${system}.pkgs; };
};
};
@ -272,14 +279,13 @@
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [
{ system.stateVersion = inputs.self.nixosModules.const.droidStateVersion; }
stylix.homeManagerModules.stylix
./module/NixOnDroid.nix
];
extraSpecialArgs = {
const = self.nixosModules.const;
flake = self;
inputs = inputs;
wallpaper = self.nixosModules.wallpaper;
const = self.nixosModules.const;
flake = self;
inputs = inputs;
style = self.style { config = config; };
};
};
};

View file

@ -1,9 +1,9 @@
{ pkgs, inputs, const, config, ... }: let
{ pkgs, inputs, const, style, ... }: let
homePath = "/data/data/com.termux.nix/files/home";
tmuxScript = pkgs.writeShellScriptBin "tmux_script" (builtins.readFile ./common/tmux/Script.sh);
bash = import ./common/bash/Bash.nix { config = config; };
bg = config.lib.stylix.colors.base00;
fg = config.lib.stylix.colors.base04;
# bash = import ./common/bash/Bash.nix { config = config; };
bg = style.color_bg;
fg = style.color_fg;
in {
# NOTE: Split into modules?
environment.packages = with pkgs; [
@ -74,10 +74,11 @@ in {
};
programs.bash = {
enable = true;
bashrcExtra = bash.config + ''
# bashrcExtra = bash.config + ''
bashrcExtra = ''
[[ -f ~/.termux/font.ttf ]] || {
cp ~/.termux/_font.ttf ~/.termux/font.ttf
# cp ~/.termux/_colors.properties ~/.termux/colors.properties
cp ~/.termux/_colors.properties ~/.termux/colors.properties
_warn "Termux config installed, please restart."
};
'';
@ -102,49 +103,5 @@ in {
vimAlias = true;
extraConfig = (import ./common/nvim/Init.nix { inputs = inputs; }).customRc;
};
stylix = {
image = wallpaper.path;
autoEnable = true;
polarity = "dark";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
opacity = {
applications = 0.85;
terminal = 0.85;
popups = 0.85;
desktop = 0.85;
};
cursor = {
name = "phinger-cursors";
package = pkgs.phinger-cursors;
size = 24;
};
fonts = {
sizes = {
applications = 12;
terminal = 12;
popups = 12;
desktop = 12;
};
serif = {
package = (pkgs.callPackage ./applefont {});
name = "SF Pro Display";
};
sansSerif = config.stylix.fonts.serif;
monospace = {
package = (pkgs.nerdfonts.override { fonts = [ "Terminus" ]; });
name = "Terminess Nerd Font Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
# targets = {
# foot = {
# enable = true;
# };
# };
};
};
}