Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shajra committed Mar 10, 2023
1 parent 809f007 commit c75c32e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 20 deletions.
21 changes: 13 additions & 8 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#+title: Lorelei, an Alternative Nix extension of Direnv
#+setupfile: doc/links.org
#+setupfile: doc/internal/links.org

[[https://github.com/shajra/direnv-nix-lorelei/actions][https://github.com/shajra/direnv-nix-lorelei/workflows/CI/badge.svg]]

Expand Down Expand Up @@ -76,11 +76,16 @@ support of Direnv with the following features:
- You can also save a configurable number of previous environments from being
garbage collected.

Note, Lorelei only works with projects that have a Nix file that can be called
with =nix-shell= (typically called "shell.nix"). For projects that provide a Nix
environment with the not-yet-released Nix flakes feature, please consider using
the =use_flake= function of the [[nixdirenv][nix-direnv]] project, which you can use
concurrently with Lorelei with no conflicts.
#+begin_quote
**Note regarding flakes**: Lorelei only works with projects that have a Nix file
that can be called with =nix-shell= (typically called "shell.nix"). For projects
that provide a Nix environment with Nix's still-experimental /flakes/ feature,
please consider using the =use_flake= function of the [[nixdirenv][nix-direnv]] project, which
you can use concurrently with Lorelei with no conflicts. You may notice that
Lorelei is developed as a flake. This is just a convenience for development and
package installation. Lorelei supports installation both with and without
flakes.
#+end_quote

** About Direnv

Expand Down Expand Up @@ -114,8 +119,8 @@ Chocolatey). As a package manager, Nix helps us get tools and libraries
installed on our system. Nix goes a bit farther, by providing us some facilities
to help us get these tools set up in a local environment called a /Nix shell/.

We typically go into a directory with with a specially configured =shell.nix=
file, and execute ~nix-shell~ to enter into an interactive Bash session with
We typically go into a directory with a specially configured =shell.nix= file,
and execute ~nix-shell~ to enter into an interactive Bash session with
environment variables set up for working in our project.

Direnv can help us get rid of the extra step of having to call =nix-shell=.
Expand Down
2 changes: 2 additions & 0 deletions doc/internal/links.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#+link: direnv-docs https://direnv.net/#docs
#+link: direnv-editor https://github.com/direnv/direnv/wiki#editor-integration
#+link: direnv-shell https://direnv.net/docs/hook.html
#+link: docstring https://en.wikipedia.org/wiki/Docstring
#+link: fhs https://www.pathname.com/fhs/
#+link: github-actions https://github.com/shajra/direnv-nix-lorelei/actions
#+link: homemanager https://github.com/nix-community/home-manager
#+link: homemanager-manual https://rycee.gitlab.io/home-manager/
Expand Down
27 changes: 18 additions & 9 deletions doc/internal/params.el
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
((package-attr . "direnv-nix-lorelei")
(package-name . "direnv-nix-lorelei")
(package-type . "library")
(package-target . "nix-alt.sh")
(run-src . ".")
(run-attr . "direnv")
(run-name . "direnv")
(run-target . "direnv")
(nixos-release . "nixos-21.05"))
((package-attr-short . "lorelei")
(package-attr-long . "packages.x86_64-linux.lorelei")
(package-name . "direnv-nix-lorelei")
(package-type . "library")
(package-target-short . "nix-lorelei.bash")
(package-target-long . "share/direnv-nix-lorelei/nix-lorelei.bash")
(run-attr-short . "direnv")
(run-attr-long . "packages.x86_64-linux.direnv")
;; run-name must be the same as run-target-short
;; run-type must be "executable"
(run-target-short . "direnv")
(run-target-long . "bin/direnv")
(nix-latest . "2.14")
(nixos-latest . "22.11")
(platforms . "\n\
- Linux on x86-64 machines\n\
- MacOS on x86-64 machines\n\
- MacOS on ARM64 machines (M1 or M2)"))
6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
outputs = inputs@{ self, flake-parts, nix-project, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({withSystem, ... }: {
imports = [ nix-project.flakeModules.nixpkgs ];
systems = [ "x86_64-linux" ];
systems = [
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
perSystem = { nixpkgs, ... }:
let build = nixpkgs.stable.extend self.overlays.default;
in {
Expand Down
2 changes: 0 additions & 2 deletions nix/lorelei.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
, jq
, lib
, lorri-envrc
, lorri-eval-stock
, lorri-eval-notrace
, nix-project-lib
, path
, xxHash
Expand Down

0 comments on commit c75c32e

Please sign in to comment.