nix-config/hosts/malus/configuration.nix
2026-03-04 19:53:00 +01:00

108 lines
2.7 KiB
Nix

{ inputs, ... }:
{
imports = [
inputs.home-manager.darwinModules.home-manager
inputs.agenix.darwinModules.default
../../modules/darwin
];
## Set username and home directory (required by home-manager)
users.users.jan = {
name = "jan";
home = "/Users/jan";
};
networking.hostName = "malus";
nix = {
enable = false;
## Recommended for nixd
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"jan"
"@admin"
];
};
};
nixpkgs = {
hostPlatform = "aarch64-darwin";
config.allowUnfree = true;
## TODO List packages that require this
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.jan = import ../../modules/home-manager;
extraSpecialArgs = {
inherit inputs;
};
backupFileExtension = "backup";
};
homebrew = {
enable = true;
onActivation = {
upgrade = true;
cleanup = "zap"; # Remove all files from the package
};
};
security = {
pam.services.sudo_local.touchIdAuth = true; # Enable TouchID for sudo
sudo.extraConfig = ''
Defaults lecture = never
Defaults pwfeedback
Defaults timestamp_timeout = 60
Defaults env_keep += "DISPLAY EDITOR PATH"
'';
};
system = {
primaryUser = "jan";
defaults = {
dock = {
autohide = true;
autohide-delay = 0.0;
autohide-time-modifier = 0.0;
orientation = "left";
mru-spaces = false;
largesize = 64;
magnification = false;
## TODO Check if this works again
# persistent-apps = [
# "/Applications/Safari.app"
# "/System/Applications/Mail.app"
# "/System/Applications/Calendar.app"
# "/Applications/Things3.app"
# "/Applications/Ghostty.app"
# "/Applications/Obsidian.app"
# "/System/Applications/Preview.app"
# "/Applications/NetNewsWire.app"
# "/System/Applications/Music.app"
# "/System/Applications/Books.app"
# "/System/Applications/System Settings.app"
# ];
};
finder = {
AppleShowAllExtensions = true;
FXPreferredViewStyle = "clmv"; # Column view
ShowPathbar = true; # Show path at bottom
_FXShowPosixPathInTitle = true; # Show path at top
};
};
## Set Git commit hash for darwin-version.
configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;
## Used for backwards compatibility, please read the changelog before changing.
## $ darwin-rebuild changelog
stateVersion = 4;
};
}