Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
edulix authored Jul 23, 2023
1 parent d34c45e commit a4ae6d9
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 15 deletions.
12 changes: 0 additions & 12 deletions .devcontainer.json

This file was deleted.

40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "backend-services",
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"forwardPorts": [],
"workspaceFolder": "/workspace",

"userEnvProbe": "loginShell",
"updateRemoteUserUID": false,

"updateContentCommand": "devenv ci",

"customizations": {
"vscode": {
"extensions": [
// run commands on save
// https://marketplace.visualstudio.com/items?itemName=fsevenm.run-it-on
"fsevenm.run-it-on",

// Docker for Visual Studio Code
"ms-azuretools.vscode-docker",

// direnv support
"mkhl.direnv",

// Nix language support
"jnoortheen.nix-ide",

// Markdown support and previsualization
"yzhang.markdown-all-in-one",

// Debugging
"vadimcn.vscode-lldb",

// Allows to use Alt+Q (or Option+Q in mac) to rewrap lines
"stkb.rewrap"
]
}
}
}
12 changes: 12 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3.6"
services:
dev:
image: ghcr.io/cachix/devenv:latest
volumes:
- ../../:/workspaces:cached
- /var/run/docker.sock:/var/run/docker-host.sock
# Required for ptrace-based debuggers like C++, Go, and Rust
cap_add:
- SYS_PTRACE
security_opt:
- label:disable
59 changes: 56 additions & 3 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@
}
},
"flake-utils": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
Expand All @@ -66,7 +81,7 @@
"type": "indirect"
}
},
"flake-utils_2": {
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
Expand Down Expand Up @@ -105,6 +120,42 @@
"type": "github"
}
},
"mk-shell-bin": {
"locked": {
"lastModified": 1677004959,
"narHash": "sha256-/uEkr1UkJrh11vD02aqufCxtbF5YnhRTIKlx5kyvf+I=",
"owner": "rrbutani",
"repo": "nix-mk-shell-bin",
"rev": "ff5d8bd4d68a347be5042e2f16caee391cd75887",
"type": "github"
},
"original": {
"owner": "rrbutani",
"repo": "nix-mk-shell-bin",
"type": "github"
}
},
"nix2container": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1688922987,
"narHash": "sha256-RnQwrCD5anqWfyDAVbfFIeU+Ha6cwt5QcIwIkaGRzQw=",
"owner": "nlewo",
"repo": "nix2container",
"rev": "ab381a7d714ebf96a83882264245dbd34f0a7ec8",
"type": "github"
},
"original": {
"owner": "nlewo",
"repo": "nix2container",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1689935543,
Expand All @@ -124,7 +175,7 @@
"nixpkgs-python": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
Expand Down Expand Up @@ -176,7 +227,7 @@
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
Expand All @@ -200,6 +251,8 @@
"root": {
"inputs": {
"devenv": "devenv",
"mk-shell-bin": "mk-shell-bin",
"nix2container": "nix2container",
"nixpkgs": "nixpkgs",
"nixpkgs-python": "nixpkgs-python",
"pre-commit-hooks": "pre-commit-hooks"
Expand Down
3 changes: 3 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
pkgs.git
pkgs.ack

# to create containers
pkgs.docker

# used for building uwsgi:
pkgs.gcc
pkgs.libffi
Expand Down
7 changes: 7 additions & 0 deletions devenv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ inputs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
nixpkgs-python:
url: github:cachix/nixpkgs-python
nix2container:
url: github:nlewo/nix2container
inputs:
nixpkgs:
follows: nixpkgs
mk-shell-bin:
url: github:rrbutani/nix-mk-shell-bin

0 comments on commit a4ae6d9

Please sign in to comment.