Skip to content
Merged
Changes from 2 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
24 changes: 21 additions & 3 deletions default/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
inputs.nixpkgs.lib.genAttrs supportedSystems (
system:
f {
# Provides a system-specific, configured Nixpkgs
pkgs = import inputs.nixpkgs {
inherit system;
# Enable using unfree packages
Expand All @@ -33,13 +32,21 @@
in
{
# Development environments output by this flake

# To activate the default environment:
# nix develop
# Or if you use direnv:
# direnv allow
devShells = forEachSupportedSystem (
{ pkgs }:
{ pkgs, system }:
{
# Run `nix develop` to activate this environment or `direnv allow` if you have direnv installed
default = pkgs.mkShell {
# The Nix packages provided in the environment
packages = with pkgs; [ ];
packages = with pkgs; [
# Add the flake's formatter to your project's environment
self.formatter.${system}
];

# Set any environment variables for your development environment
env = { };
Expand All @@ -49,5 +56,16 @@
};
}
);

# Nix formatter

# This applies the formatter that follows RFC 166, which defines a standard format:
# https://github.com/NixOS/rfcs/pull/166

# To format all Nix files:
# git ls-files '*.nix' | xargs nix fmt
# To check formatting:
# git ls-files '*.nix' | xargs nixfmt --check
formatter = forEachSupportedSystem ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
};
}
Loading