Compare commits

...

4 commits

9 changed files with 41 additions and 62 deletions

View file

@ -1 +0,0 @@
FROM ghcr.io/xtruder/nix-devcontainer:v1

View file

@ -1,59 +0,0 @@
// 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
.devenv/load-exports Executable file
View file

@ -0,0 +1 @@

1
.devenv/profile Symbolic link
View file

@ -0,0 +1 @@
/nix/store/5fgszmb12p6sq9k1623mqa1n0xsannam-devenv-profile

1
.devenv/run Symbolic link
View file

@ -0,0 +1 @@
/tmp/devenv-37d6f11

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake . --no-pure-eval

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.devenv
.direnv

View file

@ -1,9 +1,42 @@
{ pkgs, ... }:
{
packages = with pkgs; [
nix-direnv
gnupg
git
bitwarden-cli
];
env.GPG_TTY = "\$(tty)";
scripts.download_gpg_key.exec = # bash
''
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
'';
}

View file

@ -2,7 +2,7 @@
{
languages.nix.enable = true;
packages = [
packages = with pkgs; [
nixfmt-rfc-style
];
}