From e4816f1a65a78a3f8991246a7cefd92f13bbfd48 Mon Sep 17 00:00:00 2001 From: toufic ar Date: Fri, 15 May 2026 00:23:39 +0300 Subject: mkMerge instead of shallow merge --- flake.nix | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index dae9173..1e9f068 100644 --- a/flake.nix +++ b/flake.nix @@ -82,7 +82,8 @@ default = {}; }; }; - config = lib.mkIf cfg.enable ({ + config = lib.mkIf cfg.enable lib.mkMerge [ + { environment = { variables.MSCI_HOME = cfg.dataDir; systemPackages = [self.packages."${system}".msci]; @@ -111,29 +112,32 @@ }; }; } - // lib.mkIf cfg.webUI.enable { - systemd.services.makeshiftci-web = { - wantedBy = ["multi-user.target"]; - unitConfig.ConditionUser = - if cfg.createUser - then "makeshiftci" - else "root"; - serviceConfig = let - webui = pkgs.python3.withPackages (p: - with p; [ - gunicorn - self.packages."${system}".msci-web - ]); - in { - ExecStart = - "${webui}/bin/gunicorn " - + "-w ${builtins.toString cfg.webUI.workers} " - + "--timeout ${builtins.toString cfg.webUI.timeout} " - + "-b 127.0.0.1:${builtins.toString cfg.webUI.port} " - + "'web:create_app()'"; + (lib.mkIf + cfg.webUI.enable + { + systemd.services.makeshiftci-web = { + wantedBy = ["multi-user.target"]; + unitConfig.ConditionUser = + if cfg.createUser + then "makeshiftci" + else "root"; + serviceConfig = let + webui = pkgs.python3.withPackages (p: + with p; [ + gunicorn + self.packages."${system}".msci-web + ]); + in { + ExecStart = + "${webui}/bin/gunicorn " + + "-w ${builtins.toString cfg.webUI.workers} " + + "--timeout ${builtins.toString cfg.webUI.timeout} " + + "-b 127.0.0.1:${builtins.toString cfg.webUI.port} " + + "'web:create_app()'"; + }; }; - }; - }); + }) + ]; }; }; } -- cgit v1.2.3