2024-09-04 13:41:34 -07:00
{ self , pkgs , config , . . . }:
2024-03-18 12:02:21 -07:00
{
imports = [
./sketchybar
./yabai
2024-09-03 21:43:23 -07:00
# ./casks
2024-03-18 12:02:21 -07:00
# ../../modules/darwin/home-manager.nix
# ../../modules/shared
# ../../modules/shared/cachix
] ;
environment . systemPackages = [
pkgs . go
2024-09-03 21:43:23 -07:00
pkgs . python3
pkgs . cargo
pkgs . k9s
pkgs . kubernetes-helm
2024-09-08 16:32:30 -07:00
pkgs . shellcheck
2024-03-18 12:02:21 -07:00
] ;
2024-09-04 13:41:34 -07:00
age . identityPaths = [ " / U s e r s / a n i s h l a k h w a r a / . s s h / i d _ e d 2 5 5 1 9 " ] ;
age . secrets . work-wg . file = " ${ self } / s e c r e t s / w o r k - w g . a g e " ;
age . secrets . work-wg . owner = " a n i s h l a k h w a r a " ;
networking . wg-quick . interfaces = {
wg0 = {
address = [ " 1 0 . 0 . 6 9 . 7 / 2 4 " ] ;
listenPort = 60990 ; # to match firewall allowedUDPPorts (without this wg uses random port numbers)
privateKeyFile = config . age . secrets . work-wg . path ;
dns = [ " 1 0 . 0 . 6 9 . 4 " ] ;
2024-10-04 22:04:20 -07:00
postDown = ''
sudo /usr/sbin/networksetup - setdnsservers Wi-Fi " E m p t y "
'' ;
2024-09-04 13:41:34 -07:00
peers = [
# For a client configuration, one peer entry for the server will suffice.
{
publicKey = " c 1 J 4 p 6 3 r D 3 I l s z u g M Z i k i 7 U B V 3 Y m D d q a 3 D U 4 U e j X z A I = " ;
allowedIPs = [ " 1 0 . 0 . 6 9 . 0 / 2 4 " ] ;
# Set this to the server IP and port.
endpoint = " s e a l i g h t . x y z : 6 0 9 9 0 " ; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577
persistentKeepalive = 25 ;
}
] ;
} ;
} ;
2024-09-03 21:43:23 -07:00
2024-03-18 12:02:21 -07:00
# Auto upgrade nix package and the daemon service.
services . nix-daemon . enable = true ;
nixpkgs . hostPlatform = " a a r c h 6 4 - d a r w i n " ;
programs . zsh . enable = true ;
# Setup user, packages, programs
nix = {
# package = pkgs.nixUnstable;
settings . trusted-users = [ " @ a d m i n " " a n i s h l a k h w a r a " ] ;
gc = {
user = " r o o t " ;
automatic = true ;
interval = { Weekday = 0 ; Hour = 2 ; Minute = 0 ; } ;
options = " - - d e l e t e - o l d e r - t h a n 3 0 d " ;
} ;
# Turn this on to make command line easier
extraOptions = ''
experimental-features = nix-command flakes
'' ;
} ;
# Turn off NIX_PATH warnings now that we're using flakes
system . checks . verifyNixPath = false ;
# Load configuration that is shared across systems
# environment.systemPackages = with pkgs; [
#
# ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; });
# Enable fonts dir
2024-09-03 21:43:23 -07:00
# fonts.fontDir.enable = true;
fonts . packages = with pkgs ; [
2024-03-18 12:02:21 -07:00
fira-code
fira-code-symbols
hermit
#hack
siji
font-awesome
proggyfonts
( nerdfonts . override { fonts = [ " F i r a C o d e " " D r o i d S a n s M o n o " " I o s e v k a " ] ; } )
] ;
system = {
stateVersion = 4 ;
keyboard = {
enableKeyMapping = true ;
} ;
defaults = {
LaunchServices = {
LSQuarantine = false ;
} ;
NSGlobalDomain = {
AppleShowAllExtensions = true ;
ApplePressAndHoldEnabled = false ;
# 120, 90, 60, 30, 12, 6, 2
KeyRepeat = 2 ;
# 120, 94, 68, 35, 25, 15
InitialKeyRepeat = 15 ;
" c o m . a p p l e . m o u s e . t a p B e h a v i o r " = 1 ;
" c o m . a p p l e . s o u n d . b e e p . v o l u m e " = 0 .0 ;
" c o m . a p p l e . s o u n d . b e e p . f e e d b a c k " = 0 ;
} ;
loginwindow = {
# disable guest account
GuestEnabled = false ;
# show name instead of username
SHOWFULLNAME = false ;
} ;
dock = {
autohide = true ;
autohide-delay = 0 .0 ;
autohide-time-modifier = 1 .0 ;
static-only = false ;
showhidden = false ;
show-recents = false ;
launchanim = true ;
mouse-over-hilite-stack = true ;
orientation = " b o t t o m " ;
tilesize = 48 ;
2024-09-03 21:43:23 -07:00
mru-spaces = false ;
2024-03-18 12:02:21 -07:00
} ;
finder = {
_FXShowPosixPathInTitle = false ;
} ;
trackpad = {
Clicking = false ;
TrackpadThreeFingerDrag = true ;
} ;
} ;
# keyboard = {
# enableKeyMapping = true;
# remapCapsLockToControl = true;
# };
} ;
}