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: GitHub - misuzu/nix-simple-deploy: Deploy software or an entire NixOS system configuration to another NixOS system.
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
5 Likes

Please add it to Call for Content: 2020/02 by domenkozar · Pull Request #110 · NixOS/nixos-weekly · GitHub :slight_smile:

4 Likes