Replace alias functions with shell script packages
This commit is contained in:
parent
6ff2f8ef59
commit
390c5a6fcd
@ -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 {
|
||||
|
16
shell.nix
16
shell.nix
@ -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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user