]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Refactor flakes using follows
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 22 Aug 2021 23:50:09 +0000 (01:50 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 23 Aug 2021 22:49:51 +0000 (00:49 +0200)
18 files changed:
DOCUMENTATION.md
flakes/libspf2/default.nix [new file with mode: 0644]
flakes/libspf2/flake.nix
flakes/openarc/default.nix [new file with mode: 0644]
flakes/openarc/flake.lock
flakes/openarc/flake.nix
flakes/opendmarc/default.nix [new file with mode: 0644]
flakes/opendmarc/flake.lock
flakes/opendmarc/flake.nix
flakes/peertube/client.nix
flakes/peertube/default.nix [new file with mode: 0644]
flakes/peertube/flake.lock
flakes/peertube/flake.nix
flakes/peertube/server.nix
flakes/private/openarc/flake.lock
flakes/private/openarc/flake.nix
flakes/private/opendmarc/flake.lock
flakes/private/opendmarc/flake.nix

index 50eeca43fbb8e2740d58cf6cb48d3f5d1144f24c..6c68680bf891a1eaab93b482da3715fa59b7cf0f 100644 (file)
@@ -255,3 +255,21 @@ Nextcloud
   ```
 - Issues :
   https://docs.nextcloud.com/server/16/admin_manual/maintenance/manual_upgrade.html
+
+Flakes
+------
+
+Due to a bug in nix build, flakes that refer to relative path (input
+type "path") don't work when called via an url (nix build git+ssh://some-url).
+Relative paths (except in "flakes/private") should be renamed to
+git+https urls ideally. E.g.:
+```
+    inputs.libspf2 = {
+-    path = "../libspf2";
+-    type = "path";
++    url = "https://git.immae.eu/perso/Immae/Config/Nix.git";
++    type = "git";
++    dir = "flakes/libspf2";
+    };
+```
+
diff --git a/flakes/libspf2/default.nix b/flakes/libspf2/default.nix
new file mode 100644 (file)
index 0000000..a9e5ec3
--- /dev/null
@@ -0,0 +1,34 @@
+{ fetchpatch, file, fetchurl, libnsl, stdenv, lib }:
+stdenv.mkDerivation rec {
+  pname = "libspf2";
+  version = "1.2.10";
+
+  patches = [
+    (fetchpatch {
+      name = "fix-variadic-macros.patch";
+      url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/fix-variadic-macros.patch?h=packages/libspf2";
+      sha256 = "00dqpcgjr9jy2qprgqv2qiyvq8y3wlz4yns9xzabf2064jzqh2ic";
+    })
+  ];
+  preConfigure = ''
+    sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure
+    '';
+  configureFlags = [
+    "--enable-static"
+  ];
+  postInstall = ''
+    rm $out/bin/*_static
+    '';
+  src = fetchurl {
+    url = "https://www.libspf2.org/spf/${pname}-${version}.tar.gz";
+    sha256 = "1j91p0qiipzf89qxq4m1wqhdf01hpn1h5xj4djbs51z23bl3s7nr";
+  };
+
+  buildInputs = [ libnsl ];
+
+  meta = {
+    description = "Sender Policy Framework record checking library";
+    homepage = "https://www.libspf2.org/";
+    platforms = lib.platforms.linux;
+  };
+}
index 276b13838b6409f24bd9d651f37b6c7badecc816..af1deea9567c260e1cc3f01ea87373830ab71c04 100644 (file)
@@ -7,48 +7,22 @@
   outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachSystem ["aarch64-linux" "i686-linux" "x86_64-linux"] (system:
     let
       pkgs = import nixpkgs { inherit system; overlays = []; };
-      inherit (pkgs) stdenv file fetchurl fetchpatch libnsl;
+      libspf2 = pkgs.callPackage ./. {};
     in rec {
-      packages.libspf2 = stdenv.mkDerivation rec {
-        pname = "libspf2";
-        version = "1.2.10";
-
-        patches = [
-          (fetchpatch {
-            name = "fix-variadic-macros.patch";
-            url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/fix-variadic-macros.patch?h=packages/libspf2";
-            sha256 = "00dqpcgjr9jy2qprgqv2qiyvq8y3wlz4yns9xzabf2064jzqh2ic";
-          })
-        ];
-        preConfigure = ''
-          sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure
-          '';
-        configureFlags = [
-          "--enable-static"
-        ];
-        postInstall = ''
-          rm $out/bin/*_static
-          '';
-        src = fetchurl {
-          url = "https://www.libspf2.org/spf/${pname}-${version}.tar.gz";
-          sha256 = "1j91p0qiipzf89qxq4m1wqhdf01hpn1h5xj4djbs51z23bl3s7nr";
-        };
-
-        buildInputs = [ libnsl ];
-
-        meta = {
-          description = "Sender Policy Framework record checking library";
-          homepage = "https://www.libspf2.org/";
-          platforms = stdenv.lib.platforms.linux;
-        };
-      };
-
-      defaultPackage = packages.libspf2;
-      legacyPackages.libfspf2 = packages.libspf2;
-      apps.libspf2 = flake-utils.lib.mkApp { drv = packages.libspf2; name = "spfquery"; };
+      packages.libspf2 = libspf2;
+      defaultPackage = libspf2;
+      legacyPackages.libfspf2 = libspf2;
+      apps.libspf2 = flake-utils.lib.mkApp { drv = libspf2; name = "spfquery"; };
       defaultApp = apps.libspf2;
-      checks.build = defaultPackage;
-      hydraJobs.build = packages.libspf2;
+      checks.build = libspf2;
+      hydraJobs.build = libspf2;
     }
-  );
+  ) // rec {
+    overlays = {
+      libspf2 = final: prev: {
+        libspf2 = self.defaultPackage."${final.system}";
+      };
+    };
+    overlay = overlays.libspf2;
+  };
 }
diff --git a/flakes/openarc/default.nix b/flakes/openarc/default.nix
new file mode 100644 (file)
index 0000000..c6d74c6
--- /dev/null
@@ -0,0 +1,20 @@
+{ stdenv, automake, autoconf, libbsd, libtool, openssl, pkg-config, libmilter, file, lib, src }:
+stdenv.mkDerivation rec {
+  pname = "openarc";
+  version = "master-${src.shortRev or "unknown"}";
+  inherit src;
+  buildInputs = [ automake autoconf libbsd libtool openssl pkg-config libmilter ];
+
+  configureFlags = [
+    "--with-milter=${libmilter}"
+  ];
+  preConfigure = ''
+  autoreconf --force --install
+  sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure
+  '';
+  meta = {
+    description = "Open source ARC implementation";
+    homepage = "https://github.com/trusteddomainproject/OpenARC";
+    platforms = lib.platforms.unix;
+  };
+}
index 78c0fbacfbab6b452f76d803b2caddb30185fe4f..e0b78a8f1e17a00b89b19a089d1deeca2a44aa43 100644 (file)
     "myuids": {
       "locked": {
         "dir": "flakes/myuids",
-        "lastModified": 1609281959,
-        "narHash": "sha256-SYNlHeobQAzTzK0pM5AqMn7M2WbTuzBeoD+Q3Mu+sho=",
+        "lastModified": 1628207001,
+        "narHash": "sha256-7e12OfDv9zMOfqcAlsk1sZj2l3ZB03kcBdWUqhwVaWo=",
         "ref": "master",
-        "rev": "1be9e64bb4556676f65e6e5044e04426848849c0",
-        "revCount": 791,
+        "rev": "dfe02d8fd52e33c7d4e1a209cf486696100b88f3",
+        "revCount": 865,
         "type": "git",
         "url": "https://git.immae.eu/perso/Immae/Config/Nix.git"
       },
index fbb7fb13a8bc72bc18b7a0200d013b4897e1b8cf..f47afcf0ee4d30dc4587a2cf99414c58839a9b94 100644 (file)
 
   outputs = { self, myuids, openarc, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system:
     let
-      lock = builtins.fromJSON (builtins.readFile ./flake.lock);
       pkgs = import nixpkgs { inherit system; overlays = []; };
-      inherit (pkgs) stdenv automake autoconf libbsd libtool openssl pkg-config libmilter file;
     in rec {
-      packages.openarc = stdenv.mkDerivation rec {
-        pname = "openarc";
-        version = "master-${builtins.substring 0 7 lock.nodes.openarc.locked.rev}";
-        src = openarc;
-        buildInputs = [ automake autoconf libbsd libtool openssl pkg-config libmilter ];
-
-        configureFlags = [
-          "--with-milter=${libmilter}"
-        ];
-        preConfigure = ''
-        autoreconf --force --install
-        sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure
-        '';
-        meta = {
-          description = "Open source ARC implementation";
-          homepage = "https://github.com/trusteddomainproject/OpenARC";
-          platforms = stdenv.lib.platforms.unix;
-        };
-      };
-
+      packages.openarc = pkgs.callPackage ./. { src = openarc; };
       defaultPackage = packages.openarc;
       legacyPackages.openarc = packages.openarc;
       apps.openarc = flake-utils.lib.mkApp { drv = packages.openarc; };
             '';
           };
         };
-    }) // {
+    }) // rec {
+      overlays = {
+        openarc = final: prev: {
+          openarc = self.defaultPackage."${final.system}";
+        };
+      };
+      overlay = overlays.openarc;
       nixosModule = { config, lib, pkgs, ... }:
         let
           cfg = config.services.openarc;
diff --git a/flakes/opendmarc/default.nix b/flakes/opendmarc/default.nix
new file mode 100644 (file)
index 0000000..53c1fe2
--- /dev/null
@@ -0,0 +1,25 @@
+{ stdenv, lib, libspf2, libbsd, openssl, libmilter, perl, libnsl, fetchurl }:
+stdenv.mkDerivation rec {
+  pname = "opendmarc";
+  version = "1.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/opendmarc/files/${pname}-${version}.tar.gz";
+    sha256 = "1yrggj8yq0915y2i34gfz2xpl1w2lgb1vggp67rwspgzm40lng11";
+  };
+
+  configureFlags= [
+    "--with-spf"
+    "--with-spf2-include=${libspf2}/include/spf2"
+    "--with-spf2-lib=${libspf2}/lib/"
+    "--with-milter=${libmilter}"
+  ];
+
+  buildInputs = [ libspf2 libbsd openssl libmilter perl libnsl ];
+
+  meta = {
+    description = "Free open source software implementation of the DMARC specification";
+    homepage = "http://www.trusteddomain.org/opendmarc/";
+    platforms = lib.platforms.unix;
+  };
+}
index 9e6a869e21fddf92a44fdf1ec37ce05c204740cc..0bd645c55bb2f1bd094b2d357f6850557050b20e 100644 (file)
     "libspf2": {
       "inputs": {
         "flake-utils": "flake-utils_2",
-        "nixpkgs": "nixpkgs"
+        "nixpkgs": [
+          "nixpkgs"
+        ]
       },
       "locked": {
-        "dir": "flakes/libspf2",
-        "lastModified": 1609548509,
-        "narHash": "sha256-d9gssVdKV0EaeDU/L5QgQpQwFuxWMbwNQ71i7z4LdDs=",
-        "ref": "master",
-        "rev": "749623765bef80615fc21e73aff89521d262e277",
-        "revCount": 796,
-        "type": "git",
-        "url": "https://git.immae.eu/perso/Immae/Config/Nix.git"
+        "narHash": "sha256-q6JJxHV1hyMQlqsqFFTFeUyiH6HsVZJ3GYxXODybPfM=",
+        "path": "../libspf2",
+        "type": "path"
       },
       "original": {
-        "dir": "flakes/libspf2",
-        "type": "git",
-        "url": "https://git.immae.eu/perso/Immae/Config/Nix.git"
+        "path": "../libspf2",
+        "type": "path"
       }
     },
     "myuids": {
       "locked": {
-        "dir": "flakes/myuids",
-        "lastModified": 1609548509,
-        "narHash": "sha256-d9gssVdKV0EaeDU/L5QgQpQwFuxWMbwNQ71i7z4LdDs=",
-        "ref": "master",
-        "rev": "749623765bef80615fc21e73aff89521d262e277",
-        "revCount": 796,
-        "type": "git",
-        "url": "https://git.immae.eu/perso/Immae/Config/Nix.git"
+        "narHash": "sha256-GUYJUFgSpffirdUSwZ1r/NyAQkBkVxgH6fEaOvtyGiI=",
+        "path": "../myuids",
+        "type": "path"
       },
       "original": {
-        "dir": "flakes/myuids",
-        "type": "git",
-        "url": "https://git.immae.eu/perso/Immae/Config/Nix.git"
+        "path": "../myuids",
+        "type": "path"
       }
     },
     "nixpkgs": {
         "type": "github"
       }
     },
-    "nixpkgs_2": {
-      "locked": {
-        "lastModified": 1597943282,
-        "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
     "root": {
       "inputs": {
         "flake-utils": "flake-utils",
         "libspf2": "libspf2",
         "myuids": "myuids",
-        "nixpkgs": "nixpkgs_2"
+        "nixpkgs": "nixpkgs"
       }
     }
   },
index e80376ffdfe9ebf3a27f7cce8c0b950d7b6f1f40..bf7bd5bc714f1680e11763ebde4d280060d19bee 100644 (file)
     url = "https://git.immae.eu/perso/Immae/Config/Nix.git";
     type = "git";
     dir = "flakes/libspf2";
+    inputs.nixpkgs.follows = "nixpkgs";
   };
   inputs.flake-utils.url = "github:numtide/flake-utils";
   inputs.nixpkgs.url = "github:NixOS/nixpkgs";
 
   outputs = { self, myuids, libspf2, flake-utils, nixpkgs }: flake-utils.lib.eachSystem ["aarch64-linux" "i686-linux" "x86_64-linux"] (system:
     let
-      libspf2' = libspf2.defaultPackage."${system}";
-      pkgs = import nixpkgs { inherit system; overlays = []; };
-      inherit (pkgs) fetchurl stdenv libbsd perl openssl libmilter file libnsl;
+      pkgs = import nixpkgs { inherit system; overlays = [ libspf2.overlay ]; };
     in rec {
-      packages.opendmarc = stdenv.mkDerivation rec {
-        pname = "opendmarc";
-        version = "1.3.2";
-
-        src = fetchurl {
-          url = "mirror://sourceforge/opendmarc/files/${pname}-${version}.tar.gz";
-          sha256 = "1yrggj8yq0915y2i34gfz2xpl1w2lgb1vggp67rwspgzm40lng11";
-        };
-
-        configureFlags= [
-          "--with-spf"
-          "--with-spf2-include=${libspf2'}/include/spf2"
-          "--with-spf2-lib=${libspf2'}/lib/"
-          "--with-milter=${libmilter}"
-        ];
-
-        buildInputs = [ libspf2' libbsd openssl libmilter perl libnsl ];
-
-        meta = {
-          description = "Free open source software implementation of the DMARC specification";
-          homepage = "http://www.trusteddomain.org/opendmarc/";
-          platforms = stdenv.lib.platforms.unix;
-        };
-      };
-
+      packages.opendmarc = pkgs.callPackage ./. {};
       defaultPackage = packages.opendmarc;
       legacyPackages.opendmarc = packages.opendmarc;
       apps.opendmarc = flake-utils.lib.mkApp { drv = packages.opendmarc; };
             '';
           };
         };
-    }) // {
+    }) // rec {
+     overlays = {
+       opendmarc = final: prev: {
+         opendmarc = self.defaultPackage."${final.system}";
+       };
+     };
+     overlay = overlays.opendmarc;
      nixosModule = { config, lib, pkgs, ... }:
        let
          cfg = config.services.opendmarc;
index 06383a75bbd3badd965e35fe2f6bd6262dde351e..1501574c1fa57618b7ee0446e75265d98f6c9df0 100644 (file)
@@ -1,8 +1,8 @@
-{ yarnModulesConfig, mkYarnModules', server, sources, version, nodejs, stdenv }:
+{ yarnModulesConfig, mkYarnModules', server, sources, nodejs, stdenv }:
 rec {
   modules = mkYarnModules' rec {
     pname = "peertube-client-yarn-modules";
-    inherit version;
+    inherit (sources) version;
     name = "${pname}-${version}";
     packageJSON = "${sources}/client/package.json";
     yarnLock = "${sources}/client/yarn.lock";
@@ -10,7 +10,7 @@ rec {
   };
   dist = stdenv.mkDerivation {
     pname = "peertube-client";
-    inherit version;
+    inherit (sources) version;
     src = sources;
     buildPhase = ''
           ln -s ${server.modules}/node_modules .
diff --git a/flakes/peertube/default.nix b/flakes/peertube/default.nix
new file mode 100644 (file)
index 0000000..8ba0c5f
--- /dev/null
@@ -0,0 +1,41 @@
+{ stdenv, lib, src, server, client }:
+stdenv.mkDerivation rec {
+  inherit (src) version;
+  pname = "peertube";
+  inherit src;
+  buildPhase = ''
+    ln -s ${server.modules}/node_modules .
+    rm -rf dist && cp -a ${server.dist}/dist dist
+    rm -rf client/dist && cp -a ${client.dist}/dist client/
+    '';
+  installPhase = ''
+    mkdir $out
+    cp -a * $out
+    ln -s /tmp $out/.cache
+    '';
+
+  meta = {
+    description = "A free software to take back control of your videos";
+
+    longDescription = ''
+      PeerTube aspires to be a decentralized and free/libre alternative to video
+      broadcasting services.
+      PeerTube is not meant to become a huge platform that would centralize
+      videos from all around the world. Rather, it is a network of
+      inter-connected small videos hosters.
+      Anyone with a modicum of technical skills can host a PeerTube server, aka
+      an instance. Each instance hosts its users and their videos. In this way,
+      every instance is created, moderated and maintained independently by
+      various administrators.
+      You can still watch from your account videos hosted by other instances
+      though if the administrator of your instance had previously connected it
+      with other instances.
+    '';
+
+    license = lib.licenses.agpl3Plus;
+
+    homepage = "https://joinpeertube.org/";
+
+    platforms = lib.platforms.unix;
+  };
+}
index b6fc1d02f89f909b0eda62a9fe8fdaac0bd27623..618711542b4150c5d40d55c3d3dde48760d8f9c9 100644 (file)
     "myuids": {
       "locked": {
         "dir": "flakes/myuids",
-        "lastModified": 1611091761,
-        "narHash": "sha256-fE3FBeUxVaMezKjEpepdQW9apOza+0AfBALFhaaD0VA=",
+        "lastModified": 1628207001,
+        "narHash": "sha256-7e12OfDv9zMOfqcAlsk1sZj2l3ZB03kcBdWUqhwVaWo=",
         "ref": "master",
-        "rev": "23f9fdf03a6673dbe334ae33be4f498cc4753191",
-        "revCount": 802,
+        "rev": "dfe02d8fd52e33c7d4e1a209cf486696100b88f3",
+        "revCount": 865,
         "type": "git",
         "url": "https://git.immae.eu/perso/Immae/Config/Nix.git"
       },
index 2a594c0ea8be099325532059b96d5de56aba91c8..9a5c55746353b1c32d3ef5eadfa806c8f62d8370 100644 (file)
@@ -14,7 +14,6 @@
 
   outputs = { self, myuids, nixpkgs, peertube, flake-utils }: flake-utils.lib.eachSystem ["x86_64-linux"] (system:
     let
-      version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.peertube.locked.rev;
       pkgs = import nixpkgs { inherit system; overlays = [
         (self: super: { nodejs = self.nodejs-12_x; })
       ]; };
@@ -22,7 +21,7 @@
 
       patchedSource = stdenv.mkDerivation {
         pname = "peertube";
-        inherit version;
+        version = peertube.rev;
         src = peertube;
         phases = [ "unpackPhase" "patchPhase" "installPhase" ];
         patches = [ ./fix_yarn_lock.patch ];
       });
 
       server = callPackage ./server.nix {
-        inherit version yarnModulesConfig mkYarnModules';
+        inherit yarnModulesConfig mkYarnModules';
         sources = patchedSource;
       };
       client = callPackage ./client.nix {
-        inherit server version yarnModulesConfig mkYarnModules';
+        inherit server yarnModulesConfig mkYarnModules';
         sources = patchedSource;
       };
 
     in rec {
-      packages.peertube = stdenv.mkDerivation rec {
-        inherit version;
-        pname = "peertube";
-        src = patchedSource;
-        buildPhase = ''
-          ln -s ${server.modules}/node_modules .
-          rm -rf dist && cp -a ${server.dist}/dist dist
-          rm -rf client/dist && cp -a ${client.dist}/dist client/
-          '';
-        installPhase = ''
-          mkdir $out
-          cp -a * $out
-          ln -s /tmp $out/.cache
-          '';
-
-        meta = {
-          description = "A free software to take back control of your videos";
-
-          longDescription = ''
-            PeerTube aspires to be a decentralized and free/libre alternative to video
-            broadcasting services.
-            PeerTube is not meant to become a huge platform that would centralize
-            videos from all around the world. Rather, it is a network of
-            inter-connected small videos hosters.
-            Anyone with a modicum of technical skills can host a PeerTube server, aka
-            an instance. Each instance hosts its users and their videos. In this way,
-            every instance is created, moderated and maintained independently by
-            various administrators.
-            You can still watch from your account videos hosted by other instances
-            though if the administrator of your instance had previously connected it
-            with other instances.
-          '';
-
-          license = stdenv.lib.licenses.agpl3Plus;
-
-          homepage = "https://joinpeertube.org/";
-
-          platforms = stdenv.lib.platforms.unix;
-        };
-      };
+      packages.peertube = callPackage ./. { inherit server client; src = patchedSource; };
       defaultPackage = packages.peertube;
       legacyPackages.peertube = packages.peertube;
       checks = {
           };
       };
     }
-  ) // {
+  ) // rec {
+    overlays = {
+      peertube = final: prev: {
+        peertube = self.defaultPackage."${final.system}";
+      };
+    };
+    overlay = overlays.peertube;
     nixosModule = { lib, pkgs, config, ... }:
       let
         name = "peertube";
index 1bba06d56dfc5b2f6a1d2e8a61b0e1ecbdaf383a..26348cc06cae4edac040640483e26ad3f682d349 100644 (file)
@@ -1,8 +1,8 @@
-{ yarnModulesConfig, mkYarnModules', sources, version, nodejs, stdenv }:
+{ yarnModulesConfig, mkYarnModules', sources, nodejs, stdenv }:
 rec {
   modules = mkYarnModules' rec {
     pname = "peertube-server-yarn-modules";
-    inherit version;
+    inherit (sources) version;
     name = "${pname}-${version}";
     packageJSON = "${sources}/package.json";
     yarnLock = "${sources}/yarn.lock";
@@ -10,7 +10,7 @@ rec {
   };
   dist = stdenv.mkDerivation {
     pname = "peertube-server";
-    inherit version;
+    inherit (sources) version;
     src = sources;
     buildPhase = ''
       ln -s ${modules}/node_modules .
index b1ec2b5f8688e6b134f942a003e55e0d5673e260..854f73f8630b6042fb6339d8719a886dd9f90ac4 100644 (file)
         "url": "https://git.immae.eu/perso/Immae/Config/Nix.git"
       }
     },
-    "nixpkgs": {
+    "nix-lib": {
       "locked": {
-        "lastModified": 1611218116,
-        "narHash": "sha256-CcyGZ8cLlHgiViWyBjRIjdsdRZxJjP2MgtWeuqSv3CE=",
+        "lastModified": 1629671097,
+        "narHash": "sha256-OKwGVcFaW0M4Su5NlwmUjubbsRCwbmPP1rNPtHd82As=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "30ab92ea31f6b7e9095b1e7e4b56a5000823efdf",
+        "rev": "82d05e980543e1703cbfd3b5ccd1fdcd4b0f1f00",
         "type": "github"
       },
       "original": {
@@ -47,7 +47,7 @@
         "type": "github"
       }
     },
-    "nixpkgs_2": {
+    "nixpkgs": {
       "locked": {
         "lastModified": 1597943282,
         "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=",
@@ -66,7 +66,7 @@
       "inputs": {
         "flake-utils": "flake-utils",
         "myuids": "myuids",
-        "nixpkgs": "nixpkgs_2",
+        "nixpkgs": "nixpkgs",
         "openarc": "openarc_2"
       },
       "locked": {
@@ -97,7 +97,7 @@
     },
     "root": {
       "inputs": {
-        "nixpkgs": "nixpkgs",
+        "nix-lib": "nix-lib",
         "openarc": "openarc"
       }
     }
index 65a56ca161dff276996effd27365f737af967709..fd8ec5687ca95b14867289555a05b153c016f594 100644 (file)
@@ -3,10 +3,10 @@
     path = "../../openarc";
     type = "path";
   };
-  inputs.nixpkgs.url = "github:NixOS/nixpkgs";
+  inputs.nix-lib.url = "github:NixOS/nixpkgs";
 
   description = "Private configuration for openarc";
-  outputs = { self, nixpkgs, openarc }:
+  outputs = { self, nix-lib, openarc }:
     let
       cfg = name': { config, lib, pkgs, name, ... }: lib.mkIf (name == name') {
         services.openarc = {
@@ -41,5 +41,5 @@
       };
     in
       openarc.outputs //
-      { nixosModules = openarc.nixosModules or {} // nixpkgs.lib.genAttrs ["eldiron" "backup-2"] cfg; };
+      { nixosModules = openarc.nixosModules or {} // nix-lib.lib.genAttrs ["eldiron" "backup-2"] cfg; };
 }
index ae07161061ef00d44c0377a58ea8adce98b07ea5..cdb38335f39d4c3700eef3b9dd48376f9b242a40 100644 (file)
@@ -33,7 +33,9 @@
     "libspf2": {
       "inputs": {
         "flake-utils": "flake-utils_2",
-        "nixpkgs": "nixpkgs_2"
+        "nixpkgs": [
+          "nixpkgs"
+        ]
       },
       "locked": {
         "dir": "flakes/libspf2",
         "url": "https://git.immae.eu/perso/Immae/Config/Nix.git"
       }
     },
-    "nixpkgs": {
-      "locked": {
-        "lastModified": 1611218116,
-        "narHash": "sha256-CcyGZ8cLlHgiViWyBjRIjdsdRZxJjP2MgtWeuqSv3CE=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "30ab92ea31f6b7e9095b1e7e4b56a5000823efdf",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs_2": {
+    "nix-lib": {
       "locked": {
-        "lastModified": 1597943282,
-        "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=",
+        "lastModified": 1629674054,
+        "narHash": "sha256-Vl4SmTN1Cwz9T8Te85Bkq11e9VPl4JRNO+Rzmxxop+c=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38",
+        "rev": "f118101266328f38241e266d30316cd3c50e43da",
         "type": "github"
       },
       "original": {
@@ -98,7 +85,7 @@
         "type": "github"
       }
     },
-    "nixpkgs_3": {
+    "nixpkgs": {
       "locked": {
         "lastModified": 1597943282,
         "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=",
         "flake-utils": "flake-utils",
         "libspf2": "libspf2",
         "myuids": "myuids",
-        "nixpkgs": "nixpkgs_3"
+        "nixpkgs": "nixpkgs"
       },
       "locked": {
-        "narHash": "sha256-V6elpT2t2bYOnY6RSwLIu+SU7Zajkk7oonjscoYpWKo=",
+        "narHash": "sha256-Fw06I3FREReXjXFSs8TuTVQv2kncP3toGdJE1KeHJO8=",
         "path": "../../opendmarc",
         "type": "path"
       },
     },
     "root": {
       "inputs": {
-        "nixpkgs": "nixpkgs",
+        "nix-lib": "nix-lib",
+        "nixpkgs": [
+          "opendmarc",
+          "nixpkgs"
+        ],
         "opendmarc": "opendmarc"
       }
     }
index 384bf98cd352ce1783e4a1b65a2ded60160dd7f1..3d500a29212a136f4b664834da97db2c4eeb022c 100644 (file)
@@ -3,10 +3,13 @@
     path = "../../opendmarc";
     type = "path";
   };
-  inputs.nixpkgs.url = "github:NixOS/nixpkgs";
+  inputs.nix-lib.url = "github:NixOS/nixpkgs";
+
+  # Necessary for dependencies
+  inputs.nixpkgs.follows = "opendmarc/nixpkgs";
 
   description = "Private configuration for opendmarc";
-  outputs = { self, nixpkgs, opendmarc }:
+  outputs = { self, nix-lib, opendmarc, nixpkgs }:
     let
       cfg = name': { config, lib, pkgs, name, ... }: lib.mkIf (name == name') {
         users.users."${config.services.opendmarc.user}".extraGroups = [ "keys" ];
@@ -54,6 +57,6 @@
       };
     in
       opendmarc.outputs //
-      { nixosModules = opendmarc.nixosModules or {} // nixpkgs.lib.genAttrs ["eldiron" "backup-2"] cfg; };
+      { nixosModules = opendmarc.nixosModules or {} // nix-lib.lib.genAttrs ["eldiron" "backup-2"] cfg; };
 }