-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,50 @@ | ||
{ inputs, ... }: | ||
|
||
{ | ||
flake.templates.default = { | ||
description = "A batteries-included Rust project template for Nix"; | ||
path = builtins.path { path = inputs.self; }; | ||
flake = rec { | ||
templates.default = { | ||
description = "A batteries-included Rust project template for Nix"; | ||
path = builtins.path { path = inputs.self; }; | ||
}; | ||
|
||
# https://omnix.page/om/init.html#spec | ||
om.templates.rust-nix-template = { | ||
template = templates.default; | ||
params = [ | ||
{ | ||
name = "package-name"; | ||
description = "Name of the Rust package"; | ||
placeholder = "rust-nix-template"; | ||
} | ||
{ | ||
name = "author"; | ||
description = "Author name"; | ||
placeholder = "Sridhar Ratnakumar"; | ||
} | ||
{ | ||
name = "author-email"; | ||
description = "Author email"; | ||
placeholder = "[email protected]"; | ||
} | ||
{ | ||
name = "vscode"; | ||
description = "Include the VSCode settings folder (./.vscode)"; | ||
paths = [ ".vscode" ]; | ||
value = true; | ||
} | ||
{ | ||
name = "github-ci"; | ||
description = "Include GitHub Actions workflow configuration"; | ||
paths = [ ".github" ]; | ||
value = true; | ||
} | ||
{ | ||
name = "nix-template"; | ||
description = "Keep the flake template in the project"; | ||
paths = [ "**/template.nix" ]; | ||
value = false; | ||
} | ||
]; | ||
}; | ||
}; | ||
} |