From 0b39734c7a0315a3ed81c70935350d35ef53f0e2 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 47aaa93..2ade811 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)