This commit is contained in:
Tobias Berger 2024-04-16 09:26:30 +02:00
parent 3e2fa23503
commit 95f1229c14
Signed by: toby
GPG key ID: 2D05EFAB764D6A88
2 changed files with 35 additions and 21 deletions

View file

@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1712163089, "lastModified": 1712963716,
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -7,29 +7,43 @@
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
}; };
outputs = inputs: outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } { inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems; systems = import inputs.systems;
imports = [ inputs.treefmt-nix.flakeModule ]; imports = [ inputs.treefmt-nix.flakeModule ];
perSystem = { config, self', pkgs, lib, system, ... }: { perSystem =
# Rust dev environment {
devShells.default = pkgs.mkShell { config,
inputsFrom = [ config.treefmt.build.devShell ]; self',
nativeBuildInputs = with pkgs; [ dotnet-sdk_8 libxslt ]; pkgs,
shellHook = '' lib,
DOTNET_ROOT="${pkgs.dotnet-sdk_8}"; system,
''; ...
}; }:
{
# Rust dev environment
devShells.default = pkgs.mkShell {
inputsFrom = [ config.treefmt.build.devShell ];
nativeBuildInputs = with pkgs; [
dotnet-sdk_8
libxslt
];
shellHook = ''
DOTNET_ROOT="${pkgs.dotnet-sdk_8}";
'';
};
# Add your auto-formatters here. # Add your auto-formatters here.
# cf. https://numtide.github.io/treefmt/ # cf. https://numtide.github.io/treefmt/
treefmt.config = { treefmt.config = {
projectRootFile = "flake.nix"; projectRootFile = "flake.nix";
programs = { programs = {
nixpkgs-fmt.enable = true; nixpkgs-fmt.enable = true;
csharpier.enable = true; csharpier.enable = true;
nixfmt-rfc-style.enable = true;
};
}; };
}; };
};
}; };
} }