Skip to content

Commit b62b0a2

Browse files
committed
Format nix files, add formatter
1 parent 3deedcf commit b62b0a2

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed

flake.nix

+22-15
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,28 @@
1111
};
1212
};
1313

14-
outputs = inputs: with inputs;
14+
outputs =
15+
inputs:
16+
with inputs;
1517
{
1618
nixosModule = import ./nix/module.nix self.outputs.packages;
17-
} //
18-
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
19-
let
20-
pkgs = import nixpkgs { inherit system; };
21-
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
22-
in
23-
{
24-
packages.default = pkgs.callPackage ./nix/package.nix { inherit version nuget-packageslock2nix; };
25-
devShells.default = pkgs.mkShell {
26-
packages = with pkgs; [
27-
dotnet-sdk_8
28-
];
29-
};
30-
});
19+
}
20+
//
21+
flake-utils.lib.eachSystem
22+
[
23+
"x86_64-linux"
24+
"aarch64-linux"
25+
]
26+
(
27+
system:
28+
let
29+
pkgs = import nixpkgs { inherit system; };
30+
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
31+
in
32+
{
33+
packages.default = pkgs.callPackage ./nix/package.nix { inherit version nuget-packageslock2nix; };
34+
devShells.default = pkgs.mkShell { packages = with pkgs; [ dotnet-sdk_8 ]; };
35+
formatter = pkgs.nixfmt-rfc-style;
36+
}
37+
);
3138
}

nix/module.nix

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
packages:
2-
{ config, pkgs, lib, specialArgs, ... }:
2+
{
3+
config,
4+
pkgs,
5+
lib,
6+
specialArgs,
7+
...
8+
}:
39

410
with lib;
511
with types;
@@ -71,4 +77,3 @@ in
7177
};
7278
};
7379
}
74-

nix/package.nix

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
{ buildDotnetModule
2-
, lib
3-
, system
4-
, version
5-
, dotnet-sdk_8
6-
, dotnet-runtime_8
7-
, nuget-packageslock2nix
1+
{
2+
buildDotnetModule,
3+
lib,
4+
system,
5+
version,
6+
dotnet-sdk_8,
7+
dotnet-runtime_8,
8+
nuget-packageslock2nix,
89
}:
910

1011
buildDotnetModule {
@@ -15,9 +16,7 @@ buildDotnetModule {
1516

1617
nugetDeps = nuget-packageslock2nix.lib {
1718
inherit system;
18-
lockfiles = [
19-
../packages.lock.json
20-
];
19+
lockfiles = [ ../packages.lock.json ];
2120
};
2221

2322
projectFile = [ "moe.csproj" ];

0 commit comments

Comments
 (0)