Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc="
fi
nix_direnv_watch_file ./shell/default.nix flake.lock
use flake -L
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.direnv
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# cardano.nix

Collection of Cardano related NixOS modules, with a special focus on:

- autogenerated documentation
- comprehensive (NixOS) tests
- an homogeneous module interface

## Shell

`cardano.nix` provides a shell that includes some useful aliases:

- `fmt` formats the entire repository using [treefmt](https://github.com/numtide/treefmt)
- `build-all` builds all the flake's outputs using [devour-flake](https://github.com/srid/devour-flake)
- `check` simply stands for `nix flake check`

A `.envrc` is also provided, using [direnv]() and [nix-direnv](https://github.com/nix-community/nix-direnv) is highly suggested.
38 changes: 38 additions & 0 deletions checks/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{inputs, ...}: {
perSystem = {
pkgs,
config,
...
}: {
apps = {
nix-build-all.program = pkgs.writeShellApplication {
name = "nix-build-all";
runtimeInputs = [
(pkgs.callPackage inputs.devour-flake {})
];
text = ''
# Make sure that flake.lock is sync
nix flake lock --no-update-lock-file

# Do a full nix build (all outputs)
devour-flake . "$@"
'';
};
};

devshells.default.commands = [
{
category = "Tools";
name = "build-all";
help = "Build all the checks";
command = config.apps.nix-build-all.program;
}
{
category = "Tools";
name = "check";
help = "Alias of `nix flake check`";
command = "nix flake check";
}
];
};
}
6 changes: 6 additions & 0 deletions ci/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{inputs, ...}: {
imports = [
inputs.hercules-ci-effects.flakeModule
];
config.herculesCI.ciSystems = ["x86_64-linux" "x86_64-darwin"];
}
299 changes: 299 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading