nix/android/default.nix

83 lines
1.8 KiB
Nix
Raw Normal View History

{ pkgs
, inputs
, const
, style
, util
, key
, secret
, ... } @args: let
# Path where Termux stores user data.
homePath = "/data/data/com.termux.nix/files/home";
# Android modules.
environment = import ./Environment.nix args;
git = import ./Git.nix args;
nix = import ./Nix.nix args;
package = import ./Package.nix args;
termux = import ./Termux.nix args;
# External modules.
bash = import ../module/common/bash args;
nvim = import ../module/common/nvim args;
ssh = import ../module/common/ssh args;
tmux = import ../module/common/tmux args;
yazi = import ../user/common/yazi args;
in {
2024-06-24 03:32:33 +03:00
# Configure system.
time.timeZone = const.timeZone;
nix.extraOptions = nix.extraOptions;
2024-06-24 03:32:33 +03:00
# Install packages.
environment.packages = package.list;
home-manager.config = {
home = {
2024-06-24 03:32:33 +03:00
# Release version.
stateVersion = const.droidStateVersion;
# Environment variables.
sessionVariables = environment.variables;
2024-06-24 03:32:33 +03:00
# Where to put config files.
file = {
".dotfiles".source = inputs.self;
".ssh/config".text = ssh.config;
".termux/_font.ttf".source = termux.font;
".termux/_colors.properties".text = termux.colors;
2024-06-23 23:25:19 +03:00
".config/yazi/init.lua".source = yazi.init;
".config/yazi/keymap.toml".source = yazi.keymap;
".config/yazi/theme.toml".source = yazi.theme;
".config/yazi/yazi.toml".source = yazi.yazi;
};
};
2024-06-24 03:32:33 +03:00
# Special app configuration.
programs = {
bash = {
enable = true;
bashrcExtra = bash.config + termux.initScript;
};
tmux = {
enable = true;
extraConfig = tmux.config;
};
git = {
enable = true;
extraConfig = git.config;
};
neovim = {
enable = true;
extraConfig = nvim.config;
};
gpg = {
enable = true;
2024-06-24 03:32:33 +03:00
inherit (secret.crypto) publicKeys;
};
};
};
}