Repository: ngi-nix/ngipkgs
Pull request #715: migrate scion default
Author: login: khabdrick
Created: 2025-04-04T15:43:28Z | Merged: 2025-04-10T07:55:22Z

Migrate scion `default.nix` to new project folder.

fixed #590 

Linked issue #590: Migrate SCION to projects
The project needs to be moved from `/projects-old` into `/projects` and its artefacts tracked to match our [project template](https://github.com/ngi-nix/ngipkgs/tree/main/templates/project).

## Instructions

1. Copy the `templates/project/` template to the `projects/` directory and re-name it to be the same as the project.
1. Use the data from the `projects-old/<project_name>` entry,  to fit the template.
1. Remove any extra/unneeded things from the template that do not apply to the migrated project (e.g. a project has no services, ...).
1. Check that the code is valid by running the test locally:

```
# For examples
$ nix build .#checks.x86_64-linux.projects/<project_name>/nixos/examples/<example_name>

# For tests
$ nix build .#checks.x86_64-linux.projects/<project_name>/nixos/tests/<test_name>
```

5. Delete the `projects-old/<project_name>` directory and open a PR
Linked issue comments: user: login: khabdrick
created_at: 2025-03-27T09:19:57Z
body: @eljamm I can do this 
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-03-31T06:37:33Z
body: Hello @eljamm 
the scion old project doesn't have a test or example.
Am I supposed to develop that too? If yes, can you point me to a guide that can help me with the process?
author_association: CONTRIBUTOR
user: login: eljamm
created_at: 2025-03-31T08:05:33Z
body: Well, you're only supposed to move the things that are already there, but if you think it's easy to add an example and a test, then you could give that a try. You can take inspiration from other projects that do have them for what to put there. If you think it would take you much time then you don't need to bother with it.
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-04T15:39:10Z
body: It's not as easy as I thought. I don't know where to start from to implement them.
I think I will just send the pr of the migration.
author_association: CONTRIBUTOR
user: login: eljamm
created_at: 2025-04-04T15:40:55Z
body: It's alright. You can send the PR and we can discuss things there.
author_association: CONTRIBUTOR

Diff:
diff --git a/projects-old/SCION-1M/default.nix b/projects-old/SCION-1M/default.nix
deleted file mode 100644
index 3911adf2f..000000000
--- a/projects-old/SCION-1M/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  pkgs,
-  lib,
-  sources,
-}@args:
-{
-  packages = {
-    inherit (pkgs)
-      scion
-      scion-apps
-      scion-bootstrapper
-      ioq3-scion
-      pan-bindings
-      ;
-  };
-  nixos = {
-    modules.services.scion = "${sources.inputs.nixpkgs}/nixos/modules/services/networking/scion/scion.nix";
-    # TODO: unbreak
-    # tests.scion = "${sources.inputs.nixpkgs}/nixos/tests/scion/freestanding-deployment/default.nix";
-    tests = null;
-    examples = null;
-  };
-}
diff --git a/projects/SCION/default.nix b/projects/SCION/default.nix
new file mode 100644
index 000000000..b956be154
--- /dev/null
+++ b/projects/SCION/default.nix
@@ -0,0 +1,55 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+      "SCION-geo"
+    ];
+    links = {
+      docs = {
+        text = "SCION Documentation";
+        url = "https://docs.scion.org/en/latest/";
+      };
+      build = {
+        text = "Build from source";
+        url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+      };
+      tests = {
+        text = "Testing Tutorial";
+        url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+      };
+    };
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+      module = ./programs/basic/module.nix;
+      examples.basic = {
+        module = ./programs/basic/examples/basic.nix;
+        description = "";
+        tests.basic = import ./programs/basic/tests/basic.nix args;
+      };
+    };
+  };
+
+  nixos.modules.services = {
+    scion = {
+      name = "scion";
+      module = "${sources.inputs.nixpkgs}/nixos/modules/services/networking/scion/scion.nix";
+      # TODO: unbreak
+      # tests.scion = "${sources.inputs.nixpkgs}/nixos/tests/scion/freestanding-deployment/default.nix";
+    };
+  };
+}
diff --git a/projects/SCION/programs/basic/examples/basic.nix b/projects/SCION/programs/basic/examples/basic.nix
new file mode 100644
index 000000000..e90d7d82c
--- /dev/null
+++ b/projects/SCION/programs/basic/examples/basic.nix
@@ -0,0 +1,5 @@
+{ ... }:
+
+{
+  programs.scion.enable = true;
+}
diff --git a/projects/SCION/programs/basic/module.nix b/projects/SCION/programs/basic/module.nix
new file mode 100644
index 000000000..1cef7462c
--- /dev/null
+++ b/projects/SCION/programs/basic/module.nix
@@ -0,0 +1,24 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+let
+  cfg = config.programs.scion;
+in
+{
+  options.programs.scion = {
+    enable = lib.mkEnableOption "scion";
+  };
+
+  config = lib.mkIf cfg.enable {
+    environment.systemPackages = with pkgs; [
+      scion
+      scion-apps
+      # scion-bootstrapper # FIX: broken in nixpkgs
+      ioq3-scion
+      pan-bindings
+    ];
+  };
+}
diff --git a/projects/SCION/programs/basic/tests/basic.nix b/projects/SCION/programs/basic/tests/basic.nix
new file mode 100644
index 000000000..0b024900f
--- /dev/null
+++ b/projects/SCION/programs/basic/tests/basic.nix
@@ -0,0 +1,28 @@
+{
+  sources,
+  ...
+}:
+
+{
+  name = "scion";
+
+  nodes = {
+    machine =
+      { ... }:
+      {
+        imports = [
+          sources.modules.ngipkgs
+          sources.modules.programs.scion
+          sources.examples.SCION.basic
+        ];
+      };
+  };
+
+  testScript =
+    { nodes, ... }:
+    ''
+      start_all()
+
+      machine.succeed()
+    '';
+}


