Skip to content

Commit

Permalink
refactor: use flake instead of devbox (#45)
Browse files Browse the repository at this point in the history
* refactor: remove devbox

* chore: remove rust-toolchain

* chore: init devenv

* fix(devenv): fix typo

* fix(devenv): set root

* fix(devenv): fix imports

* fix(ci): add rust-toolchain

* fix(devenv): add fenix

* fix: use nightly rust
  • Loading branch information
kwaa committed Jun 8, 2024
1 parent 289f7f4 commit 7d49aef
Show file tree
Hide file tree
Showing 8 changed files with 572 additions and 225 deletions.
8 changes: 1 addition & 7 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# Automatically sets up your devbox environment whenever you cd into this
# directory via our direnv integration:

eval "$(devbox generate direnv --print-envrc)"

# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/
# for more details
use flake . --override-input devenv-root "file+file://"<(printf %s "$PWD")
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ target/
# mdBook
docs/book

# devbox
.devbox
# direnv / devenv
.direnv
.devenv
29 changes: 0 additions & 29 deletions devbox.json

This file was deleted.

184 changes: 0 additions & 184 deletions devbox.lock

This file was deleted.

32 changes: 32 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# https://devenv.sh/basics/
{ lib, pkgs, ... }:
let rust_toolchain = lib.importTOML ./rust-toolchain.toml;
in {
name = "hatsu";

# https://devenv.sh/languages/
languages.rust = {
enable = true;
channel = rust_toolchain.toolchain.channel;
components = rust_toolchain.toolchain.components;
};

imports = [
# This is just like the imports in devenv.nix.
# See https://devenv.sh/guides/using-with-flake-parts/#import-a-devenv-module
# ./devenv-foo.nix
];

# https://devenv.sh/packages/
packages = with pkgs; [
# cargo-*
cargo-watch

mold
sccache
];

# enterShell = ''
# hello
# '';
}
Loading

0 comments on commit 7d49aef

Please sign in to comment.