summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/apt-cacher-ng.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules/apt-cacher-ng.nix')
-rw-r--r--krebs/3modules/apt-cacher-ng.nix69
1 files changed, 35 insertions, 34 deletions
diff --git a/krebs/3modules/apt-cacher-ng.nix b/krebs/3modules/apt-cacher-ng.nix
index c2c2f2661..9224c72a0 100644
--- a/krebs/3modules/apt-cacher-ng.nix
+++ b/krebs/3modules/apt-cacher-ng.nix
@@ -6,40 +6,41 @@ let
name = "acng-configuration";
destination = "/acng.conf";
text = ''
- ForeGround: 1
- CacheDir: ${cfg.cacheDir}
- LogDir: ${cfg.logDir}
- PidFile: /var/run/apt-cacher-ng.pid
- ExTreshold: ${toString cfg.cacheExpiration}
-
- Port: ${toString cfg.port}
- BindAddress: ${cfg.bindAddress}
-
- # defaults:
- Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
- Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu
- Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol
- Remap-cygwin: file:cygwin_mirrors /cygwin
- Remap-sfnet: file:sfnet_mirrors
- Remap-alxrep: file:archlx_mirrors /archlinux
- Remap-fedora: file:fedora_mirrors
- Remap-epel: file:epel_mirrors
- Remap-slrep: file:sl_mirrors # Scientific Linux
- Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo
-
- ReportPage: acng-report.html
- SupportDir: ${pkgs.apt-cacher-ng}/lib/apt-cacher-ng
- LocalDirs: acng-doc ${pkgs.apt-cacher-ng}/share/doc/apt-cacher-ng
-
- # Nix cache
- ${optionalString cfg.enableNixCache ''
- Remap-nix: http://cache.nixos.org /nixos ; https://cache.nixos.org
- PfilePatternEx: (^|.*?/).*\.narinfo(|\.gz|\.xz|\.bz2)$
- VfilePatternEx: (^|.*?/)nix-cache-info$
- ''}
-
- ${cfg.extraConfig}
- ''; };
+ ForeGround: 1
+ CacheDir: ${cfg.cacheDir}
+ LogDir: ${cfg.logDir}
+ PidFile: /var/run/apt-cacher-ng.pid
+ ExTreshold: ${toString cfg.cacheExpiration}
+
+ Port: ${toString cfg.port}
+ BindAddress: ${cfg.bindAddress}
+
+ # defaults:
+ Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
+ Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu
+ Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol
+ Remap-cygwin: file:cygwin_mirrors /cygwin
+ Remap-sfnet: file:sfnet_mirrors
+ Remap-alxrep: file:archlx_mirrors /archlinux
+ Remap-fedora: file:fedora_mirrors
+ Remap-epel: file:epel_mirrors
+ Remap-slrep: file:sl_mirrors # Scientific Linux
+ Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo
+
+ ReportPage: acng-report.html
+ SupportDir: ${pkgs.apt-cacher-ng}/lib/apt-cacher-ng
+ LocalDirs: acng-doc ${pkgs.apt-cacher-ng}/share/doc/apt-cacher-ng
+
+ # Nix cache
+ ${optionalString cfg.enableNixCache ''
+ Remap-nix: http://cache.nixos.org /nixos ; https://cache.nixos.org
+ PfilePatternEx: (^|.*?/).*\.narinfo(|\.gz|\.xz|\.bz2)$
+ VfilePatternEx: (^|.*?/)nix-cache-info$
+ ''}
+
+ ${cfg.extraConfig}
+ '';
+ };
acng-home = "/var/cache/acng";
cfg = config.krebs.apt-cacher-ng;