Files
nix-config/modules/darwin/core.nix
Ryan Yin c6e736d64b feat: install some apps from apple store instead of homebrew
feat: replace username with ryan
fix: secrets
2023-07-15 16:33:22 +08:00

103 lines
2.7 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{ pkgs, lib, ... }:
{
###################################################################################
#
# Core configuration for nix-darwin
#
# All the configuration options are documented here:
# https://daiderd.com/nix-darwin/manual/index.html#sec-options
#
###################################################################################
# enable flakes globally
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = ["ryan"];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# Use this instead of services.nix-daemon.enable if you
# don't wan't the daemon service to be managed for you.
# nix.useDaemon = true;
nix.package = pkgs.nix;
programs.nix-index.enable = true;
# boot.loader.grub.configurationLimit = 10;
# do garbage collection weekly to keep disk usage low
nix.gc = {
automatic = lib.mkDefault true;
options = lib.mkDefault "--delete-older-than 1w";
};
# Manual optimise storage: nix-store --optimise
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
nix.settings.auto-optimise-store = true;
# Add ability to used TouchID for sudo authentication
security.pam.enableSudoTouchIdAuth = true;
# Set your time zone.
# comment this due to the issue:
# https://github.com/LnL7/nix-darwin/issues/359
# time.timeZone = "Asia/shanghai";
# Apps
# `home-manager` currently has issues adding them to `~/Applications`
# Issue: https://github.com/nix-community/home-manager/issues/1341
environment.systemPackages = with pkgs; [
neovim
git
nushell # my custom shell
];
environment.variables.EDITOR = "nvim";
# Fonts
fonts = {
# use fonts specified by user rather than default ones
fontDir.enable = true;
fonts = with pkgs; [
# icon fonts
material-design-icons
font-awesome
# nerdfonts
(nerdfonts.override {
fonts = [
"FiraCode"
"JetBrainsMono"
"Iosevka"
];
})
];
};
# Define a user account. Don't forget to set a password with passwd.
users.users.ryan = {
home = "/Users/ryan";
description = "ryan";
# set user's default shell back to zsh
# `chsh -s /bin/zsh`
# DO NOT change the system's default shell to nushell! it will break some apps!
# It's better to change only starship/alacritty/vscode's shell to nushell!
};
# Create /etc/zshrc that loads the nix-darwin environment.
# this is required if you want to use darwin's default shell - zsh
programs.zsh.enable = true;
environment.shells = [
pkgs.zsh
pkgs.nushell # my custom shell
];
}