Skip to content

Conversation

@grahamc
Copy link
Member

@grahamc grahamc commented Dec 9, 2024

A customer wants to use Determinate, and doesn't want to use the existing nix-darwin module. They want to be able to push out Determinate updates through MDM, without having to have users redeploy their nix-darwin config.

This is a fairly brittle approach, but a first draft exploration.

Users can test this with this flake input:

inputs.determinate.url = "github:DeterminateSystems/determinate/graham/fh-469-using-determinate-nix-darwin-in-away-where-nix-darwin-doesnt";

grahamc and others added 3 commits December 9, 2024 08:28
…in doesn't manage Nix or its configuration.

General concept to try:

1. nix-darwin puts their own nix into PATH, overriding the system
2. it creates launch daemons for mounting the store(?)
3. it writes the nix.conf, but shouldn't
4. I think it manages build users?
5. it turns on the daemon by default

Co-authored-by: Cole Helbling <[email protected]>
Comment on lines +32 to +39
options.nix.package = lib.mkOption {
type = lib.types.package;
default = {
type = "derivation";
outPath = "/nix/var/nix/profiles/default";
};
internal = true;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

home-manager needs this to look like a package type or it errors out

Copy link
Member

Choose a reason for hiding this comment

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

Sounds like a good comment to live in-code :)

@grahamc
Copy link
Member Author

grahamc commented Jan 7, 2025

If a user goes from default -> unmanaged, nix-darwin dutifully erases the Launchd modules and then they have a broken Nix install until the user re-runs the Determinate package.

@grahamc grahamc changed the title Experiment: Using Determinate + nix-darwin in away where nix-darwin doesn't manage Nix at all Experiment: Using Determinate + nix-darwin in a way where nix-darwin doesn't manage Nix at all Jan 7, 2025
@cole-h cole-h marked this pull request as draft February 11, 2025 19:34
@cole-h cole-h closed this Feb 14, 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.

3 participants