diff --git a/flake.nix b/flake.nix index 8e434dc..6cf5b05 100644 --- a/flake.nix +++ b/flake.nix @@ -17,13 +17,13 @@ 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 = ./.; @@ -31,7 +31,7 @@ }; overlayAttrs = { - iecs = config.packages.default; + inherit (self'.packages) iecs; }; }; }; diff --git a/templates/.gitignore b/templates/.gitignore new file mode 100644 index 0000000..2cc0d19 --- /dev/null +++ b/templates/.gitignore @@ -0,0 +1 @@ +devenv.lock diff --git a/templates/devenv/.envrc b/templates/devenv/.envrc new file mode 100644 index 0000000..894571b --- /dev/null +++ b/templates/devenv/.envrc @@ -0,0 +1,3 @@ +source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k=" + +use devenv diff --git a/templates/devenv/.gitignore b/templates/devenv/.gitignore new file mode 100644 index 0000000..4d058db --- /dev/null +++ b/templates/devenv/.gitignore @@ -0,0 +1,9 @@ +# Devenv +.devenv* +devenv.local.nix + +# direnv +.direnv + +# pre-commit +.pre-commit-config.yaml diff --git a/templates/devenv/devenv.nix b/templates/devenv/devenv.nix new file mode 100644 index 0000000..6243b86 --- /dev/null +++ b/templates/devenv/devenv.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: + +{ + packages = [ pkgs.iecs ]; +} diff --git a/templates/devenv/devenv.yaml b/templates/devenv/devenv.yaml new file mode 100644 index 0000000..ac34342 --- /dev/null +++ b/templates/devenv/devenv.yaml @@ -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