@m14i/sith 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -35737,10 +35737,8 @@ async function runShell() {
35737
35737
  `${process.cwd()}:${_config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.workspaceMount}`,
35738
35738
  "-e",
35739
35739
  `GITHUB_TOKEN=${process.env.GITHUB_TOKEN || ""}`,
35740
- "--entrypoint",
35741
- "nix-shell",
35742
35740
  _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.imageName,
35743
- _config_js__WEBPACK_IMPORTED_MODULE_5__/* .DOCKER_CONFIG */ .e6.shellEntrypoint,
35741
+ "bash",
35744
35742
  ];
35745
35743
  try {
35746
35744
  await (0,execa__WEBPACK_IMPORTED_MODULE_6__/* .execa */ .Ho)("docker", dockerArgs, {
package/docker/Dockerfile CHANGED
@@ -9,10 +9,11 @@
9
9
  # ============================================================================
10
10
  FROM nixos/nix:2.19.2 AS builder
11
11
 
12
- # Configuration Nix pour permettre les builds
12
+ # Configuration Nix pour permettre les builds et activer flakes
13
13
  # Note: sandbox=false required for Docker-in-Docker compatibility
14
14
  RUN echo "sandbox = false" >> /etc/nix/nix.conf && \
15
- echo "filter-syscalls = false" >> /etc/nix/nix.conf
15
+ echo "filter-syscalls = false" >> /etc/nix/nix.conf && \
16
+ echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
16
17
 
17
18
  # Copier les fichiers de configuration des skills
18
19
  COPY docker/skills/rtk-config.toml /opt/sith/skills/rtk-config.toml
@@ -24,9 +25,10 @@ COPY docker/nix/ /opt/sith/nix/
24
25
  # Configurer npm pour utiliser le registry public
25
26
  RUN echo "registry=https://registry.npmjs.org/" > /root/.npmrc
26
27
 
27
- # Pré-charger l'environnement Nix (installe tous les packages)
28
- # Cela cache les dépendances dans le layer Docker
29
- RUN nix-shell /opt/sith/nix/shell.nix --run "echo '✅ Environment cached'"
28
+ # Generate flake.lock and pre-build environment
29
+ RUN cd /opt/sith/nix && \
30
+ nix flake lock && \
31
+ nix develop --command echo '✅ Flake environment cached'
30
32
 
31
33
  # Installer OpenCode CLI via script officiel
32
34
  RUN nix-shell /opt/sith/nix/shell.nix --run " \
@@ -46,10 +48,11 @@ LABEL description="OpenCode CI/CD avec Nix, GitHub Copilot et skills d'optimisat
46
48
  LABEL version="2.3.0"
47
49
  LABEL org.opencontainers.image.source="https://github.com/MerzoukeMansouri/sith"
48
50
 
49
- # Configuration Nix pour permettre les builds
51
+ # Configuration Nix pour permettre les builds et activer flakes
50
52
  # Note: sandbox=false required for Docker-in-Docker compatibility
51
53
  RUN echo "sandbox = false" >> /etc/nix/nix.conf && \
52
- echo "filter-syscalls = false" >> /etc/nix/nix.conf
54
+ echo "filter-syscalls = false" >> /etc/nix/nix.conf && \
55
+ echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
53
56
 
54
57
  # Copier les fichiers de configuration des skills depuis builder
55
58
  COPY --from=builder /opt/sith/ /opt/sith/
@@ -99,13 +102,13 @@ ENV CAVEMAN_AUTO=true
99
102
  # Healthcheck pour vérifier que l'environnement est prêt
100
103
  # Note: RTK check is conditional on RTK_ENABLED to avoid false failures
101
104
  HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
102
- CMD nix-shell /opt/sith/nix/shell.nix --run "opencode --version && ([ \"\$RTK_ENABLED\" = \"false\" ] || command -v rtk)" || exit 1
105
+ CMD cd /opt/sith/nix && nix develop --command sh -c "opencode --version && ([ \"\$RTK_ENABLED\" = \"false\" ] || command -v rtk)" || exit 1
103
106
 
104
107
  # Répertoire de travail pour les projets
105
108
  WORKDIR /workspace
106
109
 
107
- # Point d'entrée via nix-shell
108
- ENTRYPOINT ["nix-shell", "/opt/sith/nix/shell.nix", "--run"]
110
+ # Point d'entrée via nix develop (flakes)
111
+ ENTRYPOINT ["sh", "-c", "cd /opt/sith/nix && nix develop --command"]
109
112
 
110
113
  # Commande par défaut
111
114
  CMD ["opencode --help"]
@@ -0,0 +1,56 @@
1
+ {
2
+ description = "Sith - OpenCode Docker Environment";
3
+
4
+ inputs = {
5
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
6
+ flake-utils.url = "github:numtide/flake-utils";
7
+ };
8
+
9
+ outputs = { self, nixpkgs, flake-utils }:
10
+ flake-utils.lib.eachDefaultSystem (system:
11
+ let
12
+ pkgs = nixpkgs.legacyPackages.${system};
13
+
14
+ # Load packages from config
15
+ packagesConfig = builtins.fromJSON (builtins.readFile ./nix-config/packages.json);
16
+
17
+ allPackages = pkgs.lib.flatten (
18
+ pkgs.lib.mapAttrsToList (category: config: config.packages) packagesConfig.categories
19
+ );
20
+
21
+ resolvePkg = pkgPath:
22
+ let
23
+ parts = pkgs.lib.splitString "." pkgPath;
24
+ in
25
+ if pkgs.lib.length parts == 1
26
+ then builtins.getAttr (pkgs.lib.head parts) pkgs
27
+ else if pkgs.lib.length parts == 2
28
+ then builtins.getAttr (pkgs.lib.elemAt parts 1) (builtins.getAttr (pkgs.lib.head parts) pkgs)
29
+ else throw "Package path too deep: ${pkgPath}";
30
+
31
+ packages = map resolvePkg allPackages;
32
+ in
33
+ {
34
+ devShells.default = pkgs.mkShell {
35
+ name = "opencode-ci-environment";
36
+
37
+ buildInputs = packages;
38
+
39
+ shellHook = ''
40
+ # Source external setup script
41
+ if [ -f /opt/sith/nix/nix-scripts/setup.sh ]; then
42
+ source /opt/sith/nix/nix-scripts/setup.sh
43
+ fi
44
+ '';
45
+
46
+ LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
47
+ LANG = "en_US.UTF-8";
48
+ LC_ALL = "en_US.UTF-8";
49
+ LC_CTYPE = "en_US.UTF-8";
50
+
51
+ SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
52
+ NIX_SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
53
+ };
54
+ }
55
+ );
56
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m14i/sith",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.",
5
5
  "type": "module",
6
6
  "repository": {