Nix-simple-deploy - a Rust rewrite of nix-deploy

It seems to me that nix-deploy is unmaintained and doesn’t support new versions of nix so i had created my own version of nix-deploy using Rust: https://github.com/misuzu/nix-simple-deploy
Maybe it will be useful for you.
This is how output looks like:

$ cargo run -- system \
    --use-substitutes \
    --use-local-sudo \
    --use-remote-sudo \
    -k /tmp/key.sec \
    --target-host remote-server \
    /nix/store/m7jpqcaj5yi9la8jqd49zcql5xm17pjh-nixos-system-remote-server-20.03pre-git \
    switch
   Compiling nix-simple-deploy v0.1.0 (/home/misuzu/Workspace/nix-simple-deploy)
    Finished dev [unoptimized + debuginfo] target(s) in 0.59s
     Running `target/debug/nix-simple-deploy system --use-substitutes --use-local-sudo --use-remote-sudo -k /tmp/key.sec --target-host 'remote-server' /nix/store/m7jpqcaj5yi9la8jqd49zcql5xm17pjh-nixos-system-remote-server-20.03pre-git switch`
INFO: Running "sudo nix sign-paths -r -k /tmp/key.sec /nix/store/m7jpqcaj5yi9la8jqd49zcql5xm17pjh-nixos-system-remote-server-20.03pre-git" ...
INFO: Running "nix copy -s --to ssh://remote-server /nix/store/m7jpqcaj5yi9la8jqd49zcql5xm17pjh-nixos-system-remote-server-20.03pre-git" ...
INFO: Running "ssh remote-server sudo nix-env -p /nix/var/nix/profiles/system --set /nix/store/m7jpqcaj5yi9la8jqd49zcql5xm17pjh-nixos-system-remote-server-20.03pre-git" ...
INFO: Running "ssh remote-server sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch" ...
activating the configuration...
setting up /etc...
reloading user units for misuzu...
setting up tmpfiles
4 Likes

Please add it to https://github.com/NixOS/nixos-weekly/pull/110 :slight_smile:

4 Likes