mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 06:22:56 +00:00
devShell for all system types
This commit is contained in:
parent
b9d28efa4b
commit
9099a9f63b
14
flake.nix
14
flake.nix
@ -20,6 +20,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, nur }:
|
outputs = { self, nixpkgs, home-manager, nur }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
# Global configuration for my systems
|
# Global configuration for my systems
|
||||||
@ -37,6 +38,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# System types to support.
|
||||||
|
supportedSystems =
|
||||||
|
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
|
|
||||||
|
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
# Define my systems
|
# Define my systems
|
||||||
@ -49,13 +57,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Used to run commands and editing in this repo
|
# Used to run commands and editing in this repo
|
||||||
devShells.x86_64-linux =
|
devShells = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { system = "x86_64-linux"; };
|
let pkgs = import nixpkgs { inherit system; };
|
||||||
in {
|
in {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user