Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location of configuration #296

Open
dmvianna opened this issue Feb 16, 2024 · 2 comments
Open

Location of configuration #296

dmvianna opened this issue Feb 16, 2024 · 2 comments

Comments

@dmvianna
Copy link

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?

@liamdiprose
Copy link

liamdiprose commented Mar 7, 2024

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.

@dmvianna
Copy link
Author

dmvianna commented Mar 8, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants