feat: scaffold Nix flake with dotnet-sdk_9, typst, and nodejs

- devShells.default provides dotnetCorePackages.sdk_9_0, typst, nodejs
- packages.default uses buildDotnetModule with net9.0 target via callPackage
- Stub plugin/ project with minimal .csproj
- .gitignore with .NET/Nix build artifacts
This commit is contained in:
Scott Scoble 2026-05-15 21:16:35 -07:00
parent 462db42a18
commit d94b71d0a1
5 changed files with 121 additions and 0 deletions

14
.gitignore vendored Normal file
View file

@ -0,0 +1,14 @@
# .NET build artifacts
bin/
obj/
*.dll
# Nix
.result/
result
# IDE
.vs/
.vscode/
*.user
*.suo

1
deps.json Normal file
View file

@ -0,0 +1 @@
[]

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1778443072,
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

72
flake.nix Normal file
View file

@ -0,0 +1,72 @@
{
description = "Jellyfin Lessons — a Jellyfin plugin";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
forAllSystems =
fn: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed fn;
in
{
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
packages = [
pkgs.dotnetCorePackages.sdk_9_0
pkgs.typst
pkgs.nodejs
];
shellHook = ''
echo "jellyfin-lessons dev shell"
echo " dotnet: $(dotnet --version)"
echo " typst: $(typst --version)"
echo " node: $(node --version)"
'';
};
}
);
packages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.callPackage (
{
buildDotnetModule,
dotnetCorePackages,
lib,
}:
buildDotnetModule {
pname = "jellyfin-lessons";
version = "0.1.0";
src = self;
projectFile = "plugin/jellyfin-lessons.csproj";
nugetDeps = ./deps.json;
dotnet-sdk = dotnetCorePackages.sdk_9_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_9_0;
meta = {
description = "Jellyfin Lessons plugin";
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}
) { };
}
);
};
}

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>JellyfinLessons</RootNamespace>
<AssemblyName>jellyfin-lessons</AssemblyName>
</PropertyGroup>
</Project>