mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-19 15:53:46 +01:00
67 lines
1.6 KiB
Nix
67 lines
1.6 KiB
Nix
{ pkgs, lib, ... }:
|
||
{
|
||
# # enable flakes globally
|
||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||
|
||
# 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;
|
||
|
||
# Add ability to used TouchID for sudo authentication
|
||
security.pam.enableSudoTouchIdAuth = true;
|
||
|
||
# Keyboard
|
||
system.keyboard.enableKeyMapping = true;
|
||
system.keyboard.remapCapsLockToEscape = true;
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "Asia/Shanghai";
|
||
|
||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||
programs.zsh.enable = true;
|
||
|
||
# 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
|
||
];
|
||
|
||
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.admin = {
|
||
home = "/Users/admin";
|
||
description = "admin";
|
||
};
|
||
} |