nix-plist-manager
Declarative management of macOS system settings via plist files using nix-darwin
Overview
Section titled “Overview”nix-plist-manager is a Nix module that provides a declarative interface for configuring macOS system settings stored in plist files. It integrates with nix-darwin to allow users to define system preferences in Nix expressions, ensuring reproducible and version-controlled configurations.
nix-darwin (Global Settings)
Section titled “nix-darwin (Global Settings)”Integrate the module into your nix-darwin configuration:
{ inputs = { nix-plist-manager.url = "github:sushydev/nix-plist-manager"; };
outputs = { self, nix-darwin, nix-plist-manager, ... }: { darwinConfigurations."hostname" = nix-darwin.lib.darwinSystem { modules = [ nix-plist-manager.darwinModules.default # Configuration options here ]; }; };}home-manager (User Settings)
Section titled “home-manager (User Settings)”For user-specific settings with home-manager:
{ inputs = { nix-plist-manager.url = "github:sushydev/nix-plist-manager"; };
outputs = { self, home-manager, nix-plist-manager, ... }: { homeConfigurations."username" = home-manager.lib.homeManagerConfiguration { modules = [ nix-plist-manager.homeManagerModules.default # Configuration options here ]; }; };}Example
Section titled “Example”Configure Dock size for user settings:
{ programs.nix-plist-manager = { enable = true; options.applications.systemSettings.desktopAndDock.dock.size = 64; };}For system settings with nix-darwin:
{ services.nix-plist-manager = { enable = true; options.applications.systemSettings.general.softwareUpdate.automaticallyDownloadNewUpdatesWhenAvailable = true; };}Refer to the reference documentation for available configuration attributes.