mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 21:32:27 +00:00
Fix home-manager impurity and add brew configuration
This commit is contained in:
43
modules/darwin/brew.nix
Normal file
43
modules/darwin/brew.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
checkBrew = "command -v brew > /dev/null";
|
||||
in
|
||||
{
|
||||
environment = {
|
||||
extraInit = ''
|
||||
${checkBrew} || >&2 echo "brew is not installed (install it via https://brew.sh)"
|
||||
'';
|
||||
};
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
autoUpdate = true;
|
||||
global = {
|
||||
brewfile = true;
|
||||
noLock = true;
|
||||
};
|
||||
|
||||
brews = [
|
||||
"aws-sam-cli"
|
||||
"fabianishere/personal/pam_reattach"
|
||||
"netdata"
|
||||
];
|
||||
|
||||
casks = [
|
||||
"1password"
|
||||
"visual-studio-code"
|
||||
];
|
||||
|
||||
taps = [
|
||||
"aws/tap"
|
||||
"homebrew/bundle"
|
||||
"homebrew/cask"
|
||||
"homebrew/cask-fonts"
|
||||
"homebrew/cask-versions"
|
||||
"homebrew/core"
|
||||
"homebrew/services"
|
||||
];
|
||||
|
||||
};
|
||||
}
|
6
modules/darwin/default.nix
Normal file
6
modules/darwin/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./brew.nix
|
||||
./preferences.nix
|
||||
];
|
||||
}
|
57
modules/darwin/preferences.nix
Normal file
57
modules/darwin/preferences.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
system.defaults = {
|
||||
loginwindow = {
|
||||
GuestEnabled = false;
|
||||
SHOWFULLNAME = false;
|
||||
};
|
||||
|
||||
finder = {
|
||||
AppleShowAllExtensions = true;
|
||||
FXEnableExtensionChangeWarning = true;
|
||||
_FXShowPosixPathInTitle = true;
|
||||
};
|
||||
|
||||
trackpad = {
|
||||
ActuationStrength = 0;
|
||||
Clicking = true;
|
||||
FirstClickThreshold = 1;
|
||||
SecondClickThreshold = 1;
|
||||
TrackpadRightClick = false;
|
||||
};
|
||||
|
||||
# firewall
|
||||
alf = {
|
||||
# 0 = disabled 1 = enabled 2 = blocks all connections except for essential services
|
||||
globalstate = 1;
|
||||
loggingenabled = 0;
|
||||
stealthenabled = 1;
|
||||
};
|
||||
|
||||
dock = {
|
||||
autohide = true;
|
||||
autohide-delay = "0.0";
|
||||
autohide-time-modifier = "1.0";
|
||||
tilesize = 50;
|
||||
static-only = false;
|
||||
showhidden = false;
|
||||
show-recents = false;
|
||||
show-process-indicators = true;
|
||||
orientation = "bottom";
|
||||
mru-spaces = false;
|
||||
};
|
||||
|
||||
NSGlobalDomain = {
|
||||
"com.apple.sound.beep.feedback" = 0;
|
||||
"com.apple.sound.beep.volume" = "0.000";
|
||||
ApplePressAndHoldEnabled = false;
|
||||
# delay before repeating keystrokes
|
||||
InitialKeyRepeat = 10;
|
||||
# delay between repeated keystrokes upon holding a key
|
||||
KeyRepeat = 1;
|
||||
AppleShowAllExtensions = true;
|
||||
AppleShowScrollBars = "Automatic";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user