Font progress
This commit is contained in:
parent
4f49ea8383
commit
f40ae42933
110
merged.nix
110
merged.nix
|
@ -15,69 +15,69 @@ let
|
||||||
# sha256 = "0dz8h1ga8lnfvvmvsf6iqvnbvxrvx3qxi0y8s8b72066mqgvy8y5";
|
# sha256 = "0dz8h1ga8lnfvvmvsf6iqvnbvxrvx3qxi0y8s8b72066mqgvy8y5";
|
||||||
# });
|
# });
|
||||||
|
|
||||||
fontInstallPhase = ''
|
# fontInstallPhase = ''
|
||||||
runHook preInstall
|
# runHook preInstall
|
||||||
|
|
||||||
install -Dm644 *.ttc -t $out/share/fonts/
|
# install -Dm644 *.ttc -t $out/share/fonts/
|
||||||
|
|
||||||
runHook postInstall
|
# runHook postInstall
|
||||||
'';
|
# '';
|
||||||
|
|
||||||
my-wqy-zenhei = pkgs.stdenv.mkDerivation rec {
|
# my-wqy-zenhei = pkgs.stdenv.mkDerivation rec {
|
||||||
pname = "wqy-zenhei";
|
# pname = "wqy-zenhei";
|
||||||
version = "0.9.45";
|
# version = "0.9.45";
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
# src = pkgs.fetchurl {
|
||||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||||
hash = "sha256-5LfjBkdb+UJ9F1dXjw5FKJMMhMROqj8WfUxC8RDuddY=";
|
# hash = "sha256-5LfjBkdb+UJ9F1dXjw5FKJMMhMROqj8WfUxC8RDuddY=";
|
||||||
};
|
# };
|
||||||
|
|
||||||
installPhase = fontInstallPhase;
|
# installPhase = fontInstallPhase;
|
||||||
};
|
# };
|
||||||
|
|
||||||
my-wqy-microhei = pkgs.stdenv.mkDerivation rec {
|
# my-wqy-microhei = pkgs.stdenv.mkDerivation rec {
|
||||||
pname = "wqy-microhei";
|
# pname = "wqy-microhei";
|
||||||
version = "0.2.0-beta";
|
# version = "0.2.0-beta";
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
# src = pkgs.fetchurl {
|
||||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||||
hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4=";
|
# hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4=";
|
||||||
};
|
# };
|
||||||
|
|
||||||
installPhase = fontInstallPhase;
|
# installPhase = fontInstallPhase;
|
||||||
};
|
# };
|
||||||
|
|
||||||
my-wqy-bitmapsong = pkgs.stdenv.mkDerivation rec {
|
# my-wqy-bitmapsong = pkgs.stdenv.mkDerivation rec {
|
||||||
pname = "wqy-bitmapsong-pcf";
|
# pname = "wqy-bitmapsong-pcf";
|
||||||
version = "1.0.0-RC1";
|
# version = "1.0.0-RC1";
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
# src = pkgs.fetchurl {
|
||||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||||
#hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
|
# #hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
|
||||||
hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
|
# hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
|
||||||
};
|
# };
|
||||||
|
|
||||||
buildInputs = [ pkgs.fontforge ];
|
# buildInputs = [ pkgs.fontforge ];
|
||||||
buildPhase = ''
|
# buildPhase = ''
|
||||||
newName() {
|
# newName() {
|
||||||
test "''${1:5:1}" = i && _it=Italic || _it=
|
# test "''${1:5:1}" = i && _it=Italic || _it=
|
||||||
case ''${1:6:3} in
|
# case ''${1:6:3} in
|
||||||
400) test -z $it && _weight=Medium ;;
|
# 400) test -z $it && _weight=Medium ;;
|
||||||
700) _weight=Bold ;;
|
# 700) _weight=Bold ;;
|
||||||
esac
|
# esac
|
||||||
_pt=''${1%.pcf}
|
# _pt=''${1%.pcf}
|
||||||
_pt=''${_pt#*-}
|
# _pt=''${_pt#*-}
|
||||||
echo "WenQuanYi_Bitmap_Song$_weight$_it$_pt"
|
# echo "WenQuanYi_Bitmap_Song$_weight$_it$_pt"
|
||||||
}
|
# }
|
||||||
|
|
||||||
for i in *.pcf; do
|
# for i in *.pcf; do
|
||||||
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$(newName $i).otb\")"
|
# fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$(newName $i).otb\")"
|
||||||
done
|
# done
|
||||||
'';
|
# '';
|
||||||
installPhase = ''
|
# installPhase = ''
|
||||||
install -Dm644 *.otb -t $out/share/fonts/
|
# install -Dm644 *.otb -t $out/share/fonts/
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
in {
|
in {
|
||||||
# imports =
|
# imports =
|
||||||
# [
|
# [
|
||||||
|
@ -229,9 +229,9 @@ in {
|
||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
my-wqy-zenhei
|
# my-wqy-zenhei
|
||||||
my-wqy-microhei
|
# my-wqy-microhei
|
||||||
my-wqy-bitmapsong
|
# my-wqy-bitmapsong
|
||||||
# cozette
|
# cozette
|
||||||
#uw-ttyp0
|
#uw-ttyp0
|
||||||
#ucs-fonts
|
#ucs-fonts
|
||||||
|
@ -275,10 +275,8 @@ in {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
vim
|
vim
|
||||||
neovim
|
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
brightnessctl
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
{config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.brightnessctl;
|
||||||
|
in {
|
||||||
|
options.modules.brightnessctl = {
|
||||||
|
enable = mkEnableOption "brightnessctl";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.brightnessctl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -64,6 +64,9 @@ in {
|
||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
./modules/default.nix
|
./modules/default.nix
|
||||||
|
|
||||||
|
# Custom packages
|
||||||
|
../../pkgs/default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Create users
|
# Create users
|
||||||
|
|
|
@ -46,6 +46,12 @@ let
|
||||||
./fonts/fira-code.nix
|
./fonts/fira-code.nix
|
||||||
./fonts/nerd-fonts-symbols.nix
|
./fonts/nerd-fonts-symbols.nix
|
||||||
./fonts/noto-color-emoji.nix
|
./fonts/noto-color-emoji.nix
|
||||||
|
./fonts/wqy-bitmapsong.nix
|
||||||
|
./fonts/wqy-microhei-mono.nix
|
||||||
|
./fonts/wqy-microhei.nix
|
||||||
|
./fonts/wqy-zenhei-mono.nix
|
||||||
|
./fonts/wqy-zenhei-sharp.nix
|
||||||
|
./fonts/wqy-zenhei.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Gather enabled fonts.
|
# Gather enabled fonts.
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
recommendedSize = 9;
|
recommendedSize = 9;
|
||||||
fallbackFonts = [
|
fallbackFonts = [
|
||||||
"Cozette"
|
"Cozette"
|
||||||
|
"wenquanyi bitmap song"
|
||||||
"Symbols Nerd Font Mono"
|
"Symbols Nerd Font Mono"
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "wenquanyi bitmap song";
|
||||||
|
package = pkgs.wqy-bitmapsong;
|
||||||
|
recommendedSize = 12;
|
||||||
|
fallbackFonts = [];
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "WenQuanYi Micro Hei Mono";
|
||||||
|
package = pkgs.wqy-microhei;
|
||||||
|
recommendedSize = 12;
|
||||||
|
fallbackFonts = [];
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "WenQuanYi Micro Hei";
|
||||||
|
package = pkgs.wqy-microhei;
|
||||||
|
recommendedSize = 12;
|
||||||
|
fallbackFonts = [];
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "WenQuanYi Zen Hei Mono";
|
||||||
|
package = pkgs.wqy-zenhei;
|
||||||
|
recommendedSize = 12;
|
||||||
|
fallbackFonts = [];
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "WenQuanYi Zen Hei Sharp";
|
||||||
|
package = pkgs.wqy-zenhei;
|
||||||
|
recommendedSize = 12;
|
||||||
|
fallbackFonts = [];
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "WenQuanYi Zen Hei";
|
name = "WenQuanYi Zen Hei";
|
||||||
|
package = pkgs.wqy-zenhei;
|
||||||
recommendedSize = 12;
|
recommendedSize = 12;
|
||||||
fallbackFonts = [];
|
fallbackFonts = [];
|
||||||
}
|
}
|
|
@ -1,17 +1,24 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
# let
|
||||||
mkPackage = path: (mkOption {
|
# mkPackage = path: (mkOption {
|
||||||
type = types.package;
|
# type = types.package;
|
||||||
default = (pkgs.callPackage path) {};
|
# default = (pkgs.callPackage path) {};
|
||||||
description = (mkPackage path).default.name;
|
# description = (mkPackage path).default.name;
|
||||||
});
|
# });
|
||||||
in {
|
# in {
|
||||||
options.pkgs = {
|
# options.pkgs = {
|
||||||
# Add all custom packages
|
# # Add all custom packages
|
||||||
wqy-zenhei = mkPackage ./fonts/wqy-zenhei.nix;
|
# wqy-zenhei = mkPackage ./fonts/wqy-zenhei.nix;
|
||||||
wqy-microhei = mkPackage ./fonts/wqy-microhei.nix;
|
# wqy-microhei = mkPackage ./fonts/wqy-microhei.nix;
|
||||||
wqy-bitmapsong = mkPackage ./fonts/wqy-bitmapsong.nix;
|
# wqy-bitmapsong = mkPackage ./fonts/wqy-bitmapsong.nix;
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
{
|
||||||
|
nixpkgs.config.packageOverrides = pkgs: rec {
|
||||||
|
wqy-zenhei = pkgs.callPackage ./fonts/wqy-zenhei.nix {};
|
||||||
|
wqy-microhei = pkgs.callPackage ./fonts/wqy-microhei.nix {};
|
||||||
|
wqy-bitmapsong = pkgs.callPackage ./fonts/wqy-bitmapsong.nix {};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
# How Jan likes his linux to be configured
|
# How Jan likes his linux to be configured
|
||||||
|
|
||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# TODO: Remove later
|
# TODO: Remove later
|
||||||
|
|
Loading…
Reference in New Issue