mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
packages: rework package set organisation
make package set self referential collapse redundant files for package plumbing rework packages overlay and simplify scope update altiosevka font make altiosevka an overlay instead note invert package logic scope overlay unify package overlay logic fix overlay reference
This commit is contained in:
parent
d2bf46fcc4
commit
8e540bcfb9
17 changed files with 142 additions and 107 deletions
|
|
@ -14,6 +14,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = import ./nix/packages;
|
packages = import ./nix/packages {inherit sources;};
|
||||||
overlays = import ./nix/overlays;
|
overlays = import ./nix/overlays;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ in
|
||||||
../overlays/nur.nix
|
../overlays/nur.nix
|
||||||
../overlays/nix-tree.nix
|
../overlays/nix-tree.nix
|
||||||
|
|
||||||
../overlays/packages.nix
|
../packages/overlay.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ in
|
||||||
../overlays/wired-notify.nix
|
../overlays/wired-notify.nix
|
||||||
../overlays/nix-tree.nix
|
../overlays/nix-tree.nix
|
||||||
|
|
||||||
../overlays/packages.nix
|
../packages/overlay.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set NIX_PATH and flake registry at the same time
|
# Set NIX_PATH and flake registry at the same time
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
{pkgs, ...}: let
|
{pkgs, ...}: {
|
||||||
inherit (pkgs) myPkgs;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
#
|
#
|
||||||
# CLI / TUI
|
# CLI / TUI
|
||||||
|
|
@ -14,23 +12,23 @@ in {
|
||||||
pkgs.p7zip
|
pkgs.p7zip
|
||||||
pkgs.bc
|
pkgs.bc
|
||||||
pkgs.dig
|
pkgs.dig
|
||||||
myPkgs.hutils
|
pkgs.hutils
|
||||||
# pkgs.miniserve
|
# pkgs.miniserve
|
||||||
pkgs.agenix
|
pkgs.agenix
|
||||||
|
|
||||||
# pdf
|
# pdf
|
||||||
# pkgs.poppler_utils # pdfseparate, pdfunite
|
# pkgs.poppler_utils # pdfseparate, pdfunite
|
||||||
# myPkgs.easyscan
|
# pkgs.easyscan
|
||||||
|
|
||||||
# fun
|
# fun
|
||||||
# myPkgs.prop-solveur
|
# pkgs.prop-solveur
|
||||||
# myPkgs.hbrainfuck
|
# pkgs.hbrainfuck
|
||||||
# pkgs.lucky-commit
|
# pkgs.lucky-commit
|
||||||
|
|
||||||
# pretty tui tools
|
# pretty tui tools
|
||||||
pkgs.du-dust
|
pkgs.du-dust
|
||||||
pkgs.tldr
|
pkgs.tldr
|
||||||
myPkgs.tokei
|
pkgs.tokei
|
||||||
pkgs.hyperfine
|
pkgs.hyperfine
|
||||||
pkgs.watchexec
|
pkgs.watchexec
|
||||||
pkgs.onefetch
|
pkgs.onefetch
|
||||||
|
|
@ -87,7 +85,7 @@ in {
|
||||||
# pkgs.aseprite
|
# pkgs.aseprite
|
||||||
|
|
||||||
# wm utilities
|
# wm utilities
|
||||||
myPkgs.xbrightness
|
pkgs.xbrightness
|
||||||
pkgs.dmenu
|
pkgs.dmenu
|
||||||
pkgs.xclip
|
pkgs.xclip
|
||||||
pkgs.playerctl # talk to playerctld
|
pkgs.playerctl # talk to playerctld
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,9 @@ in
|
||||||
../overlays/nix-tree.nix
|
../overlays/nix-tree.nix
|
||||||
../overlays/wallpapers.nix
|
../overlays/wallpapers.nix
|
||||||
|
|
||||||
../overlays/packages.nix
|
../overlays/iosevka.nix
|
||||||
|
../packages/overlay.nix
|
||||||
|
|
||||||
./vanadium/overlay.nix
|
./vanadium/overlay.nix
|
||||||
|
|
||||||
# removed, but I need it for PLFA!
|
# removed, but I need it for PLFA!
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{pkgs, config, ...}: let
|
{
|
||||||
inherit (pkgs) myPkgs;
|
pkgs,
|
||||||
in {
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home.sessionPath = [
|
home.sessionPath = [
|
||||||
"${config.home.homeDirectory}/.local/bin"
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
];
|
];
|
||||||
|
|
@ -18,26 +20,26 @@ in {
|
||||||
pkgs.p7zip
|
pkgs.p7zip
|
||||||
pkgs.bc
|
pkgs.bc
|
||||||
pkgs.dig
|
pkgs.dig
|
||||||
myPkgs.hutils
|
pkgs.hutils
|
||||||
pkgs.miniserve
|
pkgs.miniserve
|
||||||
pkgs.agenix
|
pkgs.agenix
|
||||||
|
|
||||||
# pdf
|
# pdf
|
||||||
pkgs.poppler_utils # pdfseparate, pdfunite
|
pkgs.poppler_utils # pdfseparate, pdfunite
|
||||||
myPkgs.easyscan
|
pkgs.easyscan
|
||||||
|
|
||||||
# fun
|
# fun
|
||||||
myPkgs.prop-solveur
|
pkgs.prop-solveur
|
||||||
myPkgs.hbrainfuck
|
pkgs.hbrainfuck
|
||||||
pkgs.lucky-commit
|
pkgs.lucky-commit
|
||||||
|
|
||||||
# research
|
# research
|
||||||
myPkgs.necrolib
|
pkgs.necrolib
|
||||||
|
|
||||||
# pretty tui tools
|
# pretty tui tools
|
||||||
pkgs.du-dust
|
pkgs.du-dust
|
||||||
pkgs.tldr
|
pkgs.tldr
|
||||||
myPkgs.tokei
|
pkgs.tokei
|
||||||
pkgs.hyperfine
|
pkgs.hyperfine
|
||||||
pkgs.watchexec
|
pkgs.watchexec
|
||||||
pkgs.onefetch
|
pkgs.onefetch
|
||||||
|
|
@ -100,7 +102,7 @@ in {
|
||||||
pkgs.iamb
|
pkgs.iamb
|
||||||
|
|
||||||
# wm utilities
|
# wm utilities
|
||||||
myPkgs.xbrightness
|
pkgs.xbrightness
|
||||||
pkgs.dmenu
|
pkgs.dmenu
|
||||||
pkgs.xclip
|
pkgs.xclip
|
||||||
pkgs.maim
|
pkgs.maim
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,14 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.programs.kitty;
|
cfg = config.programs.kitty;
|
||||||
|
|
||||||
inherit (pkgs) myPkgs;
|
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
myPkgs.altiosevka-nerd-font-mono
|
pkgs.nerd-fonts.iosevka
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.kitty = lib.mkIf cfg.enable {
|
programs.kitty = lib.mkIf cfg.enable {
|
||||||
font.name = "family=\"Altiosevka NFM\"";
|
font.name = "family=\"Iosevka NFM\"";
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
# Make text thicker
|
# Make text thicker
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Don't pollute the global path
|
# Don't pollute the global path
|
||||||
path = [pkgs.myPkgs.typst-bot];
|
path = [pkgs.typst-bot];
|
||||||
script = "typst-bot";
|
script = "typst-bot";
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
|
||||||
95
nix/overlays/iosevka.nix
Normal file
95
nix/overlays/iosevka.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
final: prev: rec {
|
||||||
|
nerd-fonts = let
|
||||||
|
mkNerdFont = final.callPackage ../lib/mkNerdFont.nix {};
|
||||||
|
in
|
||||||
|
prev.nerd-fonts
|
||||||
|
// {
|
||||||
|
iosevka = mkNerdFont {
|
||||||
|
font = iosevka;
|
||||||
|
extraArgs = [
|
||||||
|
"--name {/.}-NFM"
|
||||||
|
"--use-single-width-glyphs"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
iosevka = prev.iosevka.override {
|
||||||
|
set = "custom";
|
||||||
|
/*
|
||||||
|
Guide: https://github.com/be5invis/Iosevka/blob/main/doc/custom-build.md
|
||||||
|
|
||||||
|
Use `term` spacing to avoid dashed arrow issue
|
||||||
|
https://github.com/ryanoasis/nerd-fonts/issues/1018
|
||||||
|
*/
|
||||||
|
privateBuildPlan = {
|
||||||
|
family = "Iosevka";
|
||||||
|
noLigation = true;
|
||||||
|
serifs = "sans";
|
||||||
|
spacing = "term";
|
||||||
|
|
||||||
|
variants = {
|
||||||
|
design = {
|
||||||
|
ampersand = "et-tailed";
|
||||||
|
capital-q = "crossing";
|
||||||
|
capital-z = "straight-serifless-with-crossbar";
|
||||||
|
cent = "open";
|
||||||
|
dollar = "open";
|
||||||
|
lig-double-arrow-bar = "with-notch";
|
||||||
|
lig-equal-chain = "with-notch";
|
||||||
|
lig-hyphen-chain = "with-notch";
|
||||||
|
lig-plus-chain = "with-notch";
|
||||||
|
lig-single-arrow-bar = "with-notch";
|
||||||
|
lower-lambda = "tailed-turn";
|
||||||
|
number-sign = "slanted";
|
||||||
|
percent = "rings-continuous-slash-also-connected";
|
||||||
|
seven = "straight-serifless-crossbar";
|
||||||
|
};
|
||||||
|
italic = {
|
||||||
|
v = "cursive-serifless";
|
||||||
|
w = "cursive-serifless";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
weights = {
|
||||||
|
Bold = {
|
||||||
|
shape = 680;
|
||||||
|
menu = 680;
|
||||||
|
css = 680;
|
||||||
|
};
|
||||||
|
Regular = {
|
||||||
|
shape = 480;
|
||||||
|
menu = 480;
|
||||||
|
css = 480;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
widths = {
|
||||||
|
Extended = {
|
||||||
|
shape = 600;
|
||||||
|
menu = 7;
|
||||||
|
css = "expanded";
|
||||||
|
};
|
||||||
|
Normal = {
|
||||||
|
shape = 500;
|
||||||
|
menu = 5;
|
||||||
|
css = "normal";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
slopes = {
|
||||||
|
Upright = {
|
||||||
|
angle = 0;
|
||||||
|
css = "normal";
|
||||||
|
menu = "upright";
|
||||||
|
shape = "upright";
|
||||||
|
};
|
||||||
|
Italic = {
|
||||||
|
angle = 9.4;
|
||||||
|
shape = "italic";
|
||||||
|
menu = "italic";
|
||||||
|
css = "italic";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
final: _: {
|
|
||||||
myPkgs = final.callPackages ../packages {};
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
[buildPlans.altiosevka]
|
|
||||||
family = "iosevka"
|
|
||||||
spacing = "term"
|
|
||||||
serifs = "sans"
|
|
||||||
noLigation = true
|
|
||||||
|
|
||||||
[buildPlans.altiosevka.variants.design]
|
|
||||||
capital-z = 'straight-serifless-with-crossbar'
|
|
||||||
capital-q = 'crossing'
|
|
||||||
lower-lambda = 'tailed-turn'
|
|
||||||
seven = 'straight-serifless-crossbar'
|
|
||||||
number-sign = 'slanted'
|
|
||||||
ampersand = "et-tailed"
|
|
||||||
dollar = 'open'
|
|
||||||
cent = "open"
|
|
||||||
percent = 'rings-continuous-slash-also-connected'
|
|
||||||
# explicitly declare with-notch
|
|
||||||
lig-equal-chain = 'with-notch'
|
|
||||||
lig-hyphen-chain = 'with-notch'
|
|
||||||
lig-plus-chain = 'with-notch'
|
|
||||||
lig-double-arrow-bar = 'with-notch'
|
|
||||||
lig-single-arrow-bar = 'with-notch'
|
|
||||||
|
|
||||||
[buildPlans.altiosevka.variants.italic]
|
|
||||||
v = "cursive-serifless"
|
|
||||||
w = "cursive-serifless"
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{iosevka}: let
|
|
||||||
pname = "altiosevka";
|
|
||||||
in
|
|
||||||
(iosevka.overrideAttrs (_: {
|
|
||||||
inherit pname;
|
|
||||||
}))
|
|
||||||
.override
|
|
||||||
{
|
|
||||||
set = pname;
|
|
||||||
/*
|
|
||||||
Guide: https://github.com/be5invis/Iosevka/blob/main/doc/custom-build.md
|
|
||||||
|
|
||||||
Use `term` spacing to avoid dashed arrow issue
|
|
||||||
https://github.com/ryanoasis/nerd-fonts/issues/1018
|
|
||||||
*/
|
|
||||||
privateBuildPlan = builtins.readFile ./buildplan.toml;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
sources ? import ../sources.nix,
|
|
||||||
pkgs ? import sources.nixpkgs {},
|
|
||||||
}: let
|
|
||||||
inherit (pkgs) lib;
|
|
||||||
in
|
|
||||||
lib.mapAttrs
|
|
||||||
(name: _: pkgs.callPackage (./by-name + "/${name}/package.nix") {})
|
|
||||||
(
|
|
||||||
lib.filterAttrs (_: type: type == "directory") (builtins.readDir ./by-name)
|
|
||||||
)
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
args:
|
{sources ? import ../sources.nix}: let
|
||||||
import ./top-level.nix args
|
scopeOverlay = overlay: final: prev: {export = prev.export or {} // overlay final prev;};
|
||||||
// import ./by-name.nix args
|
in
|
||||||
|
(
|
||||||
|
import sources.nixpkgs {
|
||||||
|
overlays = map scopeOverlay [
|
||||||
|
(import ./overlay.nix)
|
||||||
|
(import ../overlays/iosevka.nix)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
).export
|
||||||
|
|
|
||||||
7
nix/packages/overlay.nix
Normal file
7
nix/packages/overlay.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
final: prev: let
|
||||||
|
inherit (prev) lib;
|
||||||
|
in
|
||||||
|
lib.mapAttrs (name: _: final.callPackage (./by-name + "/${name}/package.nix") {})
|
||||||
|
(
|
||||||
|
lib.filterAttrs (_: type: type == "directory") (builtins.readDir ./by-name)
|
||||||
|
)
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
sources ? import ../sources.nix,
|
|
||||||
pkgs ? import sources.nixpkgs {},
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
iosevka-pin = import sources.pin-iosevka {};
|
|
||||||
mkNerdFont = iosevka-pin.callPackage ../lib/mkNerdFont.nix {};
|
|
||||||
in rec {
|
|
||||||
# fonts
|
|
||||||
altiosevka = iosevka-pin.callPackage ./altiosevka {};
|
|
||||||
altiosevka-nerd-font-mono = mkNerdFont {
|
|
||||||
font = altiosevka;
|
|
||||||
extraArgs = [
|
|
||||||
"--name {/.}-NFM"
|
|
||||||
"--use-single-width-glyphs"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
import sources.nixpkgs {
|
import sources.nixpkgs {
|
||||||
overlays = map import [
|
overlays = map import [
|
||||||
./nix/overlays/disko.nix
|
./nix/overlays/disko.nix
|
||||||
./nix/overlays/packages.nix
|
./nix/packages/overlay.nix
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
}:
|
}:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue