diff options
| author | toufic ar <contact@toufy.me> | 2026-05-15 00:23:39 +0300 |
|---|---|---|
| committer | toufic ar <contact@toufy.me> | 2026-05-15 00:23:39 +0300 |
| commit | e4816f1a65a78a3f8991246a7cefd92f13bbfd48 (patch) | |
| tree | e4f0686d1dadcf3201b874a0b6bd82d34e578a23 /flake.nix | |
| parent | 3f1ca7182b7d94f67e950efb9732e8fbc24ef767 (diff) | |
| download | makeshiftci-e4816f1a65a78a3f8991246a7cefd92f13bbfd48.tar.gz makeshiftci-e4816f1a65a78a3f8991246a7cefd92f13bbfd48.zip | |
mkMerge instead of shallow merge
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 50 |
1 files changed, 27 insertions, 23 deletions
@@ -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()'"; + }; }; - }; - }); + }) + ]; }; }; } |
