aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoufic ar <contact@toufy.me>2026-05-15 00:23:39 +0300
committertoufic ar <contact@toufy.me>2026-05-15 00:23:39 +0300
commite4816f1a65a78a3f8991246a7cefd92f13bbfd48 (patch)
treee4f0686d1dadcf3201b874a0b6bd82d34e578a23
parent3f1ca7182b7d94f67e950efb9732e8fbc24ef767 (diff)
downloadmakeshiftci-e4816f1a65a78a3f8991246a7cefd92f13bbfd48.tar.gz
makeshiftci-e4816f1a65a78a3f8991246a7cefd92f13bbfd48.zip
mkMerge instead of shallow merge
-rw-r--r--flake.nix50
1 files 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()'";
+ };
};
- };
- });
+ })
+ ];
};
};
}