22 lines
586 B
Nix
22 lines
586 B
Nix
{ agenix, inputs', pkgs, ... }: rec {
|
|
dev = pkgs.mkShell {
|
|
buildInputs = [
|
|
inputs'.agenix.packages.default
|
|
(pkgs.nixos { }).nixos-rebuild
|
|
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' _ {} \;
|
|
'';
|
|
};
|
|
}
|