]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Refactor paste
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 7 Oct 2021 13:24:15 +0000 (15:24 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 15 Oct 2021 21:15:57 +0000 (23:15 +0200)
flakes/private/paste/flake.lock
flakes/private/paste/flake.nix
modules/default.nix

index 939d589a3b11f137d0ea26465fe0f42387dbb6e0..6ad428c9ac69b120626ed8e9c8977ccad8e678a9 100644 (file)
         "type": "github"
       }
     },
+    "my-lib": {
+      "inputs": {
+        "nixpkgs": "nixpkgs"
+      },
+      "locked": {
+        "narHash": "sha256-HGNP1eH7b42BxViYx/F3ZPO9CM1X+5qfA9JoP2ArN+s=",
+        "path": "../../lib",
+        "type": "path"
+      },
+      "original": {
+        "path": "../../lib",
+        "type": "path"
+      }
+    },
     "nix-lib": {
       "locked": {
-        "lastModified": 1631655525,
-        "narHash": "sha256-8U7zAdbjNItXo6eqI/rhtOa3LUPGD6yE9PTZQkrSGHo=",
+        "lastModified": 1632955135,
+        "narHash": "sha256-MyOBftnLv5UcPCL4AzvlyNEDwGD2cGGM9HMEOno/MZw=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "cf0caf529c33c140863ebfa43691f7b69fe2233c",
+        "rev": "a4d96cd808f13d924988938ecf9a46b2a2787fa3",
         "type": "github"
       },
       "original": {
         "type": "github"
       }
     },
+    "nixpkgs_2": {
+      "locked": {
+        "lastModified": 1631570365,
+        "narHash": "sha256-vc6bfo0hijpicdUDiui2DvZXmpIP2iqOFZRcpMOuYPo=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "df7113c0727881519248d4c7d080324e0ee3327b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
     "paste": {
       "inputs": {
         "flake-utils": "flake-utils",
-        "nixpkgs": "nixpkgs"
+        "nixpkgs": "nixpkgs_2"
       },
       "locked": {
-        "narHash": "sha256-oSabBrUGIkY8lKktXlIM4uYSVYI54wKnIjjVZwMOd70=",
+        "narHash": "sha256-2ylI42ZHfzW6oCsxfFyHf5zVnDsPMwvJCACtcdErtPg=",
         "path": "../../paste",
         "type": "path"
       },
@@ -62,6 +91,7 @@
     },
     "root": {
       "inputs": {
+        "my-lib": "my-lib",
         "nix-lib": "nix-lib",
         "paste": "paste"
       }
index 71314e8d28d08d055a2f7267fdc20255977708b7..23f8cd378ada66cbd08bbdc83d6f278d9857b116 100644 (file)
@@ -3,12 +3,19 @@
     path = "../../paste";
     type = "path";
   };
+  inputs.my-lib = {
+    path = "../../lib";
+    type = "path";
+  };
   inputs.nix-lib.url = "github:NixOS/nixpkgs";
 
   description = "Private configuration for paste";
-  outputs = { self, nix-lib, paste }:
+  outputs = { self, my-lib, nix-lib, paste }:
     let
       cfg = name': { config, lib, pkgs, name, ... }: {
+        imports = [
+          (my-lib.lib.withNarKey paste "nixosModule")
+        ];
         config = lib.mkIf (name == name') {
           services.paste = {
             enable = true;
index 11b3081631df78b4e4ec14c20fd0132171aeba08..630e8f500da61c0e3c54435c6e6a9eb8017038c4 100644 (file)
@@ -14,7 +14,7 @@ in
   mediagoblin = ./webapps/mediagoblin.nix;
   peertube = (flakeCompat ../flakes/peertube).nixosModule;
   fiche = ./webapps/fiche.nix;
-  paste = (flakeCompat ../flakes/paste).nixosModule;
+  paste = flakeLib.withNarKeyCompat flakeCompat ../flakes/paste "nixosModule";
 
   opendmarc = flakeLib.withNarKeyCompat flakeCompat ../flakes/opendmarc "nixosModule";
   openarc = flakeLib.withNarKeyCompat flakeCompat ../flakes/openarc "nixosModule";