nixos-generators
nixos-generators copied to clipboard
Location of configuration
I have deployed a VM to GCP. It works fine.
Now I want to change its configuration without redeploying. I just want to use sudo nixos-rebuild switch. But /etc/nixos/configuration.nix just has
{ ... }:
{
imports = [
<nixpkgs/nixos/modules/virtualisation/google-compute-image.nix>
];
}
Where can I find a copy of the configuration I used within the VM? Is it anywhere there? Can I just place a new configuration anywhere and do the switch?
The file is being imported from the nixpkgs repository. This is directory where the google-compute-image.nix file lives: https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/virtualisation
You can leave the import statement there, and add (or overwrite) the options you want to change.
So that means there's no declarative configuration within the VM? And what I add to /etc/nixos/configuration.nix will be added to the current configuration, rather than clobbering it?