@cryptotaxi247 / infra / commits / ba861803

caliban: run the nixpkgs-swh project

Every day, a sources.json file is generated. This file contains a description of all external source codes used by nixpkgs. This file can then be consumed by the Software Heritage infrastructure in order to archive our sources.

Antoine Eiche committed Aug 23, 2025 at 13:10 UTC ba861803c157c5c2623e902e4d4ec1b7519cee5f
5 files changed +60
dns/nixos.org.js
+1
@@ -104,6 +104,7 @@ D("nixos.org",
104 CNAME("chat", "caliban"),
105 CNAME("live", "caliban"),
106 CNAME("matrix", "caliban"),
107 + CNAME("nixpkgs-swh", "caliban"),
108 CNAME("survey", "caliban"),
109 CNAME("vault", "caliban"),
110 DMARC_BUILDER({
flake.lock
+21
@@ -404,6 +404,26 @@
404 "type": "github"
405 }
406 },
407 + "nixpkgs-swh": {
408 + "inputs": {
409 + "nixpkgs": [
410 + "nixpkgs"
411 + ]
412 + },
413 + "locked": {
414 + "lastModified": 1757256775,
415 + "narHash": "sha256-EHGEsqY8xxgeH46+5cfsydBiI57p5WurrUWoYJfo5hw=",
416 + "owner": "nix-community",
417 + "repo": "nixpkgs-swh",
418 + "rev": "5c6540373e7c21977131951615b016ccad540e31",
419 + "type": "github"
420 + },
421 + "original": {
422 + "owner": "nix-community",
423 + "repo": "nixpkgs-swh",
424 + "type": "github"
425 + }
426 + },
427 "nixpkgs-unstable": {
428 "locked": {
429 "lastModified": 1755829505,
@@ -452,6 +472,7 @@
472 "hydra": "hydra",
473 "nixos-channel-scripts": "nixos-channel-scripts",
474 "nixpkgs": "nixpkgs",
475 + "nixpkgs-swh": "nixpkgs-swh",
476 "nixpkgs-unstable": "nixpkgs-unstable",
477 "rfc39": "rfc39",
478 "simple-nixos-mailserver": "simple-nixos-mailserver",
flake.nix
+5
@@ -87,6 +87,11 @@
87 url = "github:Mic92/sops-nix";
88 inputs.nixpkgs.follows = "nixpkgs";
89 };
90 +
91 + nixpkgs-swh = {
92 + url = "github:nix-community/nixpkgs-swh";
93 + inputs.nixpkgs.follows = "nixpkgs";
94 + };
95 };
96 outputs =
97 inputs@{ flake-parts, ... }:
non-critical-infra/hosts/caliban/default.nix
+1
@@ -20,6 +20,7 @@
20 ../../modules/prometheus/node-exporter.nix
21 ../../modules/vaultwarden.nix
22 ./limesurvey-tmp.nix
23 + ./nixpkgs-swh.nix
24 ];
25
26 fileSystems."/boot-1" = {
non-critical-infra/hosts/caliban/nixpkgs-swh.nix new
+32
@@ -0,0 +1,32 @@
1 +{ inputs, config, ... }:
2 +let
3 + cfg = config;
4 +in
5 +{
6 + imports = [
7 + inputs.nixpkgs-swh.nixosModules.nixpkgs-swh
8 + ];
9 + config = {
10 + services = {
11 + nixpkgs-swh = {
12 + enable = true;
13 + };
14 + nginx = {
15 + enable = true;
16 + virtualHosts = {
17 + "nixpkgs-swh.nixos.org" = {
18 + enableACME = true;
19 + forceSSL = true;
20 +
21 + locations."/" = {
22 + root = cfg.services.nixpkgs-swh.outputDir;
23 + extraConfig = ''
24 + autoindex on;
25 + '';
26 + };
27 + };
28 + };
29 + };
30 + };
31 + };
32 +}