summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix3
-rw-r--r--templates/devenv/.envrc3
-rw-r--r--templates/devenv/devenv.nix4
-rw-r--r--templates/devenv/devenv.yaml5
-rw-r--r--templates/devenv/flake-parts/.envrc11
-rw-r--r--templates/devenv/flake-parts/flake.nix27
-rw-r--r--templates/devenv/simple/.envrc11
-rw-r--r--templates/devenv/simple/flake.nix22
8 files changed, 13 insertions, 73 deletions
diff --git a/flake.nix b/flake.nix
index 61e3ba0..34a1a20 100644
--- a/flake.nix
+++ b/flake.nix
@@ -34,11 +34,10 @@
lib = import ./lib;
templates = let
- devenv = {path = ./templates/devenv/simple;};
+ devenv = {path = ./templates/devenv;};
in {
inherit devenv;
default = devenv;
- devenvModular = {path = ./templates/devenv/flake-parts;};
};
};
diff --git a/templates/devenv/.envrc b/templates/devenv/.envrc
new file mode 100644
index 0000000..6de8a8a
--- /dev/null
+++ b/templates/devenv/.envrc
@@ -0,0 +1,3 @@
+source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0="
+
+use devenv \ No newline at end of file
diff --git a/templates/devenv/devenv.nix b/templates/devenv/devenv.nix
new file mode 100644
index 0000000..3734b1c
--- /dev/null
+++ b/templates/devenv/devenv.nix
@@ -0,0 +1,4 @@
+{inputs, ...}: {
+ imports = [inputs.my-nixpkgs.devenvModules.personal];
+ languages.nix.enable = true;
+}
diff --git a/templates/devenv/devenv.yaml b/templates/devenv/devenv.yaml
new file mode 100644
index 0000000..38233b1
--- /dev/null
+++ b/templates/devenv/devenv.yaml
@@ -0,0 +1,5 @@
+inputs:
+ nixpkgs:
+ url: github:NixOS/nixpkgs/nixpkgs-unstable
+ my-nixpkgs:
+ url: github:qaristote/my-nixpkgs
diff --git a/templates/devenv/flake-parts/.envrc b/templates/devenv/flake-parts/.envrc
deleted file mode 100644
index fd8affa..0000000
--- a/templates/devenv/flake-parts/.envrc
+++ /dev/null
@@ -1,11 +0,0 @@
-if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
- source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
-fi
-
-nix_direnv_watch_file devenv.nix
-nix_direnv_watch_file devenv.lock
-nix_direnv_watch_file devenv.yaml
-if ! use flake . --impure
-then
- echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
-fi
diff --git a/templates/devenv/flake-parts/flake.nix b/templates/devenv/flake-parts/flake.nix
deleted file mode 100644
index 031a8d6..0000000
--- a/templates/devenv/flake-parts/flake.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- inputs = {
- devenv.url = "github:cachix/devenv";
- my-nixpkgs.url = "github:qaristote/my-nixpkgs";
- nixpkgs = {};
- };
-
- nixConfig = {
- extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
- extra-trusted-substituters = "https://devenv.cachix.org";
- };
-
- outputs = {
- flake-parts,
- my-nixpkgs,
- ...
- } @ inputs:
- flake-parts.lib.mkFlake {inherit inputs;} {
- imports = builtins.attrValues {inherit (my-nixpkgs.flakeModules) personal devenv;};
- perSystem = {...}: {
- devenv.shells.default = {
- ######################## PUT YOUR CONFIG HERE ########################
- languages.nix.enable = true;
- };
- };
- };
-}
diff --git a/templates/devenv/simple/.envrc b/templates/devenv/simple/.envrc
deleted file mode 100644
index fd8affa..0000000
--- a/templates/devenv/simple/.envrc
+++ /dev/null
@@ -1,11 +0,0 @@
-if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
- source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
-fi
-
-nix_direnv_watch_file devenv.nix
-nix_direnv_watch_file devenv.lock
-nix_direnv_watch_file devenv.yaml
-if ! use flake . --impure
-then
- echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
-fi
diff --git a/templates/devenv/simple/flake.nix b/templates/devenv/simple/flake.nix
deleted file mode 100644
index 078b577..0000000
--- a/templates/devenv/simple/flake.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- inputs = {
- devenv.url = "github:cachix/devenv";
- my-nixpkgs.url = "github:qaristote/my-nixpkgs";
- nixpkgs = {};
- flake-parts = {};
- };
-
- nixConfig = {
- extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
- extra-trusted-substituters = "https://devenv.cachix.org";
- };
-
- outputs = inputs:
- inputs.my-nixpkgs.lib.mkDevenv inputs
- # this function has the same arguments flake-parts' perSystem does:
- # config, lib, pkgs, system, etc.
- ({...}: {
- # put your devenv configuration here
- languages.nix.enable = true;
- });
-}