Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add an overlay exposing nix-darwin modeled after pkgs.nixos #1409

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

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

Conversation

WeetHet
Copy link
Contributor

@WeetHet WeetHet commented Mar 30, 2025

This allows usage from non-flake configuration as follows:

{
  system ? builtins.currentSystem,
  sources ? import ./npins,
  nixpkgs ? sources.nixpkgs,
  darwin ? sources.darwin,
  pkgs ? import nixpkgs { 
    inherit system; 
    overlays = [ "${darwin}/overlay.nix" ];
  },
}:
pkgs.nix-darwin [
  ({ test, lib, pkgs, ... }: { environment.systemPackages = [ (lib.traceValFn (_: test) pkgs.fish) ]; })
  { _module.args.test = "hello"; }
  { system.stateVersion = 6; }
]

Had to use nix-darwin as pkgs.darwin is already in use

@WeetHet WeetHet force-pushed the non-flake-lib branch 3 times, most recently from f2291b9 to aa4ddbf Compare March 30, 2025 13:31
@WeetHet WeetHet changed the title lib: expose darwinSystem from default.nix Add an overlay exposing darwinSystem modeled after pkgs.nixos Mar 30, 2025
@WeetHet WeetHet force-pushed the non-flake-lib branch 3 times, most recently from 6bb2482 to 693528c Compare March 30, 2025 14:12
@WeetHet WeetHet changed the title Add an overlay exposing darwinSystem modeled after pkgs.nixos Add an overlay exposing nix-darwin modeled after pkgs.nixos Mar 30, 2025
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.

1 participant