From 1b61aa6ebb80f9ec53a0b1307f79b57142152578 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Thu, 30 Nov 2023 13:14:01 -0800 Subject: [PATCH] switch to original nmd repo and fix declared by link --- flake.lock | 23 ++++++++++++----------- flake.nix | 21 +++++++++++++-------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index 66e4a93..e954d01 100644 --- a/flake.lock +++ b/flake.lock @@ -81,19 +81,20 @@ "type": "github" } }, - "nmd": { + "nmdsrc": { + "flake": false, "locked": { - "lastModified": 1672240039, - "narHash": "sha256-lmct89fYDOr9YdWVvdJgklv/7WttRSiDAkoi2cvvAW4=", - "owner": "gvolpe", - "repo": "nmd", - "rev": "a59e840c2e8d54415485f349760e1350cb80d911", - "type": "github" + "lastModified": 1687627428, + "narHash": "sha256-7zGfXuNS5RHqhpEdz2fwrtqvF86JRo5U1hrxZSYgcm8=", + "ref": "refs/heads/master", + "rev": "824a380546b5d0d0eb701ff8cd5dbafb360750ff", + "revCount": 63, + "type": "git", + "url": "https://git.sr.ht/~rycee/nmd" }, "original": { - "owner": "gvolpe", - "repo": "nmd", - "type": "github" + "type": "git", + "url": "https://git.sr.ht/~rycee/nmd" } }, "root": { @@ -101,7 +102,7 @@ "flake-utils": "flake-utils", "nix-flake-tests": "nix-flake-tests", "nixpkgs": "nixpkgs", - "nmd": "nmd", + "nmdsrc": "nmdsrc", "sops-nix": "sops-nix" } }, diff --git a/flake.nix b/flake.nix index e99ccd4..66c745a 100644 --- a/flake.nix +++ b/flake.nix @@ -6,16 +6,20 @@ sops-nix.url = "github:Mic92/sops-nix"; nix-flake-tests.url = "github:antifuchs/nix-flake-tests"; flake-utils.url = "github:numtide/flake-utils"; - nmd.url = "github:gvolpe/nmd"; + nmdsrc = { + url = "git+https://git.sr.ht/~rycee/nmd"; + flake = false; + }; }; - outputs = { nixpkgs, nix-flake-tests, flake-utils, nmd, ... }: flake-utils.lib.eachDefaultSystem (system: + outputs = { nixpkgs, nix-flake-tests, flake-utils, nmdsrc, ... }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; - overlays = [ nmd.overlays.default ]; }; + nmd = import nmdsrc { inherit pkgs; }; + allModules = [ modules/blocks/authelia.nix modules/blocks/backup.nix @@ -45,19 +49,19 @@ # Inspiration from https://github.com/nix-community/nix-on-droid/blob/039379abeee67144d4094d80bbdaf183fb2eabe5/docs/default.nix#L22 packages.manualHtml = let setupModule = { - _module.args.pkgs = pkgs.lib.mkForce (pkgs.nmd.scrubDerivations "pkgs" pkgs); + _module.args.pkgs = pkgs.lib.mkForce (nmd.scrubDerivations "pkgs" pkgs); _module.check = false; }; - modulesDocs = pkgs.nmd.buildModulesDocs { + modulesDocs = nmd.buildModulesDocs { modules = allModules ++ [ setupModule ]; - moduleRootPaths = [ ../. ]; - mkModuleUrl = path: "https://github.com/ibizaman/selfhostblocks/blob/master//${path}"; + moduleRootPaths = [ ./. ]; + mkModuleUrl = path: "https://github.com/ibizaman/selfhostblocks/blob/main/${path}"; channelName = "selfhostblocks"; docBook = { id = "selfhostblocks-options"; optionIdPrefix = "shb-opt"; }; }; - manual = pkgs.nmd.buildDocBookDocs { + manual = nmd.buildDocBookDocs { pathName = "selfhostblocks"; modulesDocs = [ modulesDocs ]; documentsDirectory = ./docs; @@ -65,6 +69,7 @@ + '';