{ description = "Example darwin system flake"; inputs = { nixpkgs.url = "github:nixos/nixpkgs"; darwin.url = "github:lnl7/nix-darwin"; darwin.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, darwin, nixpkgs }: let configuration = { pkgs, ... }: { # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = [ pkgs.vim ]; # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; # nix.package = pkgs.nix; # Necessary for using flakes on this system. nix.settings.experimental-features = "nix-command flakes"; # Create /etc/zshrc that loads the nix-darwin environment. programs.zsh.enable = true; # default shell on catalina # programs.fish.enable = true; # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog system.stateVersion = 4; }; in { # Build darwin flake using: # $ darwin-rebuild build --flake .#simple darwinConfigurations."simple" = darwin.lib.darwinSystem { modules = [ configuration ]; system = "x86_64-darwin"; }; # Expose the package set, including overlays, for convenience. darwinPackages = self.darwinConfigurations."simple".pkgs; }; }