-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
84 lines (79 loc) · 2.36 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
description = "A thicc retrofuturistic bitmap font made for the modern screen";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
bited-utils = {
url = "github:molarmanful/bited-utils";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
};
};
};
outputs =
inputs@{ systems, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ inputs.bited-utils.flakeModule ];
systems = import systems;
perSystem =
{
config,
pkgs,
self',
...
}:
{
bited-utils = {
name = "ANAKRON";
version = builtins.readFile ./VERSION;
src = ./.;
nerd = true;
buildTransformer =
build:
build.overrideAttrs {
postBuild = ''
${pkgs.bdf2psf}/bin/bdf2psf --fb src/ANAKRON.bdf \
${pkgs.bdf2psf}/share/bdf2psf/standard.equivalents \
src/ANAKRON.set \
512 out/ANAKRON.psfu
'';
postInstall = ''
install -Dm644 out/*.psfu -t $out/share/consolefonts
'';
};
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
config.bited-utils.bited-clr
taplo
# lsps
nil
nixd
marksman
# formatters
nixfmt-rfc-style
mdformat
python3Packages.mdformat-gfm
python3Packages.mdformat-gfm-alerts
# linters
statix
deadnix
];
};
formatter = pkgs.writeShellApplication {
name = "linter";
runtimeInputs = self'.devShells.default.nativeBuildInputs;
text = ''
find . -iname '*.nix' -exec nixfmt {} \; -exec deadnix -e {} \; -exec statix fix {} \;
find . -iname '*.toml' -exec taplo fmt {} \;
find . -iname '*.md' -exec mdformat {} \;
'';
};
};
};
}