From 13905d34c41695ba85c948ce80ff7678f76c967a Mon Sep 17 00:00:00 2001 From: orxngc Date: Tue, 1 Oct 2024 10:07:38 +0300 Subject: [PATCH] fix(nix): nixpkgs input url should be unstable --- flake.nix | 70 +++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/flake.nix b/flake.nix index d09503c..685fed7 100644 --- a/flake.nix +++ b/flake.nix @@ -2,31 +2,29 @@ description = "A Bar/Panel for Hyprland with extensive customizability."; inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; ags.url = "github:Aylur/ags"; }; - outputs = inputs: - let - systems = [ - "x86_64-linux" - "x86_64-darwin" - "aarch64-darwin" - "aarch64-linux" - ]; - forEachSystem = inputs.nixpkgs.lib.genAttrs systems; - pkgsFor = forEachSystem ( - system: + outputs = inputs: let + systems = [ + "x86_64-linux" + "x86_64-darwin" + "aarch64-darwin" + "aarch64-linux" + ]; + forEachSystem = inputs.nixpkgs.lib.genAttrs systems; + pkgsFor = forEachSystem ( + system: import inputs.nixpkgs { inherit system; config.allowUnfree = true; } - ); + ); - devShellFor = - system: - inputs.nixpkgs.lib.genAttrs [ "default" ] ( - _: + devShellFor = system: + inputs.nixpkgs.lib.genAttrs ["default"] ( + _: inputs.nixpkgs.legacyPackages.${system}.mkShell { buildInputs = [ pkgsFor.${system}.esbuild @@ -59,26 +57,22 @@ export GI_TYPELIB_PATH=${pkgsFor.${system}.libgtop}/lib/girepository-1.0:${pkgsFor.${system}.glib}/lib/girepository-1.0:$GI_TYPELIB_PATH ''; } - ); - in - { - devShells = forEachSystem devShellFor; - - overlay = final: prev: { - hyprpanel = - if final ? callPackage - then (final.callPackage ./nix { inherit inputs; }).desktop.script - else inputs.self.packages.${prev.stdenv.system}.default; - }; - packages = forEachSystem ( - system: - let - pkgs = pkgsFor.${system}; - in - { - default = (pkgs.callPackage ./nix { inherit inputs; }).desktop.script; - } ); - }; -} + in { + devShells = forEachSystem devShellFor; + overlay = final: prev: { + hyprpanel = + if final ? callPackage + then (final.callPackage ./nix {inherit inputs;}).desktop.script + else inputs.self.packages.${prev.stdenv.system}.default; + }; + packages = forEachSystem ( + system: let + pkgs = pkgsFor.${system}; + in { + default = (pkgs.callPackage ./nix {inherit inputs;}).desktop.script; + } + ); + }; +}