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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/console: Fix systemd-vconsole-setup #299456

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pinpox
Copy link
Member

@pinpox pinpox commented Mar 27, 2024

Description of changes

Fixes the problem described in #257904

Fixes #257904

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.05 Release Notes (or backporting 23.05 and 23.11 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.

Copy link

@lelgenio lelgenio left a comment

Choose a reason for hiding this comment

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

The current implementation does not solve the issue. The same error still occurs.

nixos/modules/config/console.nix Outdated Show resolved Hide resolved
Copy link
Member

@PedroHLC PedroHLC left a comment

Choose a reason for hiding this comment

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

Works for me, diff LGTM.

Tested by adding the following to my config:

{pkgs, config, ...}:

{
  console.font = "Lat2-Terminus16";
  boot.initrd.systemd.contents."/etc/kbd/consolefonts" =
    let
      cfg = config.console;
      consoleEnv = kbd: pkgs.buildEnv {
        name = "console-env";
        paths = [ kbd ] ++ cfg.packages;
        pathsToLink = [
          "/share/consolefonts"
          "/share/consoletrans"
          "/share/keymaps"
          "/share/unimaps"
        ];
      };
    in
    lib.mkIf (!cfg.earlySetup && cfg.font != null) { source = "${consoleEnv config.boot.initrd.systemd.package.kbd}/share/consolefonts"; };
}

Copy link

@lelgenio lelgenio left a comment

Choose a reason for hiding this comment

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

Working fine! 馃槂 馃憤

Maybe consider squashing and prefix the commit message with "nixos/console:"

pinpox added a commit to pinpox/nixos that referenced this pull request Apr 2, 2024
@PedroHLC
Copy link
Member

PedroHLC commented Apr 2, 2024

About the commit number and message/name/title that lelgenio commented:

https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions

@pinpox pinpox force-pushed the fix-systemd-vconsole-setup-3 branch from b1f231d to 6140568 Compare April 3, 2024 08:17
@pinpox
Copy link
Member Author

pinpox commented Apr 3, 2024

About the commit number and message/name/title that lelgenio commented:

https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions

Sorry, had missed that message. Should be fixed now!

@SuperSandro2000 SuperSandro2000 changed the title Fix systemd-vconsole-setup nixos/console: Fix systemd-vconsole-setup Apr 3, 2024
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Apr 20, 2024

Isn't this essentially undoing 18363ca? It seems to me that now you're always setting the console with systemd initrd.

@pinpox
Copy link
Member Author

pinpox commented May 11, 2024

Isn't this essentially undoing 18363ca? It seems to me that now you're always setting the console with systemd initrd.

I still really want to fix this, as it's causing me trouble but don't know how to proceed. Can someone more familiar with these modules give some pointers on how to resolve this?

@rnhmjoj
Copy link
Contributor

rnhmjoj commented May 11, 2024

@dasJ ?

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

Successfully merging this pull request may close these issues.

systemd 254: systemd-vconsole-setup fails in stage 1
5 participants