Mac configuration in pkl. Simple alternative to nix-darwin
Run the install script directly from GitHub:
curl -fsSL https://raw.githubusercontent.com/quintisimo/macfigure/main/install.sh | bashThe script will:
- Install Homebrew if it is not already installed.
- Download the latest pkl release from GitHub and move it to
/usr/local/bin(required to parse config files). - Download the latest
macfigurerelease from GitHub and move it to/usr/local/bin.
Example config.pkl:
- Allowed values for each section can be found in the section pkl file in the pkl folder
amends "https://raw.githubusercontent.com/quintisimo/macfigure/pkl/config.pkl"
brew {
casks = List("zed")
}
cron {
new {
schedule = "0 9 * * 1-5"
source = "/Users/quintisimo/Github/personal/macfigure/hello.sh"
target = "/tmp/hello.sh"
}
}
nsglobaldomain {
AppleIconAppearanceTheme = "RegularAutomatic"
}
dock {
apps = List("/Applications/Zed.app", "spacer", "small-spacer")
`show-recents` = false
}
secret {
new {
source = "./secrets.age"
target = "/tmp/secrets.sh"
}
}Execute the config by running:
macfigure sync -c config.pkl