Refactor flake structure with flake-parts
This commit is contained in:
parent
8ca6499da1
commit
cf83a45191
10 changed files with 203 additions and 176 deletions
35
flake/perSystem.nix
Normal file
35
flake/perSystem.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{inputs, ...}: let
|
||||
rootPath = ./..;
|
||||
in {
|
||||
imports = [
|
||||
(rootPath + "/treefmt.nix")
|
||||
];
|
||||
perSystem = {
|
||||
pkgs,
|
||||
system,
|
||||
lib,
|
||||
self',
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) nixpkgs;
|
||||
callPackages = lib.callPackagesWith (pkgs // {inherit callPackages inputs rootPath;});
|
||||
in {
|
||||
_module.args.pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
nixd
|
||||
typos
|
||||
typos-lsp
|
||||
just
|
||||
nvfetcher
|
||||
];
|
||||
};
|
||||
packages = callPackages (rootPath + "/pkgs") {};
|
||||
checks = self'.packages;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue