fix: macos.nix 🐛
This commit is contained in:
parent
6eb2da277f
commit
dfd4a10c1a
1 changed files with 52 additions and 74 deletions
|
|
@ -1,90 +1,68 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
||||||
|
|
||||||
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
|
|
||||||
# https://github.com/nix-community/NixOS-WSL
|
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
# Apple Silicon + nix-darwin basics
|
||||||
useDHCP = true;
|
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||||
# nameserver sources: https://dnsmap.io/articles/most-popular-dns-servers
|
services.nix-daemon.enable = true;
|
||||||
nameservers = [ "84.200.69.80" "8.26.56.26" "1.1.1.1" "8.8.8.8" "64.6.65.6" "208.67.222.222" "209.244.0.3" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
# TODO: move to home manager (?)
|
|
||||||
programs = {
|
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
# enableFishIntegration = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "25.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
users.users.danny = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
initialPassword = "test";
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Shells & dev ergonomics
|
||||||
|
programs.fish.enable = true;
|
||||||
|
environment.shells = [ pkgs.fish ];
|
||||||
|
# If you want fish as default shell, uncomment:
|
||||||
|
# users.defaultUserShell = pkgs.fish;
|
||||||
|
|
||||||
|
programs.direnv.enable = true;
|
||||||
|
programs.direnv.nix-direnv.enable = true;
|
||||||
|
|
||||||
|
# Networking (macOS-safe)
|
||||||
|
networking = {
|
||||||
|
# Set if you want a specific hostname in macOS UI as well:
|
||||||
|
hostName = "Daniel-Macbook-Air";
|
||||||
|
knownNetworkServices = [ "Wi-Fi" "Thunderbolt Bridge" ];
|
||||||
|
dns = [
|
||||||
|
"84.200.69.80" "8.26.56.26" "1.1.1.1" "8.8.8.8" "64.6.65.6" "208.67.222.222" "209.244.0.3"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# macOS niceties
|
||||||
|
security.pam.enableSudoTouchIdAuth = true;
|
||||||
|
|
||||||
|
system.defaults = {
|
||||||
|
# Keyboard
|
||||||
|
NSGlobalDomain = {
|
||||||
|
ApplePressAndHoldEnabled = false;
|
||||||
|
InitialKeyRepeat = 15;
|
||||||
|
KeyRepeat = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Finder & Dock
|
||||||
|
finder.AppleShowAllExtensions = true;
|
||||||
|
dock.autohide = true;
|
||||||
|
dock.mru-spaces = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Environment
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
DBT_USER = "DNTH";
|
DBT_USER = "DNTH";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# tmux # activated in tmux.nix
|
gh
|
||||||
# vim # using neovim in stead
|
ripgrep
|
||||||
# neovim # activated in neovim.nix
|
wget
|
||||||
|
busybox
|
||||||
# disabled git as it comes pre-installed on macos - delete or re-enable?
|
openssl
|
||||||
# git # version control
|
neofetch
|
||||||
gh # github cli tool
|
btop
|
||||||
|
tldr
|
||||||
ripgrep # faster grep
|
fzf
|
||||||
wget # for vscode-server
|
|
||||||
busybox # useful programs e.g. tree, unzip etc
|
|
||||||
openssl # cryptography swiss army knife
|
|
||||||
xdg-utils # terminal desktop intergrations (i.e. allow terminal to open browser)
|
|
||||||
|
|
||||||
# make default.nix in python project folders instead of using a top-level python environment manager
|
|
||||||
# pyenv
|
|
||||||
# poetry
|
|
||||||
|
|
||||||
neofetch # system info
|
|
||||||
btop # resource monitor
|
|
||||||
tldr # community alternative to man
|
|
||||||
fzf # fuzzy finder
|
|
||||||
|
|
||||||
# gimp # bloat
|
|
||||||
# blender # bloat
|
|
||||||
# inkscape # bloat
|
|
||||||
|
|
||||||
cowsay
|
cowsay
|
||||||
lolcat
|
lolcat
|
||||||
];
|
];
|
||||||
|
|
||||||
# services.vscode-server.enable = true;
|
# Keep for darwin as well (tracks defaults across upgrades)
|
||||||
# security.rtkit.enable = true; # realtime kit hands out realtime scheduling priority
|
system.stateVersion = "25.05";
|
||||||
# services.pipewire = {
|
|
||||||
# enable = true; # if not already enabled
|
|
||||||
# alsa.enable = true;
|
|
||||||
# alsa.support32Bit = true;
|
|
||||||
# pulse.enable = true;
|
|
||||||
# # If you want to use JACK applications, uncomment this
|
|
||||||
# #jack.enable = true;
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue