switch from alejandra -> nixpkgs-fmt

alejandra has someone questionable choices for formatting that no one would apply to there code if they would format manually.
nixpkgs-fmt seems to produce more readable results.
This commit is contained in:
Jörg Thalheim 2023-07-21 11:14:54 +02:00
parent cf583e2d44
commit 9aaac528f8
11 changed files with 64 additions and 65 deletions

View File

@ -1,7 +1,6 @@
{
self,
inputs,
...
{ self
, inputs
, ...
}: {
imports = [
inputs.treefmt-nix.flakeModule
@ -10,7 +9,7 @@
treefmt.projectRootFile = "flake.nix";
treefmt.flakeCheck = true;
treefmt.flakeFormatter = true;
treefmt.programs.alejandra.enable = true;
treefmt.programs.nixpkgs-fmt.enable = true;
treefmt.programs.shellcheck.enable = true;
};
}

View File

@ -12,11 +12,10 @@
};
outputs = inputs @ { flake-parts, ... }:
flake-parts.lib.mkFlake {inherit inputs;} ({
lib,
config,
self,
...
flake-parts.lib.mkFlake { inherit inputs; } ({ lib
, config
, self
, ...
}: {
systems = lib.systems.flakeExposed;
imports = [

View File

@ -1,8 +1,7 @@
{
config,
lib,
pkgs,
...
{ config
, lib
, pkgs
, ...
}: {
options.hidden-announce = {
enable = lib.mkEnableOption "hidden-announce";

View File

@ -1,8 +1,7 @@
{
config,
lib,
pkgs,
...
{ config
, lib
, pkgs
, ...
}: {
systemd.tmpfiles.rules = [
"d /var/shared 0777 root root - -"

View File

@ -1,7 +1,7 @@
{
lib,
buildGoModule,
fetchFromGitHub,
{ lib
, buildGoModule
, fetchFromGitHub
,
}:
buildGoModule rec {
pname = "go-ssb";

View File

@ -1,11 +1,11 @@
{
pkgs ? import <nixpkgs> {},
lib ? pkgs.lib,
python3 ? pkgs.python3,
ruff ? pkgs.ruff,
runCommand ? pkgs.runCommand,
}: let
{ pkgs ? import <nixpkgs> { }
, lib ? pkgs.lib
, python3 ? pkgs.python3
, ruff ? pkgs.ruff
, runCommand ? pkgs.runCommand
,
}:
let
pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml);
name = pyproject.project.name;

View File

@ -1,9 +1,11 @@
{
perSystem = {pkgs, ...}: let
perSystem = { pkgs, ... }:
let
pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml);
name = pyproject.project.name;
package = pkgs.callPackage ./default.nix { };
in {
in
{
# packages.${name} = package;
checks.python-template = package.tests.check;
};

View File

@ -1,7 +1,8 @@
{
pkgs ? import <nixpkgs> {},
system ? builtins.currentSystem,
}: let
{ pkgs ? import <nixpkgs> { }
, system ? builtins.currentSystem
,
}:
let
lib = pkgs.lib;
python3 = pkgs.python3;
package = import ./default.nix {