diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-04-27 16:34:27 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-04-27 16:34:27 +0900 |
| commit | 939f02ceab3cecf66a399e50e72af46e4d277bd1 (patch) | |
| tree | 9e44341e8e4eab3911d8285ed5b0d3529a158c9c /flake.nix | |
| parent | f37e8e6866204551eae29aff5cecf706e8167edb (diff) | |
| download | nur-packages-939f02ceab3cecf66a399e50e72af46e4d277bd1.tar.gz nur-packages-939f02ceab3cecf66a399e50e72af46e4d277bd1.tar.zst nur-packages-939f02ceab3cecf66a399e50e72af46e4d277bd1.zip | |
treefmt
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 39 |
1 files changed, 33 insertions, 6 deletions
@@ -1,14 +1,41 @@ { description = "My personal NUR repository"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - outputs = { self, nixpkgs }: + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + treefmt-nix = { + url = "github:numtide/treefmt-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { + self, + nixpkgs, + treefmt-nix, + }: let forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; in { - legacyPackages = forAllSystems (system: import ./default.nix { - pkgs = import nixpkgs { inherit system; }; - }); - packages = forAllSystems (system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system}); + formatter = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + treefmt = treefmt-nix.lib.evalModule pkgs ./treefmt.nix; + in + treefmt.config.build.wrapper + ); + legacyPackages = forAllSystems ( + system: + import ./default.nix { + pkgs = import nixpkgs { inherit system; }; + } + ); + packages = forAllSystems ( + system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system} + ); }; } |
