Font progress
This commit is contained in:
parent
4f49ea8383
commit
f40ae42933
110
merged.nix
110
merged.nix
|
@ -15,69 +15,69 @@ let
|
|||
# sha256 = "0dz8h1ga8lnfvvmvsf6iqvnbvxrvx3qxi0y8s8b72066mqgvy8y5";
|
||||
# });
|
||||
|
||||
fontInstallPhase = ''
|
||||
runHook preInstall
|
||||
# fontInstallPhase = ''
|
||||
# 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 {
|
||||
pname = "wqy-zenhei";
|
||||
version = "0.9.45";
|
||||
# my-wqy-zenhei = pkgs.stdenv.mkDerivation rec {
|
||||
# pname = "wqy-zenhei";
|
||||
# version = "0.9.45";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-5LfjBkdb+UJ9F1dXjw5FKJMMhMROqj8WfUxC8RDuddY=";
|
||||
};
|
||||
# src = pkgs.fetchurl {
|
||||
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
# hash = "sha256-5LfjBkdb+UJ9F1dXjw5FKJMMhMROqj8WfUxC8RDuddY=";
|
||||
# };
|
||||
|
||||
installPhase = fontInstallPhase;
|
||||
};
|
||||
# installPhase = fontInstallPhase;
|
||||
# };
|
||||
|
||||
my-wqy-microhei = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "wqy-microhei";
|
||||
version = "0.2.0-beta";
|
||||
# my-wqy-microhei = pkgs.stdenv.mkDerivation rec {
|
||||
# pname = "wqy-microhei";
|
||||
# version = "0.2.0-beta";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4=";
|
||||
};
|
||||
# src = pkgs.fetchurl {
|
||||
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
# hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4=";
|
||||
# };
|
||||
|
||||
installPhase = fontInstallPhase;
|
||||
};
|
||||
# installPhase = fontInstallPhase;
|
||||
# };
|
||||
|
||||
my-wqy-bitmapsong = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "wqy-bitmapsong-pcf";
|
||||
version = "1.0.0-RC1";
|
||||
# my-wqy-bitmapsong = pkgs.stdenv.mkDerivation rec {
|
||||
# pname = "wqy-bitmapsong-pcf";
|
||||
# version = "1.0.0-RC1";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
#hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
|
||||
hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
|
||||
};
|
||||
# src = pkgs.fetchurl {
|
||||
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
# #hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
|
||||
# hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
|
||||
# };
|
||||
|
||||
buildInputs = [ pkgs.fontforge ];
|
||||
buildPhase = ''
|
||||
newName() {
|
||||
test "''${1:5:1}" = i && _it=Italic || _it=
|
||||
case ''${1:6:3} in
|
||||
400) test -z $it && _weight=Medium ;;
|
||||
700) _weight=Bold ;;
|
||||
esac
|
||||
_pt=''${1%.pcf}
|
||||
_pt=''${_pt#*-}
|
||||
echo "WenQuanYi_Bitmap_Song$_weight$_it$_pt"
|
||||
}
|
||||
# buildInputs = [ pkgs.fontforge ];
|
||||
# buildPhase = ''
|
||||
# newName() {
|
||||
# test "''${1:5:1}" = i && _it=Italic || _it=
|
||||
# case ''${1:6:3} in
|
||||
# 400) test -z $it && _weight=Medium ;;
|
||||
# 700) _weight=Bold ;;
|
||||
# esac
|
||||
# _pt=''${1%.pcf}
|
||||
# _pt=''${_pt#*-}
|
||||
# echo "WenQuanYi_Bitmap_Song$_weight$_it$_pt"
|
||||
# }
|
||||
|
||||
for i in *.pcf; do
|
||||
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$(newName $i).otb\")"
|
||||
done
|
||||
'';
|
||||
installPhase = ''
|
||||
install -Dm644 *.otb -t $out/share/fonts/
|
||||
'';
|
||||
};
|
||||
# for i in *.pcf; do
|
||||
# fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$(newName $i).otb\")"
|
||||
# done
|
||||
# '';
|
||||
# installPhase = ''
|
||||
# install -Dm644 *.otb -t $out/share/fonts/
|
||||
# '';
|
||||
# };
|
||||
in {
|
||||
# imports =
|
||||
# [
|
||||
|
@ -229,9 +229,9 @@ in {
|
|||
|
||||
# Fonts
|
||||
fonts.packages = with pkgs; [
|
||||
my-wqy-zenhei
|
||||
my-wqy-microhei
|
||||
my-wqy-bitmapsong
|
||||
# my-wqy-zenhei
|
||||
# my-wqy-microhei
|
||||
# my-wqy-bitmapsong
|
||||
# cozette
|
||||
#uw-ttyp0
|
||||
#ucs-fonts
|
||||
|
@ -275,10 +275,8 @@ in {
|
|||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
neovim
|
||||
wget
|
||||
curl
|
||||
brightnessctl
|
||||
];
|
||||
|
||||
# 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/default.nix
|
||||
|
||||
# Custom packages
|
||||
../../pkgs/default.nix
|
||||
];
|
||||
|
||||
# Create users
|
||||
|
|
|
@ -46,6 +46,12 @@ let
|
|||
./fonts/fira-code.nix
|
||||
./fonts/nerd-fonts-symbols.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.
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
recommendedSize = 9;
|
||||
fallbackFonts = [
|
||||
"Cozette"
|
||||
"wenquanyi bitmap song"
|
||||
"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";
|
||||
package = pkgs.wqy-zenhei;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [];
|
||||
}
|
|
@ -1,17 +1,24 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
mkPackage = path: (mkOption {
|
||||
type = types.package;
|
||||
default = (pkgs.callPackage path) {};
|
||||
description = (mkPackage path).default.name;
|
||||
});
|
||||
in {
|
||||
options.pkgs = {
|
||||
# Add all custom packages
|
||||
wqy-zenhei = mkPackage ./fonts/wqy-zenhei.nix;
|
||||
wqy-microhei = mkPackage ./fonts/wqy-microhei.nix;
|
||||
wqy-bitmapsong = mkPackage ./fonts/wqy-bitmapsong.nix;
|
||||
};
|
||||
# let
|
||||
# mkPackage = path: (mkOption {
|
||||
# type = types.package;
|
||||
# default = (pkgs.callPackage path) {};
|
||||
# description = (mkPackage path).default.name;
|
||||
# });
|
||||
# in {
|
||||
# options.pkgs = {
|
||||
# # Add all custom packages
|
||||
# wqy-zenhei = mkPackage ./fonts/wqy-zenhei.nix;
|
||||
# wqy-microhei = mkPackage ./fonts/wqy-microhei.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
|
||||
|
||||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# TODO: Remove later
|
||||
|
|
Loading…
Reference in New Issue