-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
template example from "Getting Started" documentation
A working example project put together from https://numtide.github.io/devshell/getting_started.html
- Loading branch information
1 parent
c80beef
commit bcc2b24
Showing
11 changed files
with
1,110 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
/dist | ||
|
||
# direnv | ||
/.direnv | ||
/.direnv |
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
# ^ added for shellcheck and file-type detection | ||
|
||
# Watch & reload direnv on change | ||
watch_file devshell.toml | ||
|
||
if [[ $(type -t use_flake) != function ]]; then | ||
echo "ERROR: use_flake function missing." | ||
echo "Please update direnv to v2.30.0 or later." | ||
exit 1 | ||
fi | ||
use flake |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/.direnv/ | ||
/pgdata/* | ||
!/pgdata/postgresql.conf | ||
!/pgdata/PG_VERSION |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# https://numtide.github.io/devshell | ||
# https://numtide.github.io/devshell/getting_started.html | ||
[[commands]] | ||
package = "hello" | ||
|
||
[[commands]] | ||
package = "go" | ||
|
||
[[commands]] | ||
package = "nodejs_20" | ||
|
||
[[commands]] | ||
package = "python311" | ||
|
||
[[env]] | ||
name = "GO111MODULE" | ||
value = "on" | ||
|
||
[devshell] | ||
packages = [ | ||
"postgresql_15", | ||
"memcached", | ||
] | ||
|
||
[serviceGroups.database] | ||
description = "Runs a database in the backgroup" | ||
[serviceGroups.database.services.postgres] | ||
command = "postgres -D ./pgdata" | ||
[serviceGroups.database.services.memcached] | ||
command = "memcached" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
description = "getting started example"; | ||
|
||
inputs.devshell.url = "github:numtide/devshell"; | ||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
|
||
outputs = { self, flake-utils, devshell, nixpkgs }: | ||
flake-utils.lib.eachDefaultSystem (system: { | ||
devShell = | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
|
||
overlays = [ devshell.overlays.default ]; | ||
}; | ||
in | ||
pkgs.devshell.mkShell { | ||
imports = [ (pkgs.devshell.importTOML ./devshell.toml) ]; | ||
}; | ||
}); | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
15 |
Oops, something went wrong.