Skip to content

Commit

Permalink
Add devenv template
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella committed Nov 26, 2024
1 parent 043ed4a commit 6d30263
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@

systems = import systems;

perSystem = { config, system, pkgs, ... }: {
perSystem = { self', pkgs, system, ... }: {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ gomod2nix.overlays.default ];
};

packages.default = pkgs.buildGoApplication {
packages.iecs = pkgs.buildGoApplication {
pname = "iecs";
version = "0.1.0";
src = ./.;
modules = ./gomod2nix.toml;
};

overlayAttrs = {
iecs = config.packages.default;
inherit (self'.packages) iecs;
};
};
};
Expand Down
1 change: 1 addition & 0 deletions templates/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
devenv.lock
3 changes: 3 additions & 0 deletions templates/devenv/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="

use devenv
9 changes: 9 additions & 0 deletions templates/devenv/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml
5 changes: 5 additions & 0 deletions templates/devenv/devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ pkgs, ... }:

{
packages = [ pkgs.iecs ];
}
8 changes: 8 additions & 0 deletions templates/devenv/devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
iecs:
url: github:sestrella/iecs
overlays:
- default
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling

0 comments on commit 6d30263

Please sign in to comment.