Split mac-portable module out

This commit is contained in:
2026-03-29 09:36:29 +02:00
parent 5637b6188f
commit 2b6a9f52b9
4 changed files with 70 additions and 63 deletions

View File

@@ -60,8 +60,11 @@
);
});
homeModules.main = {
imports = [ ./modules/home.nix ];
homeModules = {
main = import ./modules/home.nix;
};
darwinModules = {
mac-portable = import ./modules/mac-portable.nix;
};
homeConfigurations."artem@deimos" = home-manager.lib.homeManagerConfiguration {
@@ -85,6 +88,7 @@
system = "x86_64-darwin";
specialArgs.primaryUser = "artem";
modules = [
self.darwinModules.mac-portable
inputs.fw_nix.nixosModules.tools
inputs.fw_nix.nixosModules.nix-settings
inputs.fw_nix.nixosModules.futureware

View File

@@ -1,62 +1,5 @@
{ pkgs, primaryUser, ... }:
{
nixpkgs.hostPlatform = "x86_64-darwin";
nixpkgs.config.allowUnfree = true;
system.primaryUser = primaryUser;
users.users.${primaryUser} = {
home = "/Users/${primaryUser}";
shell = pkgs.zsh;
};
security.pam.services.sudo_local.touchIdAuth = true;
system = {
startup.chime = false;
defaults = {
loginwindow = {
GuestEnabled = false;
DisableConsoleAccess = true;
};
finder = {
AppleShowAllFiles = true; # hidden files
AppleShowAllExtensions = true; # file extensions
_FXShowPosixPathInTitle = true; # title bar full path
ShowPathbar = true; # breadcrumb nav at bottom
ShowStatusBar = true; # file count & disk space
};
NSGlobalDomain = {
NSAutomaticSpellingCorrectionEnabled = false;
NSAutomaticCapitalizationEnabled = false;
NSAutomaticPeriodSubstitutionEnabled = false;
NSAutomaticWindowAnimationsEnabled = false;
};
};
};
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true;
nix-homebrew = {
# Initial install of homebrew.
enable = true;
user = primaryUser;
autoMigrate = true;
};
homebrew = {
enable = true;
onActivation = {
cleanup = "zap";
autoUpdate = false;
upgrade = true;
};
casks = [
"bambu-studio"
];
};
system.stateVersion = 6; # Never change.
_: {
homebrew.casks = [
"bambu-studio"
];
}

View File

@@ -4,6 +4,7 @@
stow
wget
gemini-cli
silver-searcher
];
programs.zsh = {

59
modules/mac-portable.nix Normal file
View File

@@ -0,0 +1,59 @@
{ pkgs, primaryUser, ... }:
{
nixpkgs.hostPlatform = "x86_64-darwin";
nixpkgs.config.allowUnfree = true;
system.primaryUser = primaryUser;
users.users.${primaryUser} = {
home = "/Users/${primaryUser}";
shell = pkgs.zsh;
};
security.pam.services.sudo_local.touchIdAuth = true;
system = {
startup.chime = false;
defaults = {
loginwindow = {
GuestEnabled = false;
DisableConsoleAccess = true;
};
finder = {
AppleShowAllFiles = true; # hidden files
AppleShowAllExtensions = true; # file extensions
_FXShowPosixPathInTitle = true; # title bar full path
ShowPathbar = true; # breadcrumb nav at bottom
ShowStatusBar = true; # file count & disk space
};
NSGlobalDomain = {
NSAutomaticSpellingCorrectionEnabled = false;
NSAutomaticCapitalizationEnabled = false;
NSAutomaticPeriodSubstitutionEnabled = false;
NSAutomaticWindowAnimationsEnabled = false;
};
};
};
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true;
nix-homebrew = {
# Initial install of homebrew.
enable = true;
user = primaryUser;
autoMigrate = true;
};
homebrew = {
enable = true;
onActivation = {
cleanup = "zap";
autoUpdate = false;
upgrade = true;
};
};
system.stateVersion = 6; # Never change.
}