mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 03:15:41 +00:00
feat: add dev shell with deploy aliases
This commit is contained in:
parent
1b8d0b91e2
commit
d927092b29
1 changed files with 16 additions and 1 deletions
17
flake.nix
17
flake.nix
|
@ -31,6 +31,8 @@
|
|||
outputs = { self, nixpkgs, home-manager, ... } @ inputs:
|
||||
let
|
||||
rootPath = ./.;
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
|
@ -63,6 +65,19 @@
|
|||
};
|
||||
};
|
||||
|
||||
packages.x86_64-linux.default = self.homeConfigurations."toast@nixos".activationPackage;
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.nix
|
||||
pkgs.home-manager
|
||||
pkgs.sops
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
HOST=$(hostname)
|
||||
alias deploy-nixos="sudo nixos-rebuild switch --flake .#$HOST"
|
||||
alias deploy-vps="nixos-rebuild switch --flake .#vps --target-host root@vps"
|
||||
alias deploy-home="home-manager switch --flake .#toast@$HOST"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue