dendrify: comfy-station

This commit is contained in:
2026-03-27 17:49:01 +01:00
parent 5ca75f28db
commit 88b3ff784a
205 changed files with 4036 additions and 1227 deletions

1
old/templates/cmake-c/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
build

View File

@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.15)
project(Hello
DESCRIPTION "Hello World"
LANGUAGES C
)
add_executable(hello src/main.c)
install(TARGETS hello)

View File

@@ -0,0 +1,56 @@
{
description = "Cmake C Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs @ {
self,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} (
top: {
imports = [];
flake = {
overlays.default = final: prev: {
my-derivation = final.callPackage ./nix/derivation.nix {};
};
};
systems = [
"x86_64-linux"
];
perSystem = {
self',
pkgs,
system,
...
}: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [self.overlays.default];
};
packages.default = pkgs.my-derivation;
devShells.default = pkgs.mkShell {
packages = [
pkgs.cmake-language-server
pkgs.cmake-format
pkgs.clang-tools
pkgs.gdb
];
inputsFrom = [self'.packages.default];
shellHook = ''
export CMAKE_EXPORT_COMPILE_COMMANDS=ON
'';
};
};
}
);
}

View File

@@ -0,0 +1,17 @@
{
cmake,
stdenv,
...
}:
stdenv.mkDerivation (finalAttrs: {
pname = "my-derivation";
version = "0.1.0";
src = ../.;
nativeBuildInputs = [cmake];
buildInputs = [];
meta = {
description = "Hello World Binary";
mainProgram = "hello";
};
})

View File

@@ -0,0 +1,6 @@
#include <stdio.h>
int main() {
puts("Hello, Flake!");
return 0;
}

17
old/templates/rust/.envrc Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# ^ make editor happy
#
# Use https://direnv.net/ to automatically load the dev shell.
#
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi
watch_file nix/**
watch_file -- **/*.nix
# Adding files to git includes them in a flake
# But it is also a bit much reloading.
# watch_file .git/index .git/HEAD
use flake . --show-trace

3
old/templates/rust/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
.direnv/
target/
result/

View File

@@ -0,0 +1,11 @@
[package]
name = "hello"
description = "A test rust binary"
publish = false
version = "0.1.0"
edition = "2021"
[[bin]]
name = "hello"
path = "src/main.rs"

View File

@@ -0,0 +1,61 @@
{
description = "Rust-Hello";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
crate2nix = {
url = "github:nix-community/crate2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
crate2nix,
flake-utils,
nixpkgs,
rust-overlay,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
# Overlay pkgs with rust-bin
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
# Use rust-bin to generate the toolchain from rust-toolchain.toml
rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
buildRustCrateForPkgs = _:
pkgs.buildRustCrate.override {
rustc = rust-toolchain; # Use rustc from toolchain
cargo = rust-toolchain; # Use cargo from toolchain
};
# Cargo.nix for IFD
generatedCargoNix = crate2nix.tools.${system}.generatedCargoNix {
name = "rustnix";
src = ./.;
};
cargoNix = import generatedCargoNix {
inherit pkgs buildRustCrateForPkgs;
};
in {
packages = rec {
hello = cargoNix.rootCrate.build;
default = hello;
};
devShell = pkgs.mkShell {
buildInputs = [rust-toolchain];
};
}
);
}

View File

@@ -0,0 +1,3 @@
[toolchain]
channel = "1.85.0"
components = [ "rustfmt", "rustc-dev", "rust-analyzer", "rust-src"]

View File

@@ -0,0 +1,3 @@
fn main() {
println!("{}", "Hello, world!");
}