]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - overlays/nixops/default.nix
Migrate caldance configuration to nixos
[perso/Immae/Config/Nix.git] / overlays / nixops / default.nix
index 247d0366fa762edff49257b709d5576aee26befd..a2976850fa713518ef25f194b55dfebd61bb9b23 100644 (file)
@@ -1,7 +1,18 @@
 self: super: {
   nixops = super.nixops.overrideAttrs (old: {
-    patches = [ ./hetzner_cloud.patch ];
+    patches = [
+        ./fix_glibc.patch
+        (self.fetchpatch {
+          name = "hetzner_cloud.patch";
+          url = "https://github.com/goodraven/nixops/commit/272e50d0b0262e49cdcaad42cdab57aad183d1c2.patch";
+          sha256 = "12wcrb0155ald52m7fbr2m5rrxdnwdwripq91ckscgsk42mdc517";
+        })
+       ];
     preConfigure = (old.preConfigure or "") + ''
+      # https://github.com/NixOS/nixops/issues/1216
+      sed -i -e "/Register the paths in the Nix database./s/#.*$/export USER=root/" nix/libvirtd-image.nix
+
+      sed -i -e '/^import sys$/s/$/; sys.tracebacklimit = 0/' scripts/nixops
       sed -i -e "/'keyFile'/s/'path'/'string'/" nixops/backends/__init__.py
       '';
   });