Compare commits
6 Commits
f5f1be1e52
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 0bfd4cfbd8 | |||
| b0ec23c2c6 | |||
| 79ccd11b5b | |||
| c5e728ff50 | |||
| 274f92ef10 | |||
| fd7f8e7748 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
flake.lock
|
||||
9
README.md
Normal file
9
README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Flakes for stuff idk
|
||||
Pull using following command:
|
||||
```
|
||||
nix flake init -t "git+https://git.voidarc.co.uk/voidarc/flakes#module"
|
||||
```
|
||||
or if you've added the registry then
|
||||
```
|
||||
nix flake init -t voidarc#module
|
||||
```
|
||||
41
bun/flake.nix
Normal file
41
bun/flake.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
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-bunshell";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
bun
|
||||
];
|
||||
|
||||
# Environment variables
|
||||
shellHook = ''
|
||||
export DEVSHELL_NAME=" flake/#89dceb| Bun/yellow"
|
||||
|
||||
# Trigger zsh
|
||||
if [[ -z "$ZSH_VERSION" ]]; then
|
||||
exec zsh
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1,14 +1,19 @@
|
||||
{
|
||||
description = "A very basic flake";
|
||||
description = "Provides nix flakes for development";
|
||||
|
||||
outputs =
|
||||
{ self }:
|
||||
{
|
||||
templates = {
|
||||
|
||||
rust = {
|
||||
path = ./rust-template;
|
||||
path = ./rust;
|
||||
description = "A standard Rust development environment";
|
||||
};
|
||||
bun = {
|
||||
path = ./bun;
|
||||
description = "Flake for making a bun project";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
|
||||
name = "rustshell";
|
||||
name = "flake-rustshell";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
# Rust toolchain
|
||||
@@ -37,13 +37,15 @@
|
||||
|
||||
# Environment variables
|
||||
shellHook = ''
|
||||
export RUST_BACKTRACE=1
|
||||
export RUST_BACKTRACE=1
|
||||
export DEVSHELL_NAME=" flake/#89dceb|🦀 rustproject/red"
|
||||
|
||||
|
||||
# Trigger zsh if not already in it
|
||||
if [[ -z "$ZSH_VERSION" ]]; then
|
||||
exec zsh
|
||||
fi
|
||||
'';
|
||||
if [[ -z "$ZSH_VERSION" ]]; then
|
||||
exec zsh
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
41
shell/flake.nix
Normal file
41
shell/flake.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
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 = ''
|
||||
export DEVSHELL_NAME=" flake/#89dceb"
|
||||
|
||||
# Trigger zsh
|
||||
if [[ -z "$ZSH_VERSION" ]]; then
|
||||
exec zsh
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user