about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <git@emile.space>2025-02-13 22:29:30 +0100
committerEmile <git@emile.space>2025-02-13 22:29:30 +0100
commit176a24b152d1c20c841ceacb7b75694bbe521400 (patch)
tree9cc8442c825d3f2556ce664f2cc722aab025f2e7
parenta9fd99521e3f74547b078a73e821f8c718ba40ec (diff)
flake: hydraJobs.templates: just got rid of the self.
-rw-r--r--flake.nix4
-rw-r--r--nix/templates/ctf/flake.nix2
-rw-r--r--nix/templates/goapp/flake.nix14
3 files changed, 10 insertions, 10 deletions
diff --git a/flake.nix b/flake.nix
index 899500a..51e0093 100644
--- a/flake.nix
+++ b/flake.nix
@@ -225,13 +225,11 @@
                 (
                   (import ./nix/templates/${name}/flake.nix).outputs) {
                     inherit nixpkgs flake-utils;
-                    # Self needs to be the imported flake, as some packages in some templates rely on each other, such as the goapp/backend-docker package which relies on the goapp/backend-pkg. Cross-template references are not supported (yet);
-                    self = import ./nix/templates/${name}/flake.nix;
                   }).packages or {})
               templ);
       in {
         inherit (self) packages;
-        # nixosConfigurations = helper.buildHosts self.nixosConfigurations;
+        nixosConfigurations = helper.buildHosts self.nixosConfigurations;
         templates = template-packages self.templates;
       };
 
diff --git a/nix/templates/ctf/flake.nix b/nix/templates/ctf/flake.nix
index 0d92e08..e8b75b9 100644
--- a/nix/templates/ctf/flake.nix
+++ b/nix/templates/ctf/flake.nix
@@ -8,7 +8,7 @@
 
   # Flake outputs
   outputs =
-    { self, nixpkgs, ... }:
+    { nixpkgs, ... }:
     let
       # Systems supported
       allSystems = [
diff --git a/nix/templates/goapp/flake.nix b/nix/templates/goapp/flake.nix
index 132667d..8303eb3 100644
--- a/nix/templates/goapp/flake.nix
+++ b/nix/templates/goapp/flake.nix
@@ -3,7 +3,7 @@
   inputs.flake-utils.url = "git+https://github.com/numtide/flake-utils";
 
   outputs =
-    { self, nixpkgs, flake-utils, ... }:
+    { nixpkgs, flake-utils, ... }:
     flake-utils.lib.eachDefaultSystem (
       system:
       let
@@ -12,24 +12,26 @@
           overlays = [ ];
         };
 
-        package-and-docker = name: system: (let
+        package-and-docker = name: (let
           pkgname = name + "-pkg";
           dockername = name + "-docker";
+
+          package = import ./${name} { inherit pkgs name; };
         in {
           # the raw package
-          ${pkgname} = import ./${name} { inherit pkgs name; };
+          ${pkgname} = package;
 
           # the docker image
           ${dockername} = pkgs.dockerTools.buildImage {
             name = "${name}";
-            config.Cmd = [ "${self.packages.${system}.${pkgname}}/bin/${name}" ];
+            config.Cmd = [ "${package}/bin/${name}" ];
           };
         });
       in
       {
         packages = { }
-                   // (package-and-docker "backend" system)
-                   // (package-and-docker "frontend" system);
+                   // (package-and-docker "backend")
+                   // (package-and-docker "frontend");
 
         devShells.default = pkgs.mkShell {
           buildInputs = builtins.attrValues {