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

nixos/proxmox-lxc: fix getty start and nixos-rebuild #328682

Merged
merged 3 commits into from
Jul 21, 2024

Conversation

fpletz
Copy link
Member

@fpletz fpletz commented Jul 20, 2024

Description of changes

Before this PR, the console via /dev/console would work but no getty was being started on /dev/tty1 which is the default on Proxmox for new LXC containers.

Furthermore, registering the store paths is important for garbage collection if the store is being changed and the default system profile is need to make nixos-rebuild work. Otherwise switching to a new configuration fails with:

'/nix/store/la82b6h2yvrjm5sha9j5kmqks9p8sk5c-system-path/bin/busctl --json=short call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager ListUnitsByPatterns asas 0 0' exited with value 1 at /nix/store/9r6wrz196p8v5kap6mgqr1i95is47nay-nixos-system-unnamed-24.05.83bb0d3-dirty/bin/switch-to-configuration line 145.

Fixes nix-community/nixos-generators#319.

cc @smacz42 @hogcycle

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

fpletz added 3 commits July 20, 2024 16:54
Otherwise there is no getty on tty1 in Proxmox.
Same is being done in lxc-container module.
@fpletz fpletz requested a review from illustris July 20, 2024 15:07
@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 Jul 20, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-proxmox-lxc-not-rebuilding-using-wiki-provided-configuration/47104/18

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jul 20, 2024
Copy link
Contributor

@illustris illustris left a comment

Choose a reason for hiding this comment

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

Thanks! Tested on PVE 8.1.

@fpletz fpletz added the backport release-24.05 Backport PR automatically label Jul 21, 2024
@fpletz
Copy link
Member Author

fpletz commented Jul 21, 2024

I'm going to backport all fixes since 24.05 including this PR to 24.05.

@fpletz fpletz merged commit 1a3c164 into NixOS:master Jul 21, 2024
28 checks passed
@fpletz fpletz deleted the nixos/fix-proxmox-lxc branch July 21, 2024 07:09
Copy link
Contributor

Successfully created backport PR for release-24.05:

@hogcycle
Copy link
Contributor

I see I was CC'ed on this. Thanks!

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: 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 backport release-24.05 Backport PR automatically
Projects
None yet
4 participants