Compare commits

..

No commits in common. "6f5094762190c70bc5b875f3600b12f15cafad1d" and "676c5b821ef1e10bd67a51fd0e484fbd5ee04fd3" have entirely different histories.

5 changed files with 108 additions and 36 deletions

View file

@ -1,9 +1,7 @@
{ pkgs
, inputs
, const
, lib
, util
, config
, secret
, ... } @args: let
# Path where Termux stores user data.
@ -16,12 +14,11 @@
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;
stylix = import ../module/common/Stylix.nix args;
tmux = import ../module/common/tmux args;
yazi = import ../user/common/yazi args;
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 {
# Configure system.
time.timeZone = const.timeZone;
@ -30,12 +27,7 @@ in {
# Install packages.
environment.packages = package.list;
# Home manager config.
home-manager.config = stylix // {
imports = [
inputs.stylix.homeManagerModules.stylix
];
home-manager.config = {
home = {
# Release version.
stateVersion = const.droidStateVersion;
@ -58,8 +50,6 @@ in {
# Special app configuration.
programs = {
home-manager.enable = true;
bash = {
enable = true;
bashrcExtra = bash.config + termux.initScript;

81
android/style/Gruvbox.nix Normal file
View file

@ -0,0 +1,81 @@
{ lib, ... }: with lib; let
mkTypeOption = default: type: mkOption { inherit default type; };
mkStrOption = default: mkTypeOption default types.str;
mkIntOption = default: mkTypeOption default types.int;
mkFloatOption = default: mkTypeOption default types.float;
in {
options.style = {
color = {
bg = {
dark = mkStrOption "1d2021";
light = mkStrOption "504945";
regular = mkStrOption "3c3836";
};
fg = {
dark = mkStrOption "a89984";
light = mkStrOption "fbf1c7";
regular = mkStrOption "ebdbb2";
};
accent = mkStrOption "b8bb26";
heading = mkStrOption "d5c4a1";
hl = mkStrOption "98971a";
keyword = mkStrOption "98971a";
link = mkStrOption "076678";
misc = mkStrOption "808080";
negative = mkStrOption "cc241d";
neutral = mkStrOption "458588";
positive = mkStrOption "87af87";
selection = mkStrOption "87af87";
transparent = mkStrOption "ffffff00";
accent-b = mkStrOption "38";
accent-g = mkStrOption "187";
accent-r = mkStrOption "184";
negative-b = mkStrOption "29";
negative-g = mkStrOption "36";
negative-r = mkStrOption "204";
neutral-b = mkStrOption "136";
neutral-g = mkStrOption "133";
neutral-r = mkStrOption "69";
positive-b = mkStrOption "135";
positive-g = mkStrOption "175";
positive-r = mkStrOption "135";
bg-b = mkStrOption "33";
bg-g = mkStrOption "32";
bg-r = mkStrOption "29";
fg-b = mkStrOption "199";
fg-g = mkStrOption "241";
fg-r = mkStrOption "251";
border = mkStrOption "3c3836";
border-b = mkStrOption "54";
border-g = mkStrOption "56";
border-r = mkStrOption "60";
};
fonts = {
monospace.name = mkStrOption "Terminess Nerd Font Mono";
emoji.name = mkStrOption "Noto Color Emoji";
serif.name = mkStrOption "SF Pro Display";
sansSerif.name = mkStrOption "SF Pro Display";
sizes = {
applications = mkIntOption 12;
terminal = mkIntOption 12;
popups = mkIntOption 12;
desktop = mkIntOption 12;
};
};
opacity = {
application = mkFloatOption 1.0;
desktop = mkFloatOption 1.0;
popup = mkFloatOption 1.0;
terminal = mkFloatOption 1.0;
};
};
}

View file

@ -247,20 +247,20 @@
# Android.
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
modules = let
lib = nixpkgs.lib;
config = self.nixOnDroidConfigurations.default.config;
in [
modules = [
# Android release version.
{ system.stateVersion = self.const.droidStateVersion; }
{ system.stateVersion = inputs.self.const.droidStateVersion; }
# I put all my Android configuration there.
./android
./android/style/Gruvbox.nix
# Some common modules.
./module/common/Setting.nix
./module/common/Wallpaper.nix
(import ./module/common/Style.nix { inherit lib; inherit (config.home-manager) config; })
# ./module/common/Style.nix
# Stylix.
# inputs.stylix.homeManagerModules.stylix
];
# SpecialArgs allows you to pass objects down to other configuration.

View file

@ -1,8 +1,11 @@
{ pkgs, config, ... }: {
# Add a permanent link for the wallpaper to /etc/wallpaper.
environment.etc.wallpaper.source = config.module.common.wallpaper.path;
stylix = {
enable = true;
image = config.module.common.wallpaper.path;
autoEnable = false;
autoEnable = true;
polarity = "dark";
opacity = {
applications = 0.85;
@ -15,20 +18,18 @@
package = pkgs.gnome3.adwaita-icon-theme;
size = 14;
};
fonts = let
serif = {
package = (pkgs.callPackage ./applefont {});
name = "SF Pro Display";
};
in {
inherit serif;
fonts = {
sizes = {
applications = 12;
terminal = 14;
popups = 12;
desktop = 14;
};
sansSerif = serif;
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";

View file

@ -4,22 +4,22 @@
{ lib, stdenv, fetchurl, p7zip }: let
pro = fetchurl {
url = "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg";
sha256 = "sha256-B8xljBAqOoRFXvSOkOKDDWeYUebtMmQLJ8lF05iFnXk=";
sha256 = "sha256-Mu0pmx3OWiKBmMEYLNg+u2MxFERK07BQGe3WAhEec5Q=";
};
compact = fetchurl {
url = "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg";
sha256 = "sha256-L4oLQ34Epw1/wLehU9sXQwUe/LaeKjHRxQAF6u2pfTo=";
sha256 = "sha256-Mkf+GK4iuUhZdUdzMW0VUOmXcXcISejhMeZVm0uaRwY=";
};
mono = fetchurl {
url = "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg";
sha256 = "sha256-Uarx1TKO7g5yVBXAx6Yki065rz/wRuYiHPzzi6cTTl8=";
sha256 = "sha256-tZHV6g427zqYzrNf3wCwiCh5Vjo8PAai9uEvayYPsjM=";
};
ny = fetchurl {
url = "https://devimages-cdn.apple.com/design/resources/download/NY.dmg";
sha256 = "sha256-yYyqkox2x9nQ842laXCqA3UwOpUGyIfUuprX975OsLA=";
sha256 = "sha256-tn1QLCSjgo5q4PwE/we80pJavr3nHVgFWrZ8cp29qBk=";
};
in stdenv.mkDerivation {
name = "applefont";