/etc/nixos/configuration.nix
:
services.openssh.enable=true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [ git ];
sudo nixos-rebuild switch
/etc/nixos/hardware-configuration.nix
to your hosts hardware-configuration.nix
in your flake, add, commit, push/etc/ssh/ssh_host_ed25519_key
with your hosts' intended SSH key~/.ssh/id_ed25519
, and run chmod 600 ~/.ssh/id_ed25519
nix develop github:charludo/nix#keyctl
and use enable-user
and sudo enable-host
to set up the sops keyssudo GIT_SSH_COMMAND='ssh -i /home/<username>/.ssh/id_ed25519 -o IdentitiesOnly=yes' nixos-rebuild switch --flake github:charludo/nix#<your_host>
to install the system properly this time