diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-03-20 13:57:57 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-03-20 13:57:57 +0300 |
commit | 8520e18ad256ae8e7a7ee1716fddc566b39a1a6b (patch) | |
tree | 9720d86f85b3f422c892b093540ed8f840e75757 /flake.nix | |
parent | 2023-03-20 (diff) |
2023-03-20
Diffstat (limited to '')
-rw-r--r-- | flake.nix | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/flake.nix b/flake.nix index 4eb3fd0..4b5fa34 100644 --- a/flake.nix +++ b/flake.nix @@ -254,13 +254,10 @@ inherit (self.checks.${system}.preCommit) shellHook; }; - formatter = pkgs.writeShellApplication { - name = "fmt"; - runtimeInputs = with pkgs; [alejandra]; - text = '' - alejandra --quiet "$@" + formatter = with pkgs; + writeShellScriptBin "fmt" '' + ${alejandra}/bin/alejandra --quiet "$@" ''; - }; checks.preCommit = pre-commit-hooks.lib.${system}.run { src = ./.; @@ -283,20 +280,19 @@ settings.deadnix.edit = true; }; }) - // { + // (let + importConfigurations = dir: import dir {inherit inputs lib;}; + in { inherit lib; modules.nixfiles = import ./modules/common; nixosModules.nixfiles = import ./modules/nixos; - nixosConfigurations = - import ./nixosConfigurations {inherit inputs lib;}; + nixosConfigurations = importConfigurations ./nixosConfigurations; darwinModules.nixfiles = import ./modules/darwin; - darwinConfigurations = - import ./darwinConfigurations {inherit inputs lib;}; + darwinConfigurations = importConfigurations ./darwinConfigurations; - # TODO Make it so that self.packages also can use this. overlays.default = final: _: { bruh = final.callPackage ./packages/bruh.nix {}; mpv-autosub = final.callPackage ./packages/mpv-autosub.nix {}; @@ -304,5 +300,5 @@ nixfiles = final.callPackage ./packages/nixfiles.nix {}; throttled = final.callPackage ./packages/throttled.nix {}; }; - }; + }); } |