This commit is contained in:
Morten Olsen
2025-12-15 11:42:42 +01:00
committed by Morten Olsen
commit f42a092b60
21 changed files with 4695 additions and 0 deletions

68
hosts/work/default.nix Normal file
View File

@@ -0,0 +1,68 @@
# Work machine darwin configuration
#
# This file contains nix-darwin settings specific to the work machine.
# It sets up system-level configuration and integrates with home-manager.
{
config,
pkgs,
lib,
username,
...
}: {
# Import darwin modules
imports = [
../../modules/darwin/homebrew.nix
];
# Nix configuration
nix = {
settings = {
# Enable flakes and new nix command
experimental-features = ["nix-command" "flakes"];
# Avoid unwanted garbage collection when using nix-direnv
keep-outputs = true;
keep-derivations = true;
};
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Set the primary user for this machine (required for homebrew and other user-specific options)
system.primaryUser = username;
users.users.${username} = {
name = username;
home = "/Users/${username}";
};
# System-level programs
programs = {
# Enable zsh as it's the default macOS shell
zsh.enable = true;
};
# Allow nix-darwin to manage /etc files that may already exist
# These hashes are from the existing system files that nix-darwin will replace
environment.etc = {
bashrc.knownSha256Hashes = [
"8b5e3466922d1ae34bc145e21c7e53e7329a7a7b58b148b436bd954d5e651ac3"
];
zshrc.knownSha256Hashes = [
"cf0f7b7775b4c058d6085d9e7e57d58c307ca43730f8e4d921a9ef4e530e7e16"
];
};
# macOS system preferences will be configured in modules/darwin/system.nix
# Homebrew configuration - shared and work casks (no personal casks)
modules.homebrew = {
enable = true;
casks.enablePersonal = false;
casks.enableWork = true;
};
# Used for backwards compatibility, read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 5;
}