2023-07-26 09:06:51 +02:00
{ pkgs , . . . }:
{
2023-07-26 10:48:52 +02:00
# Many settings should be handled by home manager. System-wide settings are however managed here.
2023-11-16 14:37:23 +01:00
imports = [
./yabai.nix
] ;
2023-07-26 10:48:52 +02:00
2023-07-26 15:22:24 +02:00
nixpkgs . config . allowUnfree = true ;
nix = {
2023-08-21 23:54:18 +02:00
# gc = {
# automatic = true;
# options = "--delete-older-than 2d";
# };
2023-07-26 15:22:24 +02:00
2023-09-13 23:20:31 +02:00
settings = {
allow-dirty = true ;
experimental-features = [ " n i x - c o m m a n d " " f l a k e s " " r e p l - f l a k e " ] ;
builders-use-substitutes = true ;
log-lines = 50 ;
2024-02-09 21:26:15 +01:00
# https://github.com/NixOS/nix/issues/7273
# auto-optimise-store = true;
2023-09-13 23:20:31 +02:00
} ;
buildMachines = [
2023-11-16 14:37:23 +01:00
{
2023-12-25 01:37:05 +01:00
hostName = " d e f i a n t . h o m e . f e a l . n o " ;
2023-11-16 14:37:23 +01:00
system = " x 8 6 _ 6 4 - l i n u x " ;
maxJobs = 6 ;
2024-02-09 21:26:15 +01:00
supportedFeatures = [ " k v m " " b i g - p a r a l l e l " " b e n c h m a r k " " n i x o s - t e s t " ] ;
2023-11-16 14:37:23 +01:00
mandatoryFeatures = [ ] ;
sshUser = " f e l i x a l b " ;
sshKey = " / v a r / r o o t / . s s h / n i x - b u i l d e r " ;
2023-09-13 23:20:31 +02:00
}
] ;
distributedBuilds = true ;
extraOptions = " b u i l d e r s - u s e - s u b s t i t u t e s = t r u e " ;
2023-07-26 15:22:24 +02:00
} ;
2023-07-26 10:48:52 +02:00
# System packages for all users
2023-07-27 11:33:44 +02:00
environment = {
systemPackages = with pkgs ; [
2023-07-27 13:13:03 +02:00
findutils
gnugrep
2023-12-07 10:22:35 +01:00
jq
2023-07-27 11:33:44 +02:00
ripgrep
2023-08-08 08:51:20 +02:00
sshfs
2023-12-07 10:22:35 +01:00
wget
2024-01-20 12:53:58 +01:00
nix-output-monitor
2023-07-27 11:33:44 +02:00
] ;
variables = {
EDITOR = " n v i m " ;
VISUAL = " n v i m " ;
} ;
} ;
2023-07-26 09:06:51 +02:00
2023-07-26 10:48:52 +02:00
users . users . felixalb = {
home = " / U s e r s / f e l i x a l b " ;
shell = pkgs . zsh ;
} ;
programs . zsh . enable = true ;
system . activationScripts . postActivation . text = '' s u d o c h s h - s ${ pkgs . zsh } / b i n / z s h '' ; # Since it's not possible to declare default shell, run this command after build
2023-07-27 11:33:44 +02:00
fonts = {
fontDir . enable = true ;
fonts = with pkgs ; [
2023-09-13 23:20:31 +02:00
noto-fonts
2023-07-27 11:33:44 +02:00
font-awesome
2023-07-27 13:13:03 +02:00
fira-code
2023-07-27 11:33:44 +02:00
hack-font
2023-12-07 10:22:35 +01:00
2023-07-27 11:33:44 +02:00
( nerdfonts . override {
fonts = [
2023-07-27 13:13:03 +02:00
" H a c k "
2023-07-27 11:33:44 +02:00
] ;
} )
] ;
} ;
2023-07-26 15:22:24 +02:00
system . defaults = {
# login window settings
loginwindow = {
# disable guest account
GuestEnabled = false ;
# show name instead of username
SHOWFULLNAME = false ;
} ;
finder = {
AppleShowAllExtensions = true ;
FXEnableExtensionChangeWarning = true ;
_FXShowPosixPathInTitle = true ;
} ;
# firewall settings
alf = {
# 0 = disabled 1 = enabled 2 = blocks all connections except for essential services
globalstate = 1 ;
loggingenabled = 0 ;
stealthenabled = 1 ;
} ;
# dock settings
dock = {
autohide = true ;
autohide-delay = 0 .0 ;
autohide-time-modifier = 1 .0 ;
2023-08-08 08:51:20 +02:00
tilesize = 45 ;
2023-07-26 15:22:24 +02:00
static-only = false ;
showhidden = false ;
show-recents = false ;
show-process-indicators = true ;
orientation = " b o t t o m " ;
mru-spaces = false ;
} ;
} ;
system . keyboard = {
enableKeyMapping = true ;
remapCapsLockToControl = true ;
} ;
2023-07-26 09:06:51 +02:00
# Auto upgrade nix package and the daemon service.
services . nix-daemon . enable = true ;
nix . package = pkgs . nix ;
}