Flake parts with x64 and ARM support for devshell on both Linux and Mac
This commit is contained in:
22
nix/shell.nix
Normal file
22
nix/shell.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ agenix, inputs', pkgs, ... }: rec {
|
||||
dev = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
inputs'.agenix.packages.default
|
||||
(pkgs.nixos { }).nixos-rebuild
|
||||
pkgs.terraform
|
||||
packages.deploy
|
||||
packages.format
|
||||
];
|
||||
shellHook = ''
|
||||
'';
|
||||
};
|
||||
|
||||
packages = {
|
||||
deploy = pkgs.writeShellScriptBin "deploy" ''
|
||||
nixos-rebuild switch --target-host root@192.168.0.130 --build-host root@192.168.0.130 --flake .#eve-psr-nix0 ;
|
||||
'';
|
||||
format = pkgs.writeShellScriptBin "format" ''
|
||||
find . -type f -name "*.nix" -exec sh -c 'echo "Formatting: $1"; nix fmt $1' _ {} \;
|
||||
'';
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user