diff --git a/flake.lock b/flake.lock index ab8a7ca..ff5d6ad 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1624172050, - "narHash": "sha256-sLQEhZ6Ffjx0J1AJxHQDY4y7XWKxI/Zgm/hQJjkjZ6M=", + "lastModified": 1624522661, + "narHash": "sha256-BjkxYyGQYck5muCpPMfCtEQv/wRmD4kVEE7tiAQOS+Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6613a30c5e3ee59753181512b4bedd4121569925", + "rev": "0b8b127125e5271f5c8636680b6fe274844aaa9d", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "unstable": { "locked": { - "lastModified": 1624024598, - "narHash": "sha256-X++38oH5MKEmPW4/2WdMaHQvwJzO8pJfbnzMD7DbG1E=", + "lastModified": 1624447853, + "narHash": "sha256-Zn+vTEa3NE9q6z6ytpcNXrr8jV7HvrKRxMYoD2E6DpE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "33d42ad7cf2769ce6364ed4e52afa8e9d1439d58", + "rev": "1905f5f2e55e0db0bb6244cfe62cb6c0dbda391d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7cc82f5..66e3544 100644 --- a/flake.nix +++ b/flake.nix @@ -22,20 +22,27 @@ nixosConfigurations = self.lib.getHosts inputs ./hosts; - lib.getHosts = import lib/hosts.nix; + lib = { + getHosts = import lib/hosts.nix; + forAllSystems = f: builtins.listToAttrs (map + (name: { inherit name; value = f name; }) + (nixpkgs.lib.platforms.all) + ); + }; - packages."x86_64-linux" = - with nixpkgs.legacyPackages."x86_64-linux"; + packages = self.lib.forAllSystems (system: + with nixpkgs.legacyPackages.${system}; { binaryninja = callPackage ./pkgs/binary-ninja-personal { }; commander-x16 = callPackage ./pkgs/commander-x16 { }; gef = callPackage ./pkgs/gef { }; packettracer = callPackage ./pkgs/packettracer { }; weevely = callPackage ./pkgs/weevely { }; - }; + } + ); - apps."x86_64-linux" = - with nixpkgs.legacyPackages."x86_64-linux"; + apps = self.lib.forAllSystems (system: + with nixpkgs.legacyPackages.${system}; { format-luks = writeShellScriptBin "format-luks" '' set -e @@ -52,6 +59,7 @@ mkdir /mnt/home mount /dev/mapper/cryptroot /mnt/home -o discard,compress=zstd,subvol=/home ''; - }; + } + ); }; }