diff --git a/flake.lock b/flake.lock index 81fd5fe..447ae39 100644 --- a/flake.lock +++ b/flake.lock @@ -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" diff --git a/flake.nix b/flake.nix index 187987e..35c7818 100644 --- a/flake.nix +++ b/flake.nix @@ -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 " -l MIT -y 2025 devshell = { motd = '' diff --git a/lang.toml b/lang.toml new file mode 100644 index 0000000..a9f5c68 --- /dev/null +++ b/lang.toml @@ -0,0 +1,9 @@ +# SPDX-FileCopyrightText: 2025 Ethan Reece +# +# SPDX-License-Identifier: MIT + +[conf] +default-lang = "en" + +[lang.en] +content = "main.en_US.md" diff --git a/main.en_US.md b/main.en_US.md new file mode 100644 index 0000000..8fe3c3c --- /dev/null +++ b/main.en_US.md @@ -0,0 +1,7 @@ + + +# Hello world diff --git a/main.typ b/main.typ new file mode 100644 index 0000000..82f5c40 --- /dev/null +++ b/main.typ @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: 2025 Ethan Reece +// +// 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)) +} diff --git a/typst.toml b/typst.toml new file mode 100644 index 0000000..ec95c29 --- /dev/null +++ b/typst.toml @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: 2025 Ethan Reece +# +# 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 "] +license = "MIT" +description = "📝 Template for Typst projects, with grammar and code checking integrations." +keywords = ["template", "nix", "lsp", "helix"] +categories = ["utility"]