diff --git a/flake.lock b/flake.lock index 314f4be..d251a1f 100644 --- a/flake.lock +++ b/flake.lock @@ -130,6 +130,26 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -209,9 +229,24 @@ "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", "flake-compat": "flake-compat", + "flake-utils": "flake-utils", "gnome-shell": "gnome-shell", "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "systems": "systems" + } + }, + "systems": { + "flake": false, + "locked": { + "lastModified": 1, + "narHash": "sha256-4CDjAaoWvkUTFjjKdcDZG85k4vQfgR0K4+zgtqTW5ho=", + "path": "stylix/systems.nix", + "type": "path" + }, + "original": { + "path": "stylix/systems.nix", + "type": "path" } } }, diff --git a/flake.nix b/flake.nix index 86663cc..7ff685d 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,11 @@ url = "github:edolstra/flake-compat"; }; + flake-utils = { + inputs.systems.follows = "systems"; + url = "github:numtide/flake-utils"; + }; + gnome-shell = { flake = false; @@ -53,18 +58,18 @@ }; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + # Interface flake systems. + systems = { + flake = false; + url = "path:stylix/systems.nix"; + }; }; outputs = { nixpkgs, base16, self, ... }@inputs: { - packages = nixpkgs.lib.genAttrs [ - "aarch64-darwin" - "aarch64-linux" - "i686-linux" - "x86_64-darwin" - "x86_64-linux" - ] ( + packages = nixpkgs.lib.genAttrs inputs.flake-utils.lib.defaultSystems ( system: let inherit (nixpkgs) lib; diff --git a/stylix/systems.nix b/stylix/systems.nix new file mode 100644 index 0000000..7e856aa --- /dev/null +++ b/stylix/systems.nix @@ -0,0 +1,7 @@ +[ + "aarch64-darwin" + "aarch64-linux" + "i686-linux" + "x86_64-darwin" + "x86_64-linux" +]