Skip to content

Commit

Permalink
feat: Support generating containers using devenv.
Browse files Browse the repository at this point in the history
  • Loading branch information
shahinism committed Jul 19, 2024
1 parent 697cf33 commit 1c6a918
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 86 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ decision and help us to improve them.

### Detailed Features

| Feature | Python | Node.js | Go | Rust |
|-------------------------|--------|---------|----|------|
| dotenv |||||
| difftastic |||||
| devcontainer |||||
| Yaml Lint |||||
| Type Check |||||
| Pre Commit Hooks |||||
| Language Server |||||
| Editor Config |||||
| Documentation Generator |||||
| CI/CD |||||
| Feature | Python | Node.js | Go | Rust |
|-------------------------|--------|---------|-----|------|
| dotenv |||||
| difftastic |||||
| devcontainer |||||
| Yaml Lint |||||
| Type Check ||| N/A | N/A |
| Pre Commit Hooks |||||
| Language Server |||||
| Editor Config |||||
| Documentation Generator |||||
| CI/CD |||||
| Generate Containers |||||

## How to Use

Expand Down
71 changes: 71 additions & 0 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"treeHash": "bd263f021e345cb4a39d80c126ab650bebc3c10c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
Expand All @@ -54,6 +72,42 @@
"type": "github"
}
},
"mk-shell-bin": {
"locked": {
"lastModified": 1677004959,
"owner": "rrbutani",
"repo": "nix-mk-shell-bin",
"rev": "ff5d8bd4d68a347be5042e2f16caee391cd75887",
"treeHash": "496327dabdc787353a29987f492dd4939151baad",
"type": "github"
},
"original": {
"owner": "rrbutani",
"repo": "nix-mk-shell-bin",
"type": "github"
}
},
"nix2container": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1720642556,
"owner": "nlewo",
"repo": "nix2container",
"rev": "3853e5caf9ad24103b13aa6e0e8bcebb47649fe4",
"treeHash": "a9c2f1d3f52f288515ca0fb11f9aed970fd869b6",
"type": "github"
},
"original": {
"owner": "nlewo",
"repo": "nix2container",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716977621,
Expand Down Expand Up @@ -112,9 +166,26 @@
"root": {
"inputs": {
"devenv": "devenv",
"mk-shell-bin": "mk-shell-bin",
"nix2container": "nix2container",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"treeHash": "cce81f2a0f0743b2eb61bc2eb6c7adbe2f2c6beb",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
Expand Down
2 changes: 2 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
}:

{
name = "inception";

# https://devenv.sh/packages/
packages = with pkgs; [
cargo
Expand Down
19 changes: 7 additions & 12 deletions devenv.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
nix2container:
url: github:nlewo/nix2container
inputs:
nixpkgs:
follows: nixpkgs
mk-shell-bin:
url: github:rrbutani/nix-mk-shell-bin
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling

# If you're using non-OSS software, you can set allowUnfree to true.
# allowUnfree: true

# If you're willing to use a package that's vulnerable
# permittedInsecurePackages:
# - "openssl-1.1.1w"

# If you have more than one devenv you can merge them
#imports:
# - ./backend
1 change: 1 addition & 0 deletions includes/base.nix.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

{% block variables %}{% endblock %}
{
name = "{{ project_name | replace('_', '-')}}";
# https://devenv.sh/basics/
env = {
GREET = "🛠️ Let's hack ";
Expand Down
10 changes: 10 additions & 0 deletions includes/devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
inputs:
nix2container:
url: github:nlewo/nix2container
inputs:
nixpkgs:
follows: nixpkgs
mk-shell-bin:
url: github:rrbutani/nix-mk-shell-bin
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include pathjoin("includes", "devenv.yaml") %}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include pathjoin("includes", "devenv.yaml") %}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include pathjoin("includes", "devenv.yaml") %}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include pathjoin("includes", "devenv.yaml") %}

0 comments on commit 1c6a918

Please sign in to comment.