tony / oxwm

pass in pkgs in forAllSystems to function Browse files
emzywastaken committed 2025-10-10 parent 5cb2e29 commit ad2ebbc9d140a21682a06275b83532642cb0464f
Showing 1 changed file with 7 additions and 10 deletions. UnifiedSplit
+7 −10 flake.nix
@@ -8,18 +8,15 @@
8 nixpkgs, 8 nixpkgs,
9 }: let 9 }: let
10 systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; 10 systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
11 - forAllSystems = nixpkgs.lib.genAttrs systems; 11 +
12 + forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
12 in { 13 in {
13 - packages = forAllSystems (system: let 14 + packages = forAllSystems (pkgs: rec {
14 - pkgs = import nixpkgs {inherit system;};
15 - in {
16 default = pkgs.callPackage ./default.nix {}; 15 default = pkgs.callPackage ./default.nix {};
17 - oxwm = self.packages.${system}.default; 16 + oxwm = default;
18 }); 17 });
19 18
20 - devShells = forAllSystems (system: let 19 + devShells = forAllSystems (pkgs: {
21 - pkgs = import nixpkgs {inherit system;};
22 - in {
23 default = pkgs.mkShell { 20 default = pkgs.mkShell {
24 buildInputs = [ 21 buildInputs = [
25 pkgs.rustc 22 pkgs.rustc
@@ -40,7 +37,7 @@
40 }; 37 };
41 }); 38 });
42 39
43 - formatter = forAllSystems (system: (import nixpkgs {inherit system;}).alejandra); 40 + formatter = forAllSystems (pkgs: pkgs.alejandra);
44 41
45 nixosModules.default = { 42 nixosModules.default = {
46 config, 43 config,
@@ -83,7 +80,7 @@
83 } 80 }
84 ]; 81 ];
85 services.displayManager.sessionPackages = [oxwmDesktopItem]; 82 services.displayManager.sessionPackages = [oxwmDesktopItem];
86 - 83 +
87 environment.systemPackages = [ 84 environment.systemPackages = [
88 cfg.package 85 cfg.package
89 pkgs.rustc 86 pkgs.rustc