Dragon upgraded
This commit is contained in:
parent
afe1bb4809
commit
12149bb2f6
10 changed files with 39 additions and 69 deletions
|
@ -62,7 +62,7 @@
|
|||
# Your custom packages
|
||||
# Acessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system:
|
||||
import ./pkgs {
|
||||
import ./packages {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
});
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
home.file."${config.xdg.configHome}/tofi/config" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
font = ${pkgs.iosevka-lyteterm}/share/fonts/truetype/iosevka-lyteterm-regular.ttf
|
||||
font = ${pkgs.iosevkaLyteTerm}/share/fonts/truetype/IosevkaLyteTerm-regular.ttf
|
||||
|
||||
text-color = #f8f8f8
|
||||
prompt-color = #f38ba8
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
# fonts.packages if unstable?
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||
pkgs.iosevka-lyteterm
|
||||
pkgs.iosevkaLyteTerm
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{nixpkgs, ...}: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev:
|
||||
import ../pkgs {
|
||||
import ../packages {
|
||||
pkgs = nixpkgs.legacyPackages.${final.system};
|
||||
};
|
||||
|
||||
|
|
6
packages/default.nix
Normal file
6
packages/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: rec {
|
||||
iosevkaLyteTerm = pkgs.callPackage ./iosevkaLyteTerm.nix {};
|
||||
iosevkaLyteTermSubset = pkgs.callPackage ./iosevkaLyteTermSubset.nix {
|
||||
inherit iosevkaLyteTerm;
|
||||
};
|
||||
}
|
29
packages/iosevkaLyteTermSubset.nix
Normal file
29
packages/iosevkaLyteTermSubset.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
pkgs,
|
||||
parallel,
|
||||
python311Packages,
|
||||
iosevkaLyteTerm,
|
||||
...
|
||||
}:
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
inherit (iosevkaLyteTerm) version;
|
||||
|
||||
pname = "${iosevkaLyteTerm.pname}Subset";
|
||||
buildInputs = [parallel] ++ (with python311Packages; [fonttools brotli]);
|
||||
PYTHONPATH = pkgs.python3.withPackages (pp: with pp; [brotli]);
|
||||
src = iosevkaLyteTerm;
|
||||
|
||||
installPhase = ''
|
||||
ls -la "${iosevkaLyteTerm}/share/fonts/woff2"
|
||||
cp "${iosevkaLyteTerm}"/share/fonts/woff2/*.woff2 ./
|
||||
cp "${iosevkaLyteTerm}"/share/fonts/truetype/*.ttf ./
|
||||
echo ' !"#$%&'"'"'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ … ⎜⎡⎣─│┊└├┬╯░▒♯' > ./subset-glyphs.txt
|
||||
mkdir -p "$out/share/fonts/woff2"
|
||||
mkdir -p "$out/share/fonts/truetype"
|
||||
parallel pyftsubset --name-IDs+=0,4,6 --text-file=./subset-glyphs.txt --flavor=woff2 ::: ./*.woff2
|
||||
parallel pyftsubset --name-IDs+=0,4,6 --text-file=./subset-glyphs.txt ::: ./*.ttf
|
||||
cp ./*.subset.woff2 "$out/share/fonts/woff2"
|
||||
cp ./*.subset.ttf "$out/share/fonts/truetype"
|
||||
ls -laR
|
||||
'';
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||
# You can build them using 'nix build .#example'
|
||||
{pkgs, ...}: rec {
|
||||
# example = pkgs.callPackage ./example { };
|
||||
|
||||
iosevkaLyteTerm = pkgs.callPackage ./iosevka-lyteterm-raw.nix {inherit (pkgs) iosevka;};
|
||||
iosevkaLyteTermWebMin = pkgs.callPackage ./iosevka-lyteterm-webmin.nix {
|
||||
pkgs = pkgs;
|
||||
inherit (pkgs) python311Packages parallel;
|
||||
inherit iosevkaLyteTerm;
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
parallel,
|
||||
python311Packages,
|
||||
iosevkaLyteTerm,
|
||||
...
|
||||
}: let
|
||||
BASE_FONTS = "${iosevkaLyteTerm}";
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
inherit BASE_FONTS;
|
||||
pname = "iosevkaLyteTermWebMin";
|
||||
version = iosevkaLyteTerm.version;
|
||||
buildInputs = [parallel] ++ (with python311Packages; [fonttools brotli]);
|
||||
PYTHONPATH = pkgs.python3.withPackages (pp: with pp; [brotli]);
|
||||
srcs = [
|
||||
BASE_FONTS
|
||||
];
|
||||
installPhase = ''
|
||||
cp "$BASE_FONTS"/woff2/*.woff2 ./
|
||||
cp "$BASE_FONTS"/ttf/*.ttf ./
|
||||
echo ' !"#$%&'"'"'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ … ⎜⎡⎣─│┊└├┬╯░▒♯' > ./subset-glyphs.txt
|
||||
mkdir -p "$out/share/fonts/woff2"
|
||||
mkdir -p "$out/share/fonts/truetype"
|
||||
parallel pyftsubset --name-IDs+=0,4,6 --text-file=./subset-glyphs.txt --flavor=woff2 ::: ./*.woff2
|
||||
parallel pyftsubset --name-IDs+=0,4,6 --text-file=./subset-glyphs.txt ::: ./*.ttf
|
||||
cp ./*.subset.woff2 "$out/share/fonts/woff2"
|
||||
cp ./*.subset.ttf "$out/share/fonts/truetype"
|
||||
ls -laR
|
||||
'';
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
iosevka-lyteterm-raw,
|
||||
...
|
||||
}: let
|
||||
BASE_FONTS = "${iosevka-lyteterm-raw}/iosevka-lyteterm/ttf";
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
inherit BASE_FONTS;
|
||||
pname = "iosevka-lyteterm-ttf";
|
||||
version = iosevka-lyteterm-raw.version;
|
||||
srcs = [
|
||||
BASE_FONTS
|
||||
];
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/fonts/truetype"
|
||||
for f in "$BASE_FONTS"/*.ttf; do
|
||||
cp "$f" "$out/share/fonts/truetype"
|
||||
done
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue