2024-06-24 01:37:19 +03:00
|
|
|
{ pkgs
|
|
|
|
, inputs
|
|
|
|
, const
|
2024-06-29 19:01:12 +03:00
|
|
|
, lib
|
2024-06-24 01:37:19 +03:00
|
|
|
, util
|
2024-06-29 19:01:12 +03:00
|
|
|
, config
|
2024-06-24 01:37:19 +03:00
|
|
|
, secret
|
|
|
|
, ... } @args: let
|
2024-05-04 23:15:57 +03:00
|
|
|
# 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;
|
|
|
|
package = import ./Package.nix args;
|
|
|
|
termux = import ./Termux.nix args;
|
|
|
|
|
|
|
|
# External modules.
|
2024-06-29 23:34:34 +03:00
|
|
|
bash = import ../module/common/bash args;
|
|
|
|
nvim = import ../module/common/nvim args;
|
|
|
|
ssh = import ../module/common/ssh args;
|
|
|
|
stylix = import ../module/common/Stylix.nix args;
|
|
|
|
tmux = import ../module/common/tmux args;
|
|
|
|
yazi = import ../user/common/yazi args;
|
2024-05-04 23:15:57 +03:00
|
|
|
in {
|
2024-06-24 03:32:33 +03:00
|
|
|
# Configure system.
|
2024-06-29 19:01:12 +03:00
|
|
|
time.timeZone = const.timeZone;
|
|
|
|
nix.extraOptions = "experimental-features = nix-command flakes";
|
|
|
|
# stylix.autoEnable = lib.mkForce false;
|
2024-05-04 23:15:57 +03:00
|
|
|
|
2024-06-24 03:32:33 +03:00
|
|
|
# Install packages.
|
2024-05-04 23:15:57 +03:00
|
|
|
environment.packages = package.list;
|
|
|
|
|
2024-06-29 23:34:34 +03:00
|
|
|
home-manager.config = stylix // {
|
2024-06-29 19:01:12 +03:00
|
|
|
imports = [
|
|
|
|
inputs.stylix.homeManagerModules.stylix
|
|
|
|
];
|
|
|
|
|
2024-06-29 23:34:34 +03:00
|
|
|
# stylix = {
|
|
|
|
# enable = true;
|
|
|
|
# image = config.module.common.wallpaper.path;
|
|
|
|
# autoEnable = false;
|
|
|
|
# polarity = "dark";
|
|
|
|
# opacity = {
|
|
|
|
# applications = 0.85;
|
|
|
|
# terminal = 0.85;
|
|
|
|
# popups = 0.85;
|
|
|
|
# desktop = 0.85;
|
|
|
|
# };
|
|
|
|
# cursor = {
|
|
|
|
# name = "Adwaita";
|
|
|
|
# package = pkgs.gnome3.adwaita-icon-theme;
|
|
|
|
# size = 14;
|
|
|
|
# };
|
|
|
|
# fonts = let
|
|
|
|
# serif = {
|
|
|
|
# package = (pkgs.callPackage ../module/common/applefont {});
|
|
|
|
# name = "SF Pro Display";
|
|
|
|
# };
|
|
|
|
# in {
|
|
|
|
# inherit serif;
|
|
|
|
# sizes = {
|
|
|
|
# applications = 12;
|
|
|
|
# terminal = 14;
|
|
|
|
# popups = 12;
|
|
|
|
# desktop = 14;
|
|
|
|
# };
|
|
|
|
# sansSerif = serif;
|
|
|
|
# monospace = {
|
|
|
|
# package = (pkgs.nerdfonts.override { fonts = [ "Terminus" ]; });
|
|
|
|
# name = "Terminess Nerd Font Mono";
|
|
|
|
# };
|
|
|
|
# emoji = {
|
|
|
|
# package = pkgs.noto-fonts-emoji;
|
|
|
|
# name = "Noto Color Emoji";
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# override = if config.module.common.wallpaper.forceContrastText then {
|
|
|
|
# base04 = "000000";
|
|
|
|
# base05 = "ffffff";
|
|
|
|
# base06 = "ffffff";
|
|
|
|
# } else {};
|
|
|
|
# };
|
2024-06-29 19:01:12 +03:00
|
|
|
|
2024-05-04 23:15:57 +03:00
|
|
|
home = {
|
2024-06-24 03:32:33 +03:00
|
|
|
# Release version.
|
|
|
|
stateVersion = const.droidStateVersion;
|
|
|
|
|
|
|
|
# Environment variables.
|
2024-05-04 23:15:57 +03:00
|
|
|
sessionVariables = environment.variables;
|
2024-06-24 03:32:33 +03:00
|
|
|
|
|
|
|
# Where to put config files.
|
2024-05-04 23:15:57 +03:00
|
|
|
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-05-04 23:15:57 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-24 03:32:33 +03:00
|
|
|
# Special app configuration.
|
2024-05-04 23:15:57 +03:00
|
|
|
programs = {
|
2024-06-29 19:01:12 +03:00
|
|
|
home-manager.enable = true;
|
|
|
|
|
2024-05-04 23:15:57 +03:00
|
|
|
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;
|
2024-05-04 23:15:57 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|