Compare commits
3 Commits
f5f1be1e52
...
c5e728ff50
| Author | SHA1 | Date | |
|---|---|---|---|
| c5e728ff50 | |||
| 274f92ef10 | |||
| fd7f8e7748 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
flake.lock
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
{
|
{
|
||||||
description = "A very basic flake";
|
description = "Provides nix flakes for development";
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self }:
|
{ self }:
|
||||||
{
|
{
|
||||||
templates = {
|
templates = {
|
||||||
|
|
||||||
rust = {
|
rust = {
|
||||||
path = ./rust-template;
|
path = ./rust;
|
||||||
description = "A standard Rust development environment";
|
description = "A standard Rust development environment";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
|
|
||||||
name = "rustshell";
|
name = "flake-rustshell";
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
# Rust toolchain
|
# Rust toolchain
|
||||||
39
shell/flake.nix
Normal file
39
shell/flake.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
description = "A simple Rust development environment";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
utils,
|
||||||
|
}:
|
||||||
|
utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
|
||||||
|
name = "flake";
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
# Add packages
|
||||||
|
];
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
shellHook = ''
|
||||||
|
# Trigger zsh
|
||||||
|
if [[ -z "$ZSH_VERSION" ]]; then
|
||||||
|
exec zsh
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user