From 3d3b2726c9070550c043152cf12dcbe7b7e68091 Mon Sep 17 00:00:00 2001 From: Eduardo Barreto Alexandre Date: Fri, 5 Sep 2025 19:01:12 -0300 Subject: [PATCH] feat: Add support for multiple systems in flake --- flake.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 66024d8d..809c6eaa 100644 --- a/flake.nix +++ b/flake.nix @@ -9,10 +9,12 @@ outputs = { self, nixpkgs, quickshell, ... }: let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + forEachSystem = fn: + nixpkgs.lib.genAttrs + nixpkgs.lib.platforms.linux + (system: fn system nixpkgs.legacyPackages.${system}); in { - packages.${system} = { + packages = forEachSystem (system: pkgs: rec { dankMaterialShell = pkgs.stdenvNoCC.mkDerivation { name = "dankMaterialShell"; src = ./.; @@ -24,7 +26,7 @@ }; default = self.packages.${system}.dankMaterialShell; - }; + }); homeModules.dankMaterialShell = { config, pkgs, lib, ... }: let cfg = config.programs.dankMaterialShell; @@ -43,9 +45,9 @@ config = lib.mkIf cfg.enable { programs.quickshell = { enable = true; - package = quickshell.packages.${system}.quickshell; + package = quickshell.packages.${pkgs.system}.quickshell; configs.DankMaterialShell = "${ - self.packages.${system}.dankMaterialShell + self.packages.${pkgs.system}.dankMaterialShell }/etc/xdg/quickshell/DankMaterialShell"; activeConfig = lib.mkIf cfg.enableSystemd "DankMaterialShell"; systemd = lib.mkIf cfg.enableSystemd {