From 907f2b4f799c31c4f7f31e3ca224eba3f28ee932 Mon Sep 17 00:00:00 2001 From: xenia Date: Tue, 17 Dec 2024 02:30:25 -0500 Subject: [PATCH] experiment --- flake.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/flake.nix b/flake.nix index 1660374..5db5b14 100644 --- a/flake.nix +++ b/flake.nix @@ -138,6 +138,28 @@ config.nixpkgs.config = lib.mkIf config.dragnpkgs.possiblyCommitCrimes { allowlistedLicenses = [ lib.licenses.fyptl ]; }; + + config.nix.registry.dragnpkgs-global-config.to = + let + possiblyCommitCrimes = + lib.boolToString config.dragnpkgs.possiblyCommitCrimes; + config-flake = pkgs.writeTextDir "source" (pkgs.writeTextFile { + name = "source"; + destination = "/flake.nix"; + text = '' + { + outputs = { self }: { + dragnpkgsConfig = { + possiblyCommitCrimes = ${possiblyCommitCrimes}; + }; + }; + } + ''; + }); + in { + type = "path"; + path = "${config-flake}"; + }; }) (import ./module.nix)