1
0
Fork 0
nix-typst-resume/flake.nix
2026-08-30 18:51:51 -06:00

166 lines
5 KiB
Nix

# SPDX-FileCopyrightText: 2025-2026 Ethan Reece <contact@ethanreece.com>
#
# SPDX-License-Identifier: MIT
{
description = "Résumé";
inputs = {
devenv = {
url = "github:cachix/devenv";
inputs = {
flake-parts.follows = "flake-parts";
git-hooks.follows = "git-hooks-nix";
nixd.follows = "nixd";
nixpkgs.follows = "nixpkgs";
};
};
flake-manager = {
url = "git+https://codeberg.org/ethanreece/flake-manager.git?ref=main";
flake = true;
inputs = {
devenv.follows = "devenv";
flake-parts.follows = "flake-parts";
git-hooks-nix.follows = "git-hooks-nix";
lix.follows = "lix";
lix-module.follows = "lix-module";
nixd.follows = "nixd";
nixgl.follows = "nixgl";
nixpkgs.follows = "nixpkgs";
nixpkgs-master.follows = "nixpkgs-master";
treefmt-nix.follows = "treefmt-nix";
};
};
devshell.url = "github:numtide/devshell";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
git-hooks-nix.url = "github:cachix/git-hooks.nix";
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs = {
nixpkgs.follows = "nixpkgs";
lix.follows = "lix";
};
};
nixd = {
url = "github:nix-community/nixd";
inputs = {
flake-parts.follows = "flake-parts";
nixpkgs.follows = "nixpkgs";
};
};
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } (
{ ... }: {
systems = [
"aarch64-linux"
"x86_64-linux"
];
imports = [
inputs.flake-manager.flakeModule
(inputs.flake-manager.lib.importModule {
specialArgs = { inherit inputs; };
file = ./resumes;
})
];
perSystem =
{
config,
lib,
pkgs,
...
}:
{
devenv.shells = lib.genAttrs config.flake-manager.shells (name: {
flake-manager = {
formatters.enable = true;
git-hooks.enable = true;
network = {
allowFirstParty = true;
allowThirdParty = true;
};
reuse.enable = true;
};
editors = {
helix.enable = true;
opencode.enable = true;
};
languages = {
bash.enable = true;
en-us = {
enable = true;
dictionary = (fromTOML (builtins.readFile ./dictionary.toml)).dictionary;
};
git-commit.enable = true;
json.enable = true;
markdown.enable = true;
nix.enable = true;
toml.enable = true;
yaml.enable = true;
typst = {
enable = true;
package = pkgs.typst.withPackages (
ps: with ps; [
cmarker
fontawesome
linguify
]
);
fonts = [
pkgs.font-awesome
pkgs.inter
pkgs.jetbrains-mono
];
args = [
"--input=lang=en"
"--input=region=US"
];
useHtmlPreview = false;
useAccessiblePdf = true;
forceLightBackground = false;
};
};
language-servers = {
vale-ls.settings.perGlob = {
"**/README.md".packages = {
alex.enable = true;
Joblint.enable = true;
proselint.enable = true;
RedHat.enable = true;
write-good.enable = true;
};
};
};
treefmt.config.programs.taplo.settings = {
formatting = {
reorder_arrays = true;
reorder_keys = true;
};
};
git-hooks.hooks.markdownlint.settings.configuration = {
"MD024" = false; # Disable `no-duplicate-heading`
};
agents = inputs.flake-manager.lib.importModuleFilesAttrs {
path = ./agents;
specialArgs = { inherit pkgs; };
};
});
};
}
);
}