{ config, pkgs, lib, ... }: { # Nix configuration ------------------------------------------------------------------------------ nix.settings = { trusted-substituters = [ "https://cache.nixos.org/" "https://hydra.iohk.io" "https://cache.iog.io" "https://nix-community.cachix.org" "https://mat.cachix.org" "https://helix.cachix.org" "https://pre-commit-hooks.cachix.org" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "mat.cachix.org-1:AHqv9SoBEPKlJX2DDZQnjaMcvBAgpH1j8rw5USYDZno=" "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" "pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc=" ]; trusted-users = [ "@admin" ]; auto-optimise-store = true; experimental-features = [ "nix-command" "flakes" ]; extra-platforms = lib.mkIf (pkgs.system == "aarch64-darwin") [ "x86_64-darwin" "aarch64-darwin" ]; }; nix.configureBuildUsers = true; # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; # Make Fish the default shell environment.shells = with pkgs; [ bashInteractive fish zsh ]; programs.fish.enable = true; programs.fish.useBabelfish = true; programs.fish.babelfishPackage = pkgs.babelfish; # Needed to address bug where $PATH is not properly set for fish: # https://github.com/LnL7/nix-darwin/issues/122 programs.fish.shellInit = '' for p in (string split : ${config.environment.systemPath}) if not contains $p $fish_user_paths set -Ua fish_user_paths $p end end ''; environment.variables.SHELL = "${pkgs.fish}/bin/fish"; environment.loginShell = "${pkgs.fish}/bin/fish"; # Install and setup ZSH to work with nix(-darwin) as well programs.zsh.enable = true; # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog system.stateVersion = 4; }