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

Rename fonts.fonts -> fonts.packages #870

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Rename fonts.fonts -> fonts.packages #870

wants to merge 4 commits into from

Conversation

b-
Copy link

@b- b- commented Feb 16, 2024

Is this all that's necessary for #752? I've never done this before, but it looks like the only change that was necessary to do the same on NixOS (NixOS/nixpkgs@5162df3)

I did not test this, which is why it's marked as draft. (I suppose I can by pointing my flake.nix to the fork in this pr, right?)

Is this all that's necessary for LnL7#752?
@b- b- closed this Feb 16, 2024
@b- b- deleted the patch-1 branch February 16, 2024 22:25
@b- b- restored the patch-1 branch February 20, 2024 01:04
@b- b- reopened this Feb 20, 2024
@b- b- marked this pull request as ready for review February 20, 2024 01:04
@b-
Copy link
Author

b- commented Feb 20, 2024

Sorry, I have no idea how I closed this. I think I meant to convert from a draft to a regular PR and clicked the wrong button…

@mattpolzin
Copy link
Contributor

I suppose I can by pointing my flake.nix to the fork in this pr, right?

Yup, e.g. (for a flake config)

-    nix-darwin.url = "github:LnL7/nix-darwin";
+    nix-darwin.url = "github:b-/nix-darwin/patch-1";

I tested this and it definitely works, though you see a few trace warnings about using deprecated fonts.fonts even if you've switched your own config over to fonts.packages. I didn't spend the time to track down where those other fonts.fonts references live but I suppose at the least it is worth switching the remaining references in this repo over (https://github.com/search?q=repo%3ALnL7%2Fnix-darwin%20fonts.fonts&type=code).

@b-
Copy link
Author

b- commented Feb 24, 2024

I tested this and it definitely works, though you see a few trace warnings about using deprecated fonts.fonts even if you've switched your own config over to fonts.packages. I didn't spend the time to track down where those other fonts.fonts references live but I suppose at the least it is worth switching the remaining references in this repo over (github.com/search?q=repo%3ALnL7%2Fnix-darwin%20fonts.fonts&type=code).

Thanks, I was wondering why I was still getting those messages. I’ll change those later today.

@b-
Copy link
Author

b- commented Feb 24, 2024

I needed to really force my local machine to refresh the inputs before it stopped showing the warning, (nix build .\#darwinConfigurations.bri@x86_64-darwin.system --refresh -vvv but i think it's good now!

@b-
Copy link
Author

b- commented Feb 24, 2024

Actually I'm still getting trace: Obsolete option `fonts.fonts' is used. It was renamed to `fonts.packages'. when building. I'm not sure why…

@cmacrae
Copy link
Contributor

cmacrae commented Feb 27, 2024

I'd also like to see this change integrated 🙏
for now, I'm using this silly hack (in case anyone else finds it useful):

fonts =
    let
      fnts = with pkgs; [
        eb-garamond
        emacs-all-the-icons-fonts
        etBook
        fira-code
        font-awesome
        nerdfonts
        roboto
        roboto-mono
      ];
    in
    # TODO: hack to get around waiting for nix-darwin#870
    ({ fontDir.enable = true; }
      // mkIf isLinux { packages = fnts; }
      // mkIf isDarwin { fonts = fnts; });

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

Successfully merging this pull request may close these issues.

None yet

3 participants