add a deploy helper binary

This commit is contained in:
root 2024-05-29 12:45:06 +02:00
parent 8113d2b066
commit 3d23da27f6
2 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,7 @@
{
imports = [
./secrets-permissions.nix
./deploy.nix
];
# Enable the OpenSSH daemon

10
common/deploy.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
let
deploy = pkgs.writeShellScriptBin "deploy" ''
cd /etc/nixos
git pull
nixos-rebuild switch
'';
in { environment.systemPackages = [ deploy ]; }