From d927092b296837cf28f6b1e2cb011d49fa269004 Mon Sep 17 00:00:00 2001 From: lightly-toasted Date: Thu, 2 Oct 2025 22:47:46 +0900 Subject: [PATCH] feat: add dev shell with deploy aliases --- flake.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c2db6ec..b1cb8ef 100644 --- a/flake.nix +++ b/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" + ''; + }; }; }