Files
NixOsConfig/modules/flake/dev.nix
T
faumaray 079cceb554 update
Signed-off-by: faumaray <faumaray@gmail.com>
2026-10-29 16:02:14 +03:00

36 lines
1.1 KiB
Nix

# Development: `nix develop`, `nix fmt` and the formatting check. Both skip
# hardware-configuration.nix, which nixos-generate-config (install-system) writes.
{ self, ... }:
{
perSystem =
{ inputs', pkgs, ... }:
{
devShells.default = pkgs.mkShell {
name = "nixos-config";
meta.description = "This repository: agenix, disko, age, ssh-to-age, sbctl, git, nixfmt, nixd, shellcheck";
packages = [
inputs'.agenix.packages.default
inputs'.disko.packages.disko
pkgs.age
pkgs.ssh-to-age
pkgs.sbctl
pkgs.git
pkgs.nixfmt
pkgs.nixd
pkgs.shellcheck
];
};
formatter = pkgs.nixfmt-tree.override {
settings.formatter.nixfmt.excludes = [ "hosts/*/hardware-configuration.nix" ];
};
checks.formatting = pkgs.runCommandLocal "nixfmt-check" { nativeBuildInputs = [ pkgs.nixfmt ]; } ''
cd ${self}
find . -name '*.nix' ! -path './hosts/*/hardware-configuration.nix' -print0 \
| xargs -0 nixfmt --check
touch $out
'';
};
}