From 27c520a878eb8a98c9fcbc0222b31779af18f340 Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Mon, 25 Oct 2021 23:41:09 +0300 Subject: [PATCH] flake.nix fix --- flake.nix | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index eeae87b..661b74b 100644 --- a/flake.nix +++ b/flake.nix @@ -76,6 +76,15 @@ outputs = { nixpkgs, nix, self, ... }@inputs: let + rebuild = (pkgs: pkgs.writeShellScriptBin "rebuild" '' + if [[ -z $1 ]]; then + echo "Usage: $(basename $0) {switch|boot|test}" + elif [[ $1 = "iso" ]]; then + nix build .#nixosConfigurations.Flakes-ISO.config.system.build.isoImage + else + sudo nixos-rebuild $1 --flake . + fi + ''); findModules = dir: builtins.concatLists (builtins.attrValues (builtins.mapAttrs (name: type: @@ -113,20 +122,18 @@ legacyPackages.x86_64-linux = (builtins.head (builtins.attrValues self.nixosConfigurations)).pkgs; + legacyPackages.aarch64-linux = + (builtins.head (builtins.attrValues self.nixosConfigurations)).pkgs; devShell.x86_64-linux = let pkgs = self.legacyPackages.x86_64-linux; - rebuild = pkgs.writeShellScriptBin "rebuild" '' - if [[ -z $1 ]]; then - echo "Usage: $(basename $0) {switch|boot|test}" - elif [[ $1 = "iso" ]]; then - nix build .#nixosConfigurations.Flakes-ISO.config.system.build.isoImage - else - sudo nixos-rebuild $1 --flake . - fi - ''; in pkgs.mkShell { - nativeBuildInputs = [ rebuild ]; + nativeBuildInputs = [ (rebuild pkgs) ]; + }; + devShell.aarch64-linux = let + pkgs = self.legacyPackages.aarch64-linux; + in pkgs.mkShell { + nativeBuildInputs = [ (rebuild pkgs) ]; }; }; }