{"id":23905509,"url":"https://github.com/z0al/plist-manager","last_synced_at":"2025-04-15T16:34:34.457Z","repository":{"id":270495821,"uuid":"903880771","full_name":"z0al/plist-manager","owner":"z0al","description":"Nix-Based macOS User Defaults Done Right","archived":false,"fork":false,"pushed_at":"2025-01-03T00:26:52.000Z","size":81,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-10T08:55:36.242Z","etag":null,"topics":["darwin","home-manager","macos","nix","nix-darwin","nix-flake"],"latest_commit_sha":null,"homepage":"https://z0al.github.io/plist-manager","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/z0al.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-15T19:43:43.000Z","updated_at":"2025-04-04T08:44:36.000Z","dependencies_parsed_at":"2025-04-15T16:33:27.736Z","dependency_job_id":null,"html_url":"https://github.com/z0al/plist-manager","commit_stats":null,"previous_names":["z0al/plist-manager"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0al%2Fplist-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0al%2Fplist-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0al%2Fplist-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0al%2Fplist-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/z0al","download_url":"https://codeload.github.com/z0al/plist-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249108906,"owners_count":21214088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["darwin","home-manager","macos","nix","nix-darwin","nix-flake"],"created_at":"2025-01-05T01:14:43.969Z","updated_at":"2025-04-15T16:34:34.438Z","avatar_url":"https://github.com/z0al.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plist-manager\n\n\u003c!-- MANUAL START --\u003e\n\n\u003c!-- toc --\u003e\n\n## Introduction\n\nPlist-manager (PM) is a Nix module for managing macOS user defaults. Unlike the built-in options offered by [nix-darwin](https://github.com/LnL7/nix-darwin) and [home-manager](https://github.com/nix-community/home-manager), PM provides the following advantages:\n\n- Human-friendly naming of domains and options, e.g., `trackpad.draggingStyle = \"three-fingers\"`.\n- Automatic reloading of system settings with `activateSettings -u` after applying changes.\n- Unsetting an option or explicitly setting it to `null` _resets_ its value, effectively performing a `defaults delete \u003cdomain\u003e \u003coption\u003e` command.\n\nThe _null equals reset_ rule makes this module particularly useful, as it ensures that any option previously set is restored to the system default. This behavior is crucial for configurations that are conditionally set, e.g., `NSGlobalDomain.AppleInterfaceStyle`, which is removed if the user opts for Light or Auto appearance mode.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e Since all options provided by this module default to `null`, by adding the module to a Nix flake you risk losing some user defaults that are not managed with Nix.\n\u003e\n\u003e This also makes the module incompatible with the built-in alternatives from nix-darwin and home-manager (unless used to set values that aren't touched by plist-manager; see the _\"Affects: ...\"_ block next to each option in the [reference](https://z0al.github.io/plist-manager#reference) for more information about which plist keys are affected).\n\u003e\n\u003e In the near future, I plan to keep track of unset values properly and only delete those instead of every attribute.\n\n## Installation\n\nTo get started, add `plist-manager` to your [Nix flake](https://nix.dev/concepts/flakes) inputs:\n\n```nix\n{\n  inputs.plist-manager.url = \"github:z0al/plist-manager\";\n  inputs.plist-manager.inputs.nixpkgs.follows = \"nixpkgs\";\n}\n```\n\nThis module provides integrations for both nix-darwin and home-manager. You can use either one, but NOT both, to avoid behavior conflicts.\n\n### For nix-darwin users\n\nAdd `plist-manager.darwinModules.default` to your nix-darwin modules:\n\n```nix\n{\n\tdarwinConfigurations.hostname = darwin.lib.darwinSystem {\n    modules = [\n      # ... other modules\n      plist-manager.darwinModules.default\n    ];\n  };\n}\n```\n\n### For home-manager users\n\nAdd `plist-manager.homeManagerModules.default` to your home-manager modules:\n\n```nix\n{\n\thomeConfigurations.userName = home-manager.lib.homeManagerConfiguration {\n    modules = [\n      # ... other modules\n      plist-manager.homeManagerModules.default\n    ];\n  };\n}\n```\n\n\u003c!-- MANUAL END --\u003e\n\n## Documentation\n\nSee available options at https://z0al.github.io/plist-manager\n\n## Development\n\n### Local Environment\n\nThis repository provides a Nix shell to set up all the tools you need. You can integrate it with [direnv](https://github.com/nix-community/nix-direnv) by adding the following to your `.envrc`:\n\n```sh\nuse_flake\n```\n\n### Running Unit Tests\n\nAll test files must be placed under `./tests` and prefixed with `test-*`. Tests are automatically imported. See [tests/setup.nix](./tests/setup.nix) for more details.\n\n```sh\nmake test\n```\n\n### Serving Documentation Locally\n\n```sh\nmake site\n```\n\n### Inspecting Plist Domains and Keys\n\nThis repository bundles [plistwatch](https://github.com/catilac/plistwatch), which is a handy tool for inspecting and identifying the associated plist domains and keys for various system settings.\n\n```sh\nmake watch\n```\n\n## License\n\nThis project is licensed under the terms of the [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz0al%2Fplist-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fz0al%2Fplist-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz0al%2Fplist-manager/lists"}