Skip to content

Commit ba3ff9b

Browse files
szlendMrChriss
andauthored
Add setup instructions (#61)
* Add setup instructions * Add shell.nix * Merge nix shell configs * Silence envrc errors --------- Co-authored-by: kristof_crnivec <kristof.crnivec@gmail.com>
1 parent a6958cc commit ba3ff9b

7 files changed

Lines changed: 104 additions & 0 deletions

File tree

.envrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
if nix flake metadata > /dev/null 2>&1; then
2+
use flake
3+
else
4+
use nix
5+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ notes.txt
1717
*.vi
1818
*~
1919
.sass-cache
20+
.bundle
2021

2122
# OS or Editor folders
2223
.DS_Store
@@ -33,3 +34,4 @@ node_modules
3334
*.sublime-project
3435
*.sublime-workspace
3536
.idea
37+
.bundler

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ GEM
222222
jekyll-seo-tag (~> 2.1)
223223
minitest (5.20.0)
224224
mutex_m (0.1.2)
225+
nokogiri (1.15.4-arm64-darwin)
226+
racc (~> 1.4)
225227
nokogiri (1.15.4-x86_64-darwin)
226228
racc (~> 1.4)
227229
octokit (4.25.1)
@@ -262,6 +264,7 @@ GEM
262264
webrick (1.8.1)
263265

264266
PLATFORMS
267+
arm64-darwin-22
265268
x86_64-darwin-22
266269

267270
DEPENDENCIES

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,14 @@
33
Source code for [Slovenia Ruby User Group](http://www.rug.si/) page. [Contributions welcome](CONTRIBUTING.md)!
44

55
Join us on Slack: [![Slovenia Ruby User Group Slack](http://slack.rug.si/badge.svg)](http://slack.rug.si/)
6+
7+
## Setup
8+
9+
Use your Ruby version manager of choice ([asdf](https://asdf-vm.com/), [rbenv](https://github.com/rbenv/rbenv)) or open the [Nix](https://nixos.org/) shell by running `nix develop`.
10+
11+
To install the dependencies and start the server, run:
12+
13+
```bash
14+
bundle install
15+
bundle exec jekyll serve
16+
```

flake.lock

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4+
flake-parts.url = "github:hercules-ci/flake-parts";
5+
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
6+
};
7+
8+
outputs = inputs@{ flake-parts, ... }:
9+
flake-parts.lib.mkFlake { inherit inputs; } {
10+
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
11+
perSystem = { pkgs, ... }: {
12+
devShells.default = pkgs.callPackage ./shell.nix { };
13+
};
14+
};
15+
}

shell.nix

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
let
3+
be = pkgs.writeShellScriptBin "be" ''
4+
bundle exec $@
5+
'';
6+
in
7+
pkgs.mkShell {
8+
name = "Ruby user group Slovenia";
9+
buildInputs = [
10+
pkgs.ruby_3_2
11+
pkgs.rubyPackages_3_2.solargraph # Ruby language server
12+
pkgs.nodejs_20
13+
14+
be
15+
];
16+
17+
shellHook = ''
18+
bundle config set --local path '.'
19+
'';
20+
}

0 commit comments

Comments
 (0)