Skip to content

nixos/virt-manager: init module (option 1)#261474

Merged
bjornfor merged 1 commit intoNixOS:masterfrom
the-furry-hubofeverything:virt-manager-config
Oct 18, 2023
Merged

nixos/virt-manager: init module (option 1)#261474
bjornfor merged 1 commit intoNixOS:masterfrom
the-furry-hubofeverything:virt-manager-config

Conversation

@the-furry-hubofeverything
Copy link
Copy Markdown
Contributor

@the-furry-hubofeverything the-furry-hubofeverything commented Oct 16, 2023

Description of changes

Fixes #67736, fixes #257171

Virt-manager is unable to store settings without dconf, so I wrote a simple nixos module for it.

I've never written something of the sort, feedback appreciated. It works on my setup, but I'm not used to testing modules on my machine.

This is one of the options what was suggested, where a module is written to enable dconf and virt-manager at the same time. If another option is perferred over this, please let me know, and discuss further in #257171.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 16, 2023
@the-furry-hubofeverything
Copy link
Copy Markdown
Contributor Author

If I wrote documentation for this, would it be under "new services" or "other notable changes"?

@the-furry-hubofeverything the-furry-hubofeverything changed the title nixos/virt-manager: init (option 1) nixos/virt-manager: init module (option 1) Oct 16, 2023
@pbsds
Copy link
Copy Markdown
Member

pbsds commented Oct 16, 2023

There is precedent for "new services"

@the-furry-hubofeverything
Copy link
Copy Markdown
Contributor Author

the-furry-hubofeverything commented Oct 16, 2023

There is precedent for "new services"

@pbsds yes but, virt-manager isn't new. I just wrote a module for it. Does it still count?

Update - I added it just in case

@Gerg-L
Copy link
Copy Markdown
Contributor

Gerg-L commented Oct 16, 2023

Should at least have a package option IMO

@the-furry-hubofeverything
Copy link
Copy Markdown
Contributor Author

Should at least have a package option IMO

Oh yeah right, I'll add that

@github-actions github-actions bot added 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes labels Oct 16, 2023
@the-furry-hubofeverything the-furry-hubofeverything force-pushed the virt-manager-config branch 3 times, most recently from e92509e to ced22aa Compare October 16, 2023 20:49
Copy link
Copy Markdown
Contributor

@Gerg-L Gerg-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nitpick

Copy link
Copy Markdown
Contributor

@Gerg-L Gerg-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 16, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Oct 16, 2023
@delroth delroth added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Oct 16, 2023
the-furry-hubofeverything added a commit to the-furry-hubofeverything/hubble-systems that referenced this pull request Oct 17, 2023
Upstream in progress on nixpkgs with NixOS/nixpkgs#261474
@delroth delroth added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Oct 18, 2023
@bjornfor bjornfor merged commit ac30ac8 into NixOS:master Oct 18, 2023
@bjornfor
Copy link
Copy Markdown
Contributor

Thanks!

@the-furry-hubofeverything the-furry-hubofeverything deleted the virt-manager-config branch October 18, 2023 19:16
K900 added a commit to K900/nixpkgs that referenced this pull request Nov 3, 2023
@K900 K900 mentioned this pull request Nov 3, 2023
13 tasks
natsukium pushed a commit to natsukium/nixpkgs that referenced this pull request Nov 4, 2023
EndCredits added a commit to EndCredits/nix-configurations that referenced this pull request Jan 26, 2024
 * Refs: NixOS/nixpkgs#261474

Signed-off-by: EndCredits <endcredits@crepuscular-aosp.icu>
Jayman2000 added a commit to Jayman2000/jasons-nixos-config that referenced this pull request Mar 8, 2024
When I first set up virt-manager [1], there was no programs.virt-manager
modoption. Now that there is [2], I can simplify my code by using it.

[1]: 60370fd (Set up desktop for hosting VMs, 2022-07-19)
[2]: <NixOS/nixpkgs#261474>

TODO:
• Test on:
	◦ Graphical-Test-VM
	◦ Jason-Desktop-Linux
• Back up any links in the Internet Archive.
Jayman2000 added a commit to Jayman2000/jasons-nixos-config that referenced this pull request Mar 8, 2024
When I first set up virt-manager [1], there was no programs.virt-manager
modoption. Now that there is [2], I can simplify my code by using it.

[1]: 60370fd (Set up desktop for hosting VMs, 2022-07-19)
[2]: <NixOS/nixpkgs#261474>

TODO:
• Test on:
	◦ Jason-Desktop-Linux
• Back up any links in the Internet Archive.
Jayman2000 added a commit to Jayman2000/jasons-nixos-config that referenced this pull request Mar 8, 2024
When I first set up virt-manager [1], there was no programs.virt-manager
modoption. Now that there is [2], I can simplify my code by using it.

[1]: 60370fd (Set up desktop for hosting VMs, 2022-07-19)
[2]: <NixOS/nixpkgs#261474>

TODO:
• Back up any links in the Internet Archive.
Jayman2000 added a commit to Jayman2000/jasons-nixos-config that referenced this pull request Mar 8, 2024
When I first set up virt-manager [1], there was no programs.virt-manager
modoption. Now that there is [2], I can simplify my code by using it.

[1]: 60370fd (Set up desktop for hosting VMs, 2022-07-19)
[2]: <NixOS/nixpkgs#261474>
Jayman2000 added a commit to Jayman2000/jasons-nixos-config that referenced this pull request Dec 5, 2024
I first added virt-manager to my NixOS config in 60370fd (Set up desktop
for hosting VMs, 2022-07-19). At the time, NixOS didn’t have an official
virt-manager module. NixOS’s official virt-manager module wasn’t added
until 2023 [1]. If the module had existed at the time, I would have used
it.

The main motivation behind this change is to fix a problem that I’m
currently experiencing with virt-manager. I’m not able to view a virtual
machie’s display. Whenever I try to view a virtual machine’s display, I
get this error:

> Error connecting to graphical console:
> Error opening SPICE console: Typelib file for namespace 'GstBase',
> version '1.0' not found

Interestingly enough, that error message has already been reported as a
Nixpkgs bug, and that bug has already been fixed [2]. If the bug has
already been fixed, then why am I experiencing it? One possible
explanation is that the bug is fixed for people who are using the
virt-manager module but not fixed for people who are using the
virt-manager package directly. If that’s the case, then this change will
(hopefully) make that error message go away.

Additionally, this change allows me to make my config slightly shorter.
Even if this change doesn’t end up fixing the problem, making my NixOS
config shorter is still a good thing.

[1]: <NixOS/nixpkgs#261474 (comment)>
[2]: <NixOS/nixpkgs#267579 (comment)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX - virt-manager and dconf on non-gnome desktops virt-manager doesn't save config

6 participants