Reviews:
user: login: eljamm
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-04T16:15:27Z
user: login: eljamm
body: Thanks for addressing my comments @khabdrick. Hope you're doing better, now.
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T15:25:49Z
user: login: khabdrick
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T15:53:40Z
user: login: eljamm
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T16:17:21Z
user: login: eljamm
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T08:04:22Z
user: login: eljamm
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T08:05:19Z
user: login: eljamm
body: >  What else is left for this to be completed.

The [failing tests](https://buildbot.ngi.nixos.org/#/builders/199/builds/57) need to pass. That's why you need to build this locally first, as the [task instructs](https://github.com/ngi-nix/ngipkgs/issues/590#issue-2919621568):

```
$ nix build .#checks.x86_64-linux.projects/SCION/nixos/examples/basic
```

Also, please run `nix fmt` when you're done.
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T09:18:29Z
user: login: eljamm
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T13:21:08Z
user: login: eljamm
body: Nice! You're very very close to the finish line.
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T13:23:43Z
user: login: eljamm
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-10T07:07:02Z
user: login: eljamm
body: Looks good. Congrats @khabdrick!
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-10T07:54:39Z

Review comments:
diff_hunk: @@ -0,0 +1,48 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  # NOTE:
+  # - Check `projects/models.nix` for a more detailed project structure
+  # - Each program/service must have at least one example
+  # - Set attributes to `null` to indicate that they're needed, but not available
path: projects/SCION/default.nix
user: login: eljamm
body: This is just a not for guidance. Please remove it, @khabdrick 

```suggestion
```
created_at: 2025-04-04T16:11:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,48 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  # NOTE:
+  # - Check `projects/models.nix` for a more detailed project structure
+  # - Each program/service must have at least one example
+  # - Set attributes to `null` to indicate that they're needed, but not available
+  metadata = {
+    summary = "";
+    subgrants = [
+      "FooBar"
+      "FooBar-cli"
path: projects/SCION/default.nix
user: login: eljamm
body: Search for the project in the [NLnet projects page](https://nlnet.nl/project/) and include the URL handle for the things related to SCION (see [triaging template](https://github.com/ngi-nix/ngipkgs/blob/main/.github/ISSUE_TEMPLATE/project-triaging.yaml) for an example).
created_at: 2025-04-04T16:14:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,48 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  # NOTE:
+  # - Check `projects/models.nix` for a more detailed project structure
+  # - Each program/service must have at least one example
+  # - Set attributes to `null` to indicate that they're needed, but not available
+  metadata = {
+    summary = "";
+    subgrants = [
+      "FooBar"
+      "FooBar-cli"
+    ];
+  };
+
+  nixos.modules.programs = {
+    foobar = {
+      name = "foobar";
+      module = ./module.nix;
+      examples.foobar = {
+        module = ./example.nix;
+        description = "";
+        tests.basic = ./test.nix;
+      };
+      links = {
+        build = {
+          text = "FooBar Documentation";
+          url = "https://foo.bar/build";
+        };
+        test = {
+          text = "FooBar Documentation";
+          url = "https://foo.bar/test";
+        };
+      };
+    };
+
+    # needed, but not available
+    foobar-cli = null;
+  };
+
+  # NOTE: same structure as programs
path: projects/SCION/default.nix
user: login: eljamm
body: This note means that the structure of `nixos.modules.program` above needs to be copied here, if the project uses services.
created_at: 2025-04-04T16:14:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+    # module = ./module.nix;
path: projects/SCION/default.nix
user: login: eljamm
body: We have some packages in `projects-old/SCION-1M` which we can put in the `nixos.modules.programs.scion` module.

```suggestion
    module = ./programs/module.nix;
```

Inside `./programs/module.nix` (which you'd need to create):

```nix
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.programs.scion;
in
{
  options.programs.scion = {
    enable = lib.mkEnableOption "SCION";
  };

  config = lib.mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      scion
      scion-apps
      scion-bootstrapper
      ioq3-scion
      pan-bindings
    ];
  };
}
```
created_at: 2025-04-07T15:18:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+    # module = ./module.nix;
+    # examples.foobar = {
+    #   module = ./example.nix;
+    #   description = "";
+    #   tests.basic = ./test.nix;
path: projects/SCION/default.nix
user: login: eljamm
body: We can add some [basic example and test](https://github.com/ngi-nix/ngipkgs/tree/a60bfecaec243afe8af042ef061a0de3594f8025/templates/project/programs/_programName_), here
created_at: 2025-04-07T15:19:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+    # module = ./module.nix;
+    # examples.foobar = {
+    #   module = ./example.nix;
+    #   description = "";
+    #   tests.basic = ./test.nix;
+      };
+      links = {
+        build = {
path: projects/SCION/default.nix
user: login: eljamm
body: ```suggestion
        docs = {
```
created_at: 2025-04-07T15:19:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+    # module = ./module.nix;
+    # examples.foobar = {
+    #   module = ./example.nix;
+    #   description = "";
+    #   tests.basic = ./test.nix;
+      };
+      links = {
+        build = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
+    };
+
+  };
+
+  # NOTE: same structure as programs
path: projects/SCION/default.nix
user: login: eljamm
body: ```suggestion
```
created_at: 2025-04-07T15:19:54Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+    # module = ./module.nix;
+    # examples.foobar = {
+    #   module = ./example.nix;
+    #   description = "";
+    #   tests.basic = ./test.nix;
+      };
+      links = {
+        build = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
+    };
+
+  };
+
+  # NOTE: same structure as programs
+  nixos.modules.services = {
+    name = "service name";
+   # module = "./services/scion/module.nix";
path: projects/SCION/default.nix
user: login: eljamm
body: The module lives in nixpkgs:

```suggestion
   module = "${sources.inputs.nixpkgs}/nixos/modules/services/networking/scion/scion.nix";
```
created_at: 2025-04-07T15:20:36Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+    # module = ./module.nix;
+    # examples.foobar = {
+    #   module = ./example.nix;
+    #   description = "";
+    #   tests.basic = ./test.nix;
+      };
+      links = {
+        build = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
+    };
+
+  };
+
+  # NOTE: same structure as programs
+  nixos.modules.services = {
+    name = "service name";
+   # module = "./services/scion/module.nix";
+    links = {
+        build = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
path: projects/SCION/default.nix
user: login: eljamm
body: I think this might be redundant since they're the same links as `nixos.modules.programs`. We could just move them to the top-level `metadata.links`
created_at: 2025-04-07T15:23:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
path: projects/SCION/default.nix
user: login: eljamm
body: This won't appear in the NLnet project search, but it's also a SCION subgrant

```suggestion
      "SCION-geo"
    ];
```
created_at: 2025-04-07T15:24:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+    # module = ./module.nix;
+    # examples.foobar = {
+    #   module = ./example.nix;
+    #   description = "";
+    #   tests.basic = ./test.nix;
+      };
+      links = {
+        build = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
+    };
+
+  };
+
+  # NOTE: same structure as programs
+  nixos.modules.services = {
+    name = "service name";
+   # module = "./services/scion/module.nix";
+    links = {
+        build = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
path: projects/SCION/default.nix
user: login: khabdrick
body: When I move them, I can delete from both `nixos.modules.programs` and `nixos.modules.services`?
@eljamm 
created_at: 2025-04-07T15:53:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,66 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+    ];
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+    # module = ./module.nix;
+    # examples.foobar = {
+    #   module = ./example.nix;
+    #   description = "";
+    #   tests.basic = ./test.nix;
+      };
+      links = {
+        build = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
+    };
+
+  };
+
+  # NOTE: same structure as programs
+  nixos.modules.services = {
+    name = "service name";
+   # module = "./services/scion/module.nix";
+    links = {
+        build = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
path: projects/SCION/default.nix
user: login: eljamm
body: Yup
created_at: 2025-04-07T16:17:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,5 @@
+{ ... }:
+
+{
+  services.scoin.enable = true;
path: projects/SCION/programs/basic/examples/basic.nix
user: login: eljamm
body: Typo

```suggestion
  services.scion.enable = true;
```
created_at: 2025-04-08T08:01:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,14 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+let
+  cfg = config.programs.basic;
path: projects/SCION/programs/basic/module.nix
user: login: eljamm
body: ```suggestion
  cfg = config.programs.scion;
```
created_at: 2025-04-08T08:01:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,14 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+let
+  cfg = config.programs.basic;
+in
+{
+  options.programs.basic = {
+    enable = lib.mkEnableOption "scoin";
+  };
path: projects/SCION/programs/basic/module.nix
user: login: eljamm
body: Typos

```suggestion
  options.programs.scion = {
    enable = lib.mkEnableOption "scion";
  };
```
created_at: 2025-04-08T08:02:00Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,28 @@
+{
+  sources,
+  ...
+}:
+
+{
+  name = "scoin";
path: projects/SCION/programs/basic/tests/basic.nix
user: login: eljamm
body: ```suggestion
  name = "scion";
```
created_at: 2025-04-08T08:02:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,28 @@
+{
+  sources,
+  ...
+}:
+
+{
+  name = "scoin";
+
+  nodes = {
+    machine =
+      { ... }:
+      {
+        imports = [
+          sources.modules.ngipkgs
+          sources.modules.services.scoin
+          sources.examples.SCOIN.scoin
path: projects/SCION/programs/basic/tests/basic.nix
user: login: eljamm
body: ```suggestion
          sources.modules.services.scion
          sources.examples.SCION.scion
```
created_at: 2025-04-08T08:02:36Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,53 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+      "SCION-geo"
+    ];
+    links = {
+        docs = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+      module = ./programs/basic/module.nix;
+      examples.basic = {
+        module = ./programs/basic/examples/basic.nix;
+        description = "";
+        tests.basic = ./programs/basic/tests/basic.nix;
+      };
+      
+    };
+
path: projects/SCION/default.nix
user: login: eljamm
body: Removing these 2 empty lines makes the code look better 

```suggestion
      };
    };
```
created_at: 2025-04-08T08:04:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,53 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+      "SCION-geo"
+    ];
+    links = {
+        docs = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+      module = ./programs/basic/module.nix;
+      examples.basic = {
+        module = ./programs/basic/examples/basic.nix;
+        description = "";
+        tests.basic = ./programs/basic/tests/basic.nix;
path: projects/SCION/default.nix
user: login: eljamm
body: I know it's like this in the template, but it's still not fixed, yet. Thus, we need to:

```suggestion
        tests.basic = import ./programs/basic/tests/basic.nix args;
```
created_at: 2025-04-08T08:05:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,51 @@
+{
+  lib,
+  pkgs,
+  sources,
+}@args:
+{
+  metadata = {
+    summary = "SCION is a clean-slate Next-Generation Internet (NGI) architecture which offers a.o. multi-path and path-awareness capabilities by design.";
+    subgrants = [
+      "SCION-proxy"
+      "SCION-router-codealignment"
+      "Verified-SCION-router"
+      "SCION-Rains"
+      "SCION-Swarm"
+      "SCION-IPFS"
+      "SCION-1M"
+      "SCION-geo"
+    ];
+    links = {
+        docs = {
+          text = "SCION Documentation";
+          url = "https://docs.scion.org/en/latest/";
+        };
+        build = {
+          text = "Build from source";
+          url = "https://github.com/scionproto/scion?tab=readme-ov-file#build-from-sources";
+        };
+        tests = {
+          text = "Testing Tutorial";
+          url = "https://docs.scion.org/en/latest/tutorials/deploy.html#tasks-to-perform";
+        };
+      };
+  };
+
+  nixos.modules.programs = {
+    scion = {
+      name = "scion";
+      module = ./programs/basic/module.nix;
+      examples.basic = {
+        module = ./programs/basic/examples/basic.nix;
+        description = "";
+        tests.basic = import ./programs/basic/tests/basic.nix args;
+      };
+    };
+  };
+
+  nixos.modules.services = {
+    name = "service name";
+    module = "${sources.inputs.nixpkgs}/nixos/modules/services/networking/scion/scion.nix";
+  };
path: projects/SCION/default.nix
user: login: eljamm
body: The error message is your friend here. It says:

```
       "service name": expected type option<service>, but value does not conform to 'service': expected 'service'-struct, but found:
       expected type 'service', but value '"service name"' is of type 'string'
```

So we know something is wrong with `service name`. Checking the code, we see that we're trying to define `nixos.modules.services.name` as a service, but this doesn't conform to the structure of a service, which needs to be:

```suggestion
  nixos.modules.services = {
    scion = {
      name = "scion";
      module = "${sources.inputs.nixpkgs}/nixos/modules/services/networking/scion/scion.nix";
      examples.basic = null;
    };
  };
```
created_at: 2025-04-08T09:17:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,5 @@
+{ ... }:
+
+{
+  services.scion.enable = true;
path: projects/SCION/programs/basic/examples/basic.nix
user: login: eljamm
body: This will try to use the service's module instead of the program's

```suggestion
  programs.scion.enable = true;
```
created_at: 2025-04-08T09:17:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,28 @@
+{
+  sources,
+  ...
+}:
+
+{
+  name = "scion";
+
+  nodes = {
+    machine =
+      { ... }:
+      {
+        imports = [
+          sources.modules.ngipkgs
+          sources.modules.services.scion
path: projects/SCION/programs/basic/tests/basic.nix
user: login: eljamm
body: Use the program example instead of the service's since this is testing the programs

```suggestion
          sources.modules.programs.scion
```
created_at: 2025-04-08T09:18:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,28 @@
+{
+  sources,
+  ...
+}:
+
+{
+  name = "scion";
+
+  nodes = {
+    machine =
+      { ... }:
+      {
+        imports = [
+          sources.modules.ngipkgs
+          sources.modules.programs.scion
+          sources.examples.SCION.scion
path: projects/SCION/programs/basic/tests/basic.nix
user: login: eljamm
body: If we check the CI error, we can see that:

```
       error: attribute 'scion' missing
       at /nix/store/jgp4i0nik0h7i2b7sww3y9mkdrac55r8-source/projects/SCION/programs/basic/tests/basic.nix:16:11:
           15|           sources.modules.programs.scion
           16|           sources.examples.SCION.scion
             |           ^
           17|         ];
```           

And indeed if we go to line 39 in `default.nix`, we can see that the example's name is `basic`

```suggestion
          sources.examples.SCION.basic
```
created_at: 2025-04-08T13:21:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,14 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+let
+  cfg = config.programs.scion;
+in
+{
+  options.programs.scion = {
+    enable = lib.mkEnableOption "scion";
path: projects/SCION/programs/basic/module.nix
user: login: eljamm
body: Can you follow the [new template](https://github.com/ngi-nix/ngipkgs/blob/fe2fd0e1fe05b07ea41be8498ae237d6f1cdfde7/templates/project/programs/_programName_/module.nix#L15-L18) and add packages from `projects-old/SCION-1M` here? After you finish, delete that directory and commit your changes.
created_at: 2025-04-09T13:23:16Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,24 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+let
+  cfg = config.programs.scion;
+in
+{
+  options.programs.scion = {
+    enable = lib.mkEnableOption "scion";
+  };
+
+  config = lib.mkIf cfg.enable {
+    environment.systemPackages = with pkgs; [
+      scion
+      scion-apps
+      scion-bootstrapper
path: projects/SCION/programs/basic/module.nix
user: login: eljamm
body: ```suggestion
      # scion-bootstrapper # FIX: broken in nixpkgs
```
created_at: 2025-04-10T07:06:33Z
author_association: CONTRIBUTOR

PR comments:
user: login: eljamm
created_at: 2025-04-07T08:10:14Z
body: @khabdrick The project template [has been updated](https://github.com/ngi-nix/ngipkgs/tree/e7dd2a343cb3864772a3b1d441a9e40facea8876/templates/project). Is it more clear now?
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-07T13:19:55Z
body: @eljamm Heeey!
I'm sorry. I have been ill for the past few days. I am looking at all your input now.
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-07T14:57:01Z
body: Made some updates @eljamm 
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-07T15:46:13Z
body: > Thanks for addressing my comments @khabdrick. Hope you're doing better, now.

Yes I am, thank you.

author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-07T20:29:48Z
body: I have made the updates.
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-08T08:59:01Z
body: @eljamm sorry about so many typos. Didn't even realize.
What else is left for this to be completed.
author_association: CONTRIBUTOR
user: login: eljamm
created_at: 2025-04-08T13:29:46Z
body: Please always format the code with `nix fmt` before you commit.
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-09T10:56:23Z
body: ![image](https://github.com/user-attachments/assets/2ed7cd02-a503-494e-bd6b-8fdc5924e825)
Looks like it's okay now? @eljamm 
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-09T17:28:24Z
body: Done
author_association: CONTRIBUTOR
user: login: khabdrick
created_at: 2025-04-10T07:03:16Z
body: It seems like these packages are not available.
author_association: CONTRIBUTOR