Compare commits
No commits in common. "5f36ae60e54ca3db9528531c6b8e1622fec02750" and "b2e9ecabb4cc52b5776f7c4afe3d07f8b6177d62" have entirely different histories.
5f36ae60e5
...
b2e9ecabb4
9 changed files with 62 additions and 41 deletions
1
.devcontainer/Dockerfile
Normal file
1
.devcontainer/Dockerfile
Normal file
|
@ -0,0 +1 @@
|
||||||
|
FROM ghcr.io/xtruder/nix-devcontainer:v1
|
59
.devcontainer/devcontainer.json
Normal file
59
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
// 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": "MarleyOS",
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile",
|
||||||
|
"context": "${localWorkspaceFolder}",
|
||||||
|
"args": {
|
||||||
|
"USER_UID": "${localEnv:USER_UID}",
|
||||||
|
"USER_GID": "${localEnv:USER_GID}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// run arguments passed to docker
|
||||||
|
"runArgs": [
|
||||||
|
"--security-opt", "label=disable"
|
||||||
|
],
|
||||||
|
|
||||||
|
"containerEnv": {
|
||||||
|
// extensions to preload before other extensions
|
||||||
|
"PRELOAD_EXTENSIONS": "arrterian.nix-env-selector"
|
||||||
|
},
|
||||||
|
|
||||||
|
// disable command overriding and updating remote user ID
|
||||||
|
"overrideCommand": false,
|
||||||
|
"userEnvProbe": "loginShell",
|
||||||
|
"updateRemoteUserUID": false,
|
||||||
|
|
||||||
|
// build development environment on creation, make sure you already have shell.nix
|
||||||
|
"onCreateCommand": "nix develop",
|
||||||
|
|
||||||
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
// select nix environment
|
||||||
|
"arrterian.nix-env-selector",
|
||||||
|
|
||||||
|
// extra extensions
|
||||||
|
//"fsevenm.run-it-on",
|
||||||
|
"jnoortheen.nix-ide",
|
||||||
|
|
||||||
|
// theme
|
||||||
|
"mvllow.rose-pine"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"workbench.colorTheme": "Rosé Pine Dawn",
|
||||||
|
"editor.fontFamily": "'Maple Mono', Consolas, 'Courier New', monospace",
|
||||||
|
"editor.fontLigatures": "'cv02, ss01, ss02, ss03, ss04, ss05'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
"forwardPorts": []
|
||||||
|
|
||||||
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
|
// "postCreateCommand": "go version",
|
||||||
|
}
|
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
/nix/store/5fgszmb12p6sq9k1623mqa1n0xsannam-devenv-profile
|
|
|
@ -1 +0,0 @@
|
||||||
/tmp/devenv-37d6f11
|
|
1
.envrc
1
.envrc
|
@ -1 +0,0 @@
|
||||||
use flake . --no-pure-eval
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
.devenv
|
|
||||||
.direnv
|
|
|
@ -1,42 +1,9 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
nix-direnv
|
|
||||||
gnupg
|
gnupg
|
||||||
git
|
git
|
||||||
bitwarden-cli
|
|
||||||
];
|
];
|
||||||
|
|
||||||
scripts.download_gpg_key.exec = # bash
|
env.GPG_TTY = "\$(tty)";
|
||||||
''
|
|
||||||
if ! bw login --check; then
|
|
||||||
echo "Please run `bw login`"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
bw sync && \
|
|
||||||
bw get attachment private.key --itemid 335ce92f-974a-44d4-bc1c-b226005203f3 --output private.key && \
|
|
||||||
echo "Please run `set_gpg_tty && import_gpg_key`"
|
|
||||||
'';
|
|
||||||
|
|
||||||
scripts.set_gpg_tty.exec = # bash
|
|
||||||
''
|
|
||||||
export GPG_TTY="$(tty)"
|
|
||||||
'';
|
|
||||||
|
|
||||||
scripts.import_gpg_key.exec = # bash
|
|
||||||
''
|
|
||||||
exec gpg --import private.key
|
|
||||||
'';
|
|
||||||
|
|
||||||
scripts.gpg_no_pinentry.exec = # bash
|
|
||||||
''
|
|
||||||
pkill gpg-agent
|
|
||||||
gpg-agent --pinentry-program=/usr/bin/pinentry-curses --daemon
|
|
||||||
'';
|
|
||||||
|
|
||||||
scripts.git_allow_push.exec = # bash
|
|
||||||
''
|
|
||||||
git config http.version HTTP/1.1
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
languages.nix.enable = true;
|
languages.nix.enable = true;
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = [
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue