Configure a lil more in darwin

This commit is contained in:
Nathan McCarty 2023-03-29 21:06:19 -04:00
parent 288cf4a7ae
commit d2c465625d
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
3 changed files with 44 additions and 2 deletions

View File

@ -10,4 +10,9 @@
cores = 8; cores = 8;
max-jobs = 2; max-jobs = 2;
}; };
# Set the system name
networking = {
hostName = "extremophile";
computerName = "extremophile";
};
} }

View File

@ -6,8 +6,13 @@ let
}) })
nLib; nLib;
in { in {
imports = imports = [
[ ../options.nix ../common/programs/utils.nix ./user.nix ./fonts.nix ]; ../options.nix
../common/programs/utils.nix
./user.nix
./fonts.nix
./settings.nix
];
options = with lib; options = with lib;
with nLib; { with nLib; {
@ -16,6 +21,8 @@ in {
# Install fonts # Install fonts
# On by default if the system is a desktop # On by default if the system is a desktop
fonts = mkDefaultOption "fonts" config.nathan.config.isDesktop; fonts = mkDefaultOption "fonts" config.nathan.config.isDesktop;
# Macos settings
settings = mkDefaultOption "settings" config.nathan.config.isDesktop;
}; };
programs = { programs = {
# Firefox, enabled by default on linux desktop # Firefox, enabled by default on linux desktop
@ -61,6 +68,8 @@ in {
programs.fish.enable = true; programs.fish.enable = true;
# Make nix managed fonts work # Make nix managed fonts work
fonts.fontDir.enable = true; fonts.fontDir.enable = true;
# Configure nix to be a lil smarter with the store
nix.settings.auto-optimise-store = true;
# Make nix assume control of homebrew # Make nix assume control of homebrew
homebrew = { homebrew = {
enable = true; enable = true;

View File

@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
let nc = config.nathan.config;
in with lib; {
# Generic desktop configuration
config = mkIf nc.settings {
system = {
defaults = {
dock = {
autohide = true;
minimize-to-application = true;
show-recents = false;
# Don't rearrange spaces based on most recent use
mru-spaces = false;
};
finder = {
AppleShowAllExtensions = true;
ShowPathbar = true;
};
NSGlobalDomain = {
# Enable dark mode
AppleInterfaceStyle = "Dark";
# Disable "natural" scrolling
com.apple = { swipescrolldirection = "false"; };
};
};
};
};
}