2024-04-14 23:48:14 +03:00
|
|
|
{ pkgs, inputs, const, style, util, key, setting, secret, ... } @args: let
|
2024-05-02 01:46:57 +03:00
|
|
|
homePath = "/data/data/com.termux.nix/files/home";
|
|
|
|
tmux = import ./common/tmux args;
|
|
|
|
bash = import ./common/bash args;
|
|
|
|
nvim = import ./common/nvim args;
|
|
|
|
ssh = import ./common/ssh args;
|
2024-04-06 03:03:58 +03:00
|
|
|
font = pkgs.runCommandNoCC "font" {} ''
|
|
|
|
cp ${pkgs.nerdfonts.override { fonts = [ "Terminus" ]; }}/share/fonts/truetype/NerdFonts/TerminessNerdFontMono-Regular.ttf $out
|
|
|
|
'';
|
|
|
|
colors = ''
|
|
|
|
background=#${style.color.bg.dark}
|
|
|
|
foreground=#${style.color.fg.light}
|
|
|
|
'';
|
2024-03-06 05:47:59 +03:00
|
|
|
in {
|
2024-03-26 06:36:00 +03:00
|
|
|
time.timeZone = const.timeZone;
|
2024-03-26 06:31:22 +03:00
|
|
|
nix.extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
|
2024-03-09 01:15:42 +03:00
|
|
|
home-manager.config = {
|
2024-04-14 23:48:14 +03:00
|
|
|
home = {
|
|
|
|
stateVersion = const.droidStateVersion;
|
|
|
|
file = {
|
|
|
|
".dotfiles".source = inputs.self;
|
|
|
|
".ssh/config".text = ssh.config;
|
|
|
|
".termux/_font.ttf".source = font;
|
|
|
|
".termux/_colors.properties".text = colors;
|
|
|
|
};
|
|
|
|
sessionVariables = {
|
|
|
|
EDITOR = "nvim";
|
|
|
|
MANPAGER = "nvim +Man!";
|
|
|
|
NIXPKGS_ALLOW_UNFREE = "1";
|
|
|
|
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}";
|
|
|
|
TERM = "xterm-256color";
|
|
|
|
};
|
2024-04-03 00:23:03 +03:00
|
|
|
};
|
2024-04-14 23:48:14 +03:00
|
|
|
|
|
|
|
programs = {
|
|
|
|
bash = {
|
|
|
|
enable = true;
|
|
|
|
bashrcExtra = bash.config + ''
|
|
|
|
[[ -f ~/.termux/font.ttf ]] || {
|
|
|
|
cp ~/.termux/_font.ttf ~/.termux/font.ttf
|
|
|
|
cp ~/.termux/_colors.properties ~/.termux/colors.properties
|
|
|
|
_warn "Termux config installed, please restart."
|
|
|
|
};
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
tmux = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = tmux.config;
|
|
|
|
};
|
|
|
|
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = {
|
2024-04-14 23:58:48 +03:00
|
|
|
credential.helper = "store";
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
pull.rebase = true;
|
|
|
|
push.autoSetupRemote = true;
|
|
|
|
rebase.autoStash = true;
|
|
|
|
user.signingkey = builtins.readFile secret.crypto.sign.key;
|
|
|
|
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.allowed);
|
|
|
|
gpg.format = secret.crypto.sign.format;
|
2024-03-26 05:48:53 +03:00
|
|
|
};
|
2024-03-09 01:15:42 +03:00
|
|
|
};
|
2024-04-14 23:48:14 +03:00
|
|
|
|
|
|
|
neovim = {
|
|
|
|
enable = true;
|
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
|
|
|
extraConfig = nvim.config;
|
|
|
|
};
|
|
|
|
|
|
|
|
gpg = {
|
|
|
|
enable = true;
|
|
|
|
publicKeys = secret.crypto.publicKeys;
|
|
|
|
};
|
2024-03-09 01:15:42 +03:00
|
|
|
};
|
|
|
|
};
|
2024-04-14 23:58:48 +03:00
|
|
|
|
|
|
|
environment.packages = with pkgs; [
|
|
|
|
android-tools
|
|
|
|
binwalk
|
|
|
|
coreutils
|
|
|
|
curl
|
|
|
|
diffutils
|
|
|
|
ffmpeg
|
|
|
|
file
|
|
|
|
findutils
|
|
|
|
gawk
|
|
|
|
gcc
|
|
|
|
gdu
|
|
|
|
git
|
|
|
|
gnugrep
|
|
|
|
gnumake
|
|
|
|
gnused
|
|
|
|
gnutar
|
|
|
|
gzip xz
|
|
|
|
hostname
|
|
|
|
imagemagick
|
|
|
|
jq
|
|
|
|
lsof
|
|
|
|
man
|
|
|
|
nmap
|
|
|
|
openssh
|
|
|
|
parallel
|
|
|
|
pv
|
|
|
|
ripgrep
|
|
|
|
rsync
|
|
|
|
sqlite
|
2024-05-02 01:46:57 +03:00
|
|
|
pkgs.tmux
|
2024-04-14 23:58:48 +03:00
|
|
|
tree
|
|
|
|
utillinux
|
|
|
|
wget
|
|
|
|
yt-dlp
|
|
|
|
zip unzip
|
|
|
|
];
|
2024-03-04 00:34:39 +03:00
|
|
|
}
|