diff --git a/common/configuration.nix b/common/configuration.nix index 420614e..c4fe092 100644 --- a/common/configuration.nix +++ b/common/configuration.nix @@ -3,6 +3,7 @@ { imports = [ ./secrets-permissions.nix + ./deploy.nix ]; # Enable the OpenSSH daemon diff --git a/common/deploy.nix b/common/deploy.nix new file mode 100644 index 0000000..310a754 --- /dev/null +++ b/common/deploy.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +let + deploy = pkgs.writeShellScriptBin "deploy" '' + cd /etc/nixos + git pull + nixos-rebuild switch + ''; + +in { environment.systemPackages = [ deploy ]; } \ No newline at end of file