-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
180 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-FileCopyrightText: 2022 X-Truder <jaka@x-truder.net> | ||
# SPDX-FileCopyrightText: 2022 Félix Robles <felix@sequentech.io> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Reuse a base image made for devcontainers. | ||
FROM ghcr.io/xtruder/nix-devcontainer:v1 | ||
|
||
# cache /nix | ||
VOLUME /nix |
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,47 @@ | ||
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at | ||
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/docker-existing-dockerfile | ||
{ | ||
"name": "strand-project", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "dev", | ||
"workspaceFolder": "/workspace", | ||
"forwardPorts": [3000], | ||
|
||
"userEnvProbe": "loginShell", | ||
"updateRemoteUserUID": false, | ||
|
||
// build development environment on creation | ||
"onCreateCommand": "nix develop --command bash -c 'nix build -vvv -L && cargo build --all-features && echo Environment Built' || true", | ||
"updateContentCommand": "nix develop --command bash -c 'nix build -vvv -L && cargo build --all-features && echo Environment Built' || true", | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"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", | ||
|
||
// select nix environment | ||
"arrterian.nix-env-selector", | ||
|
||
// Nix language support | ||
"jnoortheen.nix-ide", | ||
|
||
// Rust language support | ||
"rust-lang.rust-analyzer", | ||
|
||
// Markdown support and previsualization | ||
"yzhang.markdown-all-in-one", | ||
|
||
// Toml support | ||
"tamasfe.even-better-toml", | ||
|
||
// Debugging | ||
"vadimcn.vscode-lldb", | ||
|
||
// Allows to use Alt+Q (or Option+Q in mac) to rewrap lines | ||
"stkb.rewrap" | ||
] | ||
} |
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,22 @@ | ||
# SPDX-FileCopyrightText: 2022 Felix Robles <felix@sequentech.io> | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
version: '3' | ||
services: | ||
dev: | ||
build: | ||
context: ../ | ||
dockerfile: .devcontainer/Dockerfile | ||
args: | ||
PRELOAD_EXTENSIONS: arrterian.nix-env-selector | ||
USER_UID: ${USER_UID:-1000} | ||
USER_GID: ${USER_GID:-1000} | ||
command: sleep infinity | ||
volumes: | ||
- ..:/workspace:cached | ||
- nix:/nix | ||
security_opt: | ||
- label:disable | ||
network_mode: "bridge" | ||
|
||
volumes: | ||
nix: |
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,34 @@ | ||
# SPDX-FileCopyrightText: 2022 X-Truder <jaka@x-truder.net> | ||
# SPDX-FileCopyrightText: 2022 Félix Robles <felix@sequentech.io> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
# System-wide .bashrc file for interactive bash(1) shells. | ||
|
||
# To enable the settings / commands in this file for login shells as well, | ||
# this file has to be sourced in /etc/profile. | ||
|
||
[[ $ENVRC_RUN != yes ]] && source /etc/envrc | ||
|
||
# If not running interactively, don't do anything | ||
[ -z "$PS1" ] && return | ||
|
||
# check the window size after each command and, if necessary, | ||
# update the values of LINES and COLUMNS. | ||
shopt -s checkwinsize | ||
|
||
# set variable identifying the chroot you work in (used in the prompt below) | ||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | ||
debian_chroot=$(cat /etc/debian_chroot) | ||
fi | ||
|
||
# set a fancy prompt (non-color, overwrite the one in /etc/profile) | ||
# but only if not SUDOing and have SUDO_PS1 set; then assume smart user. | ||
if ! [ -n "${SUDO_USER}" -a -n "${SUDO_PS1}" ]; then | ||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | ||
fi | ||
|
||
# load direnv hook if not running as root | ||
if ! [ $(id -u) = 0 ]; then | ||
eval "$(direnv hook bash)" | ||
fi |
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 @@ | ||
|
||
#!/bin/bash | ||
|
||
[[ $ENVRC_RUN != yes ]] && source /etc/envrc |
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 @@ | ||
SPDX-FileCopyrightText: 2022 X-Truder <jaka@x-truder.net> | ||
SPDX-FileCopyrightText: 2022 Felix Robles <felix@sequentech.io> | ||
|
||
SPDX-License-Identifier: MIT |
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,18 @@ | ||
# SPDX-FileCopyrightText: 2022 X-Truder <jaka@x-truder.net> | ||
# SPDX-FileCopyrightText: 2022 Félix Robles <felix@sequentech.io> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
# direnv global config | ||
|
||
[global] | ||
|
||
# increase warn timeout to 30 minutes, as it can take | ||
# long time to load all nix dependencies | ||
warn_timeout = "30m" | ||
|
||
bash_path = "/bin/bash" | ||
|
||
# whitelist all paths, since we are running in container | ||
[whitelist] | ||
prefix = [ "/" ] |
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,19 @@ | ||
# SPDX-FileCopyrightText: 2022 X-Truder <jaka@x-truder.net> | ||
# SPDX-FileCopyrightText: 2022 Félix Robles <felix@sequentech.io> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
USER=$(whoami) | ||
|
||
# load nix into environment | ||
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ] ; then | ||
. $HOME/.nix-profile/etc/profile.d/nix.sh | ||
fi | ||
|
||
# add $HOME/.nix-profile/share to XDG_DATA_DIRS, so completions for packages | ||
# installed with nix work | ||
if [ -e $HOME/.nix-profile ] ; then | ||
XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.nix-profile/share" | ||
fi | ||
XDG_DATA_DIRS="$XDG_DATA_DIRS:/usr/share" | ||
|
||
ENVRC_RUN=yes |
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,6 @@ | ||
# SPDX-FileCopyrightText: 2022 X-Truder <jaka@x-truder.net> | ||
# SPDX-FileCopyrightText: 2022 Félix Robles <felix@sequentech.io> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
sandbox = false | ||
experimental-features = nix-command flakes |
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 @@ | ||
flake-profile-1-link |
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 @@ | ||
/nix/store/snnbrl8jbid207bw7nl442q1fmm6yyg0-nix-shell-env |
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 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for more information: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
# https://containers.dev/guide/dependabot | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "devcontainers" | ||
directory: "/" | ||
schedule: | ||
interval: weekly |
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 @@ | ||
/nix/store/5mnvqdlmk2f3a0liq4lbfahlx9d8gkpv-top200-rs-0.1.0 |