From c274a47faa397ccd80add222263482f263919814 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Fri, 14 Nov 2025 09:22:43 -0600 Subject: Fixed lua init script + added option to declaire mainFile --- flake.nix | 54 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 24 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 6ab086f..f38ee8d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Wezterm configuration a la nixCats"; + description = "Wezterm configuration à la nixCats"; inputs = { nixpkgs.url = "github:nixos/nixpkgs"; @@ -15,9 +15,13 @@ }; }; - outputs = inputs@{ self, flake-parts, ... }: let - weznix = import ./modules/flake-module.nix; - in flake-parts.lib.mkFlake { inherit inputs self; } { + outputs = + inputs@{ flake-parts, ... }: + let + weznix = import ./modules/flake-module.nix; + nixToLua = import inputs.nixToLua; + in + flake-parts.lib.mkFlake { inherit inputs; } { systems = import inputs.systems; imports = [ @@ -26,33 +30,35 @@ ]; flake = { - overlays.default = import ./overlays { nixToLua = import inputs.nixToLua; }; + overlays.default = _final: prev: { weznix = prev.callPackage ./pkgs/weznix { inherit nixToLua; }; }; flakeModules.default = weznix; }; - perSystem = { system, pkgs, config, ... }: { - treefmt = { - programs.nixfmt = { - enable = true; - strict = true; + perSystem = + { pkgs, config, ... }: + { + treefmt = { + programs.nixfmt = { + enable = true; + strict = true; + }; }; - }; - devShells.default = pkgs.mkShellNoCC { - inputsFrom = [ config.treefmt.devShell ]; - nativeBuildInputs = with pkgs; [ - nixd - statix - deadnix - ]; - }; + devShells.default = pkgs.mkShellNoCC { + inputsFrom = [ config.treefmt.build.devShell ]; + nativeBuildInputs = with pkgs; [ + nixd + statix + deadnix + ]; + }; - weznix = { - wrapConfig = true; - luaPath = ./test; - }; + weznix = { + wrapConfig = true; + luaPath = ./test; + }; - }; + }; }; } -- cgit v1.2.3