1
0
Fork 0
generated from me/nix-flake-template

Add Typst files

This commit is contained in:
Ethan Reece 2025-07-20 01:29:34 -05:00
parent c1a2280817
commit 22be97d2f1
Signed by: me
GPG key ID: DD8CE04D5D8FF832
6 changed files with 142 additions and 5 deletions

66
flake.lock generated
View file

@ -48,6 +48,9 @@
"lix-module": [
"lix-module"
],
"nixgl": [
"nixgl"
],
"nixpkgs": [
"nixpkgs"
],
@ -56,11 +59,11 @@
]
},
"locked": {
"lastModified": 1752913092,
"narHash": "sha256-A7MEWj7yssLqBh9xd+YJa0o3/gKIefAhW3yM5FqBpbc=",
"lastModified": 1752992558,
"narHash": "sha256-f9B9GOLdB9XNpYE95b3o6IV9Mb+WvE6ObYSftFjVWFU=",
"ref": "main",
"rev": "76b61f33d847dbcf02f1b1f6cf12bc8b60ec70f3",
"revCount": 24,
"rev": "37e56d7320e29ab5522dc0b23c2d1e98c43504ec",
"revCount": 31,
"type": "git",
"url": "https://git.sudoer777.dev/me/nix-flake-base.git"
},
@ -108,6 +111,24 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
@ -199,6 +220,27 @@
"url": "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"
}
},
"nixgl": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1752054764,
"narHash": "sha256-Ob/HuUhANoDs+nvYqyTKrkcPXf4ZgXoqMTQoCK0RFgQ=",
"owner": "nix-community",
"repo": "nixGL",
"rev": "a8e1ce7d49a149ed70df676785b07f63288f53c5",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixGL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1722073938,
@ -270,6 +312,7 @@
"flake-parts": "flake-parts",
"git-hooks-nix": "git-hooks-nix",
"lix-module": "lix-module",
"nixgl": "nixgl",
"nixpkgs": "nixpkgs_3",
"treefmt-nix": "treefmt-nix"
}
@ -289,6 +332,21 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_4"

View file

@ -13,6 +13,7 @@
flake-parts.follows = "flake-parts";
git-hooks-nix.follows = "git-hooks-nix";
lix-module.follows = "lix-module";
nixgl.follows = "nixgl";
nixpkgs.follows = "nixpkgs";
treefmt-nix.follows = "treefmt-nix";
};
@ -28,6 +29,10 @@
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
@ -59,9 +64,21 @@
nix.enable = true;
toml.enable = true;
yaml.enable = true;
typst = {
enable = true;
entrypoint = "main.typ";
};
};
devshells.default = {
packages = [ pkgs.forgejo-cli ];
packages = [
pkgs.forgejo-cli
(pkgs.typst.withPackages (
ps: with ps; [
cmarker
linguify
]
))
];
# reuse annotate -c "Ethan Reece <contact@ethanreece.com>" -l MIT -y 2025
devshell = {
motd = ''

9
lang.toml Normal file
View file

@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
#
# SPDX-License-Identifier: MIT
[conf]
default-lang = "en"
[lang.en]
content = "main.en_US.md"

7
main.en_US.md Normal file
View file

@ -0,0 +1,7 @@
<!--
SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
SPDX-License-Identifier: MIT
-->
# Hello world

31
main.typ Normal file
View file

@ -0,0 +1,31 @@
// SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
//
// SPDX-License-Identifier: MIT
// https://typst.app/docs/
#{
import "@preview/cmarker:0.1.6"
import "@preview/linguify:0.4.2": linguify, set-database
let self = toml("typst.toml")
let lang-data = toml("lang.toml")
set-database(lang-data)
set document(
title: "Nix Flake Typst Template",
author: self.package.authors,
description: self.package.description,
keywords: self.package.keywords,
)
set page("us-letter")
set text(
lang: "en",
region: "US",
)
context cmarker.render(read(lang-data.lang.at(text.lang).content))
}

15
typst.toml Normal file
View file

@ -0,0 +1,15 @@
# SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
#
# SPDX-License-Identifier: MIT
[package]
name = "nix-flake-typst-template"
version = "0.1.0"
compiler = "0.13.1"
entrypoint = "main.typ"
repository = "https://git.sudoer777.dev/me/nix-flake-typst-template"
authors = ["Ethan Reece <contact@ethanreece.com>"]
license = "MIT"
description = "📝 Template for Typst projects, with grammar and code checking integrations."
keywords = ["template", "nix", "lsp", "helix"]
categories = ["utility"]