Replace alias functions with shell script packages

This commit is contained in:
James Eversole 2023-06-27 15:07:48 -05:00
parent 6ff2f8ef59
commit 390c5a6fcd
2 changed files with 15 additions and 3 deletions

View File

@ -23,8 +23,8 @@
in
{
devShell.x86_64-linux = shell.dev;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
packages = shell.packages;
nixosConfigurations = {
eve-psr-nix0 = nixpkgs.lib.nixosSystem {

View File

@ -6,8 +6,20 @@
pkgs.terraform
];
shellHook = ''
deploy() { nixos-rebuild switch --target-host root@matri.cx --build-host root@matri.cx --flake .#eve-psr-nix0 ; }
fmt() { nix fmt *.nix; for i in */; do cd $i; nix fmt *.nix; cd ..; done ; }
'';
};
packages = {
x86_64-linux = {
deploy = pkgs.writeShellScriptBin "deploy" ''
nixos-rebuild switch --target-host root@matri.cx --build-host root@matri.cx --flake .#eve-psr-nix0 ;
'';
format = pkgs.writeShellScriptBin "format" ''
nix fmt ./*.nix;
for i in */; do
nix fmt $i/*.nix;
done;
'';
};
};
}