diff --git a/flake.lock b/flake.lock index 1cb431a..9d36d26 100644 --- a/flake.lock +++ b/flake.lock @@ -18,7 +18,23 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "systems": "systems" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index b9f5864..d0ecfb2 100644 --- a/flake.nix +++ b/flake.nix @@ -3,21 +3,32 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + # todo: get a mac + # todo: wait for suyu to get good on MacOS + systems.url = "github:nix-systems/default-linux"; }; - outputs = { self, nixpkgs }: { - packages.x86_64-linux = + outputs = { self, nixpkgs, systems, ... }: + let + eachSystem = nixpkgs.lib.genAttrs (import systems); + in + { + packages = eachSystem (system: let pkgs = import nixpkgs { - system = "x86_64-linux"; - config = {allowUnfree = true;}; + system = "${system}"; + config = {allowUnfree = true;}; # cuda }; - suyu-deps = pkgs.kdePackages // {inherit (self.packages.x86_64-linux) nx_tzdb compat-list;}; + + # Qt6 packages have been moved to kdePackages so we grab them all here so they are not + # confused with their Qt5 counterparts + suyu-deps = pkgs.kdePackages // {inherit (self.packages.${system}) nx_tzdb compat-list;}; in { - default = self.packages.x86_64-linux.suyu; + default = self.packages.${system}.suyu; nx_tzdb = pkgs.callPackage ./suyu/nx_tzdb.nix {}; compat-list = pkgs.callPackage ./suyu/compat-list.nix {}; suyu = pkgs.callPackage ./suyu/suyu.nix suyu-deps; - }; + } + ); }; }