dotfiles/nix/base-system/darwin-configuration.nix

69 lines
1.9 KiB
Nix
Raw Normal View History

{ pkgs, config, lib, ... }:
2022-02-21 14:01:24 -05:00
{
2022-05-02 19:25:20 -04:00
nix = {
package = pkgs.nix;
# SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812
settings.sandbox = "relaxed";
2022-05-02 19:25:20 -04:00
extraOptions = ''
experimental-features = nix-command flakes repl-flake
extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux
2022-05-02 19:25:20 -04:00
'';
};
2022-11-20 14:04:02 -05:00
# Right now the documentation build is broken.
# TODO(jwall): Add this back when they work again.
documentation.enable = false;
2022-02-21 14:01:24 -05:00
# I'm not a zealot about this one.
nixpkgs.config.allowUnfree = true;
2022-04-17 16:02:03 -04:00
nixpkgs.overlays = [
(self: super: {
neovim = super.neovim.override {
viAlias = true;
vimAlias = true;
};
})
];
2023-06-07 15:26:33 -04:00
launchd.user.agents.ipfs = {
serviceConfig = {
ProgramArguments = [
2023-06-11 20:09:08 -04:00
"${pkgs.kubo}/bin/ipfs"
2023-06-07 15:26:33 -04:00
"daemon"
"--init"
];
KeepAlive = true;
RunAtLoad = true;
};
};
2023-07-11 11:31:13 -04:00
# TODO launchd.user.agents.prometheus;
2022-02-21 14:01:24 -05:00
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
2022-02-21 14:01:24 -05:00
#services.spacebar.enable = true;
#services.spacebar.package = "${pkgs.spacebar}";
# Create /etc/bashrc that loads the nix-darwin environment.
# programs.bash.enable = true; # default shell on catalina
2022-02-21 14:01:24 -05:00
# programs.fish.enable = true;
system.defaults = {
finder.AppleShowAllExtensions = true;
};
system.systemBuilderArgs = lib.mkIf (config.nix.settings.sandbox == "relaxed") {
sandboxProfile = ''
(allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}"))
'';
};
2022-02-21 14:01:24 -05:00
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
}