From fbaed7851b6380b762fff27225b7b8e35bf843eb Mon Sep 17 00:00:00 2001 From: Reed Krantz Date: Sun, 26 Apr 2026 18:40:32 -0500 Subject: [PATCH] refactor: new directory structure where the flake module lives in a directory with the template in a subdirectory --- flake.nix | 2 +- rust.nix => rust/default.nix | 2 +- rust/{ => template}/.envrc | 0 rust/{ => template}/.gitea/workflows/flake-update.yaml | 0 rust/{ => template}/.gitignore | 0 rust/{ => template}/Cargo.toml | 0 rust/{ => template}/flake.nix | 0 rust/{ => template}/src/args.rs | 0 rust/{ => template}/src/config.rs | 0 rust/{ => template}/src/error.rs | 0 rust/{ => template}/src/main.rs | 0 11 files changed, 2 insertions(+), 2 deletions(-) rename rust.nix => rust/default.nix (99%) rename rust/{ => template}/.envrc (100%) rename rust/{ => template}/.gitea/workflows/flake-update.yaml (100%) rename rust/{ => template}/.gitignore (100%) rename rust/{ => template}/Cargo.toml (100%) rename rust/{ => template}/flake.nix (100%) rename rust/{ => template}/src/args.rs (100%) rename rust/{ => template}/src/config.rs (100%) rename rust/{ => template}/src/error.rs (100%) rename rust/{ => template}/src/main.rs (100%) diff --git a/flake.nix b/flake.nix index b11d083..7c82bc6 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ outputs = {flake-parts, ...} @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { imports = [ - ./rust.nix + ./rust ]; systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"]; diff --git a/rust.nix b/rust/default.nix similarity index 99% rename from rust.nix rename to rust/default.nix index b3ae7b7..07084cc 100644 --- a/rust.nix +++ b/rust/default.nix @@ -6,7 +6,7 @@ flake = { templates = { rust = { - path = ./rust; + path = ./template; description = "A rust flake with crane and templates for command args and configs"; }; }; diff --git a/rust/.envrc b/rust/template/.envrc similarity index 100% rename from rust/.envrc rename to rust/template/.envrc diff --git a/rust/.gitea/workflows/flake-update.yaml b/rust/template/.gitea/workflows/flake-update.yaml similarity index 100% rename from rust/.gitea/workflows/flake-update.yaml rename to rust/template/.gitea/workflows/flake-update.yaml diff --git a/rust/.gitignore b/rust/template/.gitignore similarity index 100% rename from rust/.gitignore rename to rust/template/.gitignore diff --git a/rust/Cargo.toml b/rust/template/Cargo.toml similarity index 100% rename from rust/Cargo.toml rename to rust/template/Cargo.toml diff --git a/rust/flake.nix b/rust/template/flake.nix similarity index 100% rename from rust/flake.nix rename to rust/template/flake.nix diff --git a/rust/src/args.rs b/rust/template/src/args.rs similarity index 100% rename from rust/src/args.rs rename to rust/template/src/args.rs diff --git a/rust/src/config.rs b/rust/template/src/config.rs similarity index 100% rename from rust/src/config.rs rename to rust/template/src/config.rs diff --git a/rust/src/error.rs b/rust/template/src/error.rs similarity index 100% rename from rust/src/error.rs rename to rust/template/src/error.rs diff --git a/rust/src/main.rs b/rust/template/src/main.rs similarity index 100% rename from rust/src/main.rs rename to rust/template/src/main.rs