Skip to content

nixos/macos-builder: review comments from #206951#207486

Closed
SuperSandro2000 wants to merge 1 commit intoNixOS:masterfrom
SuperSandro2000:206951-review
Closed

nixos/macos-builder: review comments from #206951#207486
SuperSandro2000 wants to merge 1 commit intoNixOS:masterfrom
SuperSandro2000:206951-review

Conversation

@SuperSandro2000
Copy link
Member

Description of changes
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.05 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Dec 24, 2022
@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 Dec 24, 2022
@SuperSandro2000 SuperSandro2000 mentioned this pull request Dec 24, 2022
13 tasks
Comment on lines +39 to +44
networking.nameservers = let
ns = config.networking.nameservers;
in if ns == [ ] then
[ "8.8.8.8" ]
else
ns;
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this trigger infinite recursion?

Comment on lines +69 to +72
install = hostPkgs.coreutils}/bin/install;
in pkgs.writeShellScript "install-credentials" ''
"${install}" -g nixbld -m 600 "''${1}/${user}_${keyType}" ${privateKey}
"${install}" -g nixbld -m 644 "''${1}/${user}_${keyType}.pub" ${publicKey}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't feel like this improves the readability of the Nix code, but at the expense of the readability of the generated script

I think whether or not the install should be inlined is debatable, but definitely the change to inline KEYS feels like a clear regression for readability

});

system.stateVersion = "22.05";
inherit (config.system) stateVersion;
Copy link
Contributor

Choose a reason for hiding this comment

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

There are two issues here:

  • This sets stateVersion and not system.stateVersion
  • If it were changed to set system.stateVersion then this also seems like it would also trigger infinite recursion.

@SuperSandro2000 SuperSandro2000 deleted the 206951-review branch January 14, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 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/`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants