From ad35b322c56193607bbd48fa2292ebcb6adc9d15 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 1 Sep 2024 19:32:28 +0700 Subject: [PATCH] :bug: fix insecure packages error --- flake.nix | 88 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 37 deletions(-) diff --git a/flake.nix b/flake.nix index 10eb631..1eb993d 100644 --- a/flake.nix +++ b/flake.nix @@ -83,43 +83,57 @@ meta = rec { system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - config.permittedInsecurePackages = [ - "electron-24.8.6" # for bitwarden - "python-2.7.18.6" - "python-2.7.18.7" - "python-2.7.18.8" - "electron-27.3.11" # for logseq - "electron-28.3.3" # for logseq - ]; - overlays = [ - (_self: _super: { - unstable-small = import nixpkgs-unstable-small { - inherit system; - config.allowUnfree = true; - }; - legacy_2211 = import nixpkgs-legacy_2211 { - inherit system; - config.allowUnfree = true; - }; - legacy_2311 = import nixpkgs-legacy_2311 { - inherit system; - config.allowUnfree = true; - }; - legacy_2405 = import nixpkgs-legacy_2405 { - inherit system; - config.allowUnfree = true; - }; - polygon-art = polygon-art.packages.${system}; - landingpage = landingpage.packages.${system}.plain; - kmonad = kmonad.packages.${system}.kmonad; - tasksh = taskshell.packages.${system}.tasksh; - inherit (self.packages.${system}) otpmenu taskwarrior-hooks nsxiv; - }) - ]; - }; + pkgs = + let + allowUnfree = true; + permittedInsecurePackages = [ + "electron-24.8.6" # for bitwarden + "python-2.7.18.6" + "python-2.7.18.7" + "python-2.7.18.8" + "electron-27.3.11" # for logseq + "electron-28.3.3" # for logseq + ]; + in + import nixpkgs { + inherit system; + config = { + inherit allowUnfree permittedInsecurePackages; + }; + overlays = [ + (_self: _super: { + unstable-small = import nixpkgs-unstable-small { + inherit system; + config = { + inherit allowUnfree permittedInsecurePackages; + }; + }; + legacy_2211 = import nixpkgs-legacy_2211 { + inherit system; + config = { + inherit allowUnfree permittedInsecurePackages; + }; + }; + legacy_2311 = import nixpkgs-legacy_2311 { + inherit system; + config = { + inherit allowUnfree permittedInsecurePackages; + }; + }; + legacy_2405 = import nixpkgs-legacy_2405 { + inherit system; + config = { + inherit allowUnfree permittedInsecurePackages; + }; + }; + polygon-art = polygon-art.packages.${system}; + landingpage = landingpage.packages.${system}.plain; + kmonad = kmonad.packages.${system}.kmonad; + tasksh = taskshell.packages.${system}.tasksh; + inherit (self.packages.${system}) otpmenu taskwarrior-hooks nsxiv; + }) + ]; + }; specialArgs = { inherit inputs; assets = ./assets;