[macbook] Revamp for brand new mac.
Signed-off-by: Mariano Uvalle <juvallegarza@microsoft.com>
This commit is contained in:
parent
4d6b32eae9
commit
e066199fce
3 changed files with 29 additions and 22 deletions
|
|
@ -141,14 +141,15 @@
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/macbook/configuration.nix
|
./hosts/macbook/configuration.nix
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
{
|
({ config, ... }: {
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
pkgs-unstable = pkgs-unstable_aarch64-darwin;
|
pkgs-unstable = pkgs-unstable_aarch64-darwin;
|
||||||
|
inherit (config) user;
|
||||||
};
|
};
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.uagm.imports = [ ./hosts/macbook/home.nix ];
|
home-manager.users.uagm.imports = [ ./hosts/macbook/home.nix ];
|
||||||
}
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"msft-mac" = nix-darwin.lib.darwinSystem {
|
"msft-mac" = nix-darwin.lib.darwinSystem {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
{ self, pkgs, ... }: {
|
{ self, pkgs, config, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hotkeys.nix
|
./hotkeys.nix
|
||||||
|
../../modules/common
|
||||||
];
|
];
|
||||||
|
|
||||||
# To reflect hotkeys without a login cycle.
|
# To reflect hotkeys without a login cycle.
|
||||||
system.activationScripts.postActivation.text = ''
|
system.activationScripts.postActivation.text = ''
|
||||||
sudo -u uagm /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
|
sudo -u ${config.user.name} /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# List packages installed in system profile. To search by name, run:
|
# List packages installed in system profile. To search by name, run:
|
||||||
|
|
@ -15,7 +16,9 @@
|
||||||
neofetch
|
neofetch
|
||||||
];
|
];
|
||||||
|
|
||||||
system.primaryUser = "uagm";
|
user.name = "jmug";
|
||||||
|
|
||||||
|
system.primaryUser = config.user.name;
|
||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -37,7 +40,7 @@
|
||||||
"ghostty"
|
"ghostty"
|
||||||
"kicad"
|
"kicad"
|
||||||
"secretive"
|
"secretive"
|
||||||
"gcc-arm-embedded"
|
"gcc-arm-embedded" # Maybe defer this to individual porject flakes.
|
||||||
"karabiner-elements"
|
"karabiner-elements"
|
||||||
"raycast"
|
"raycast"
|
||||||
"logi-options+"
|
"logi-options+"
|
||||||
|
|
@ -49,7 +52,7 @@
|
||||||
nerd-fonts.bigblue-terminal
|
nerd-fonts.bigblue-terminal
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.uagm.home = "/Users/uagm";
|
users.users.${config.user.name}.home = config.user.homeDirectory;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
@ -63,7 +66,7 @@
|
||||||
|
|
||||||
# Used for backwards compatibility, please read the changelog before changing.
|
# Used for backwards compatibility, please read the changelog before changing.
|
||||||
# $ darwin-rebuild changelog
|
# $ darwin-rebuild changelog
|
||||||
system.stateVersion = 5;
|
system.stateVersion = 6;
|
||||||
|
|
||||||
# The platform the configuration will be used on.
|
# The platform the configuration will be used on.
|
||||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,16 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-unstable,
|
pkgs-unstable,
|
||||||
|
user,
|
||||||
...
|
...
|
||||||
} : {
|
} :
|
||||||
|
let
|
||||||
|
username = user.name;
|
||||||
|
homeDirectory = user.homeDirectory;
|
||||||
|
in {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
../../home-modules/default.nix
|
||||||
../../home-modules/direnv.nix
|
../../home-modules/direnv.nix
|
||||||
../../home-modules/ghostty-config.nix
|
../../home-modules/ghostty-config.nix
|
||||||
../../home-modules/homebrew.nix
|
../../home-modules/homebrew.nix
|
||||||
|
|
@ -28,16 +34,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = "uagm";
|
username = username;
|
||||||
homeDirectory = "/Users/uagm";
|
homeDirectory = homeDirectory;
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
fzf
|
nerd-fonts.bigblue-terminal
|
||||||
ripgrep
|
nerd-fonts.fira-code
|
||||||
exercism
|
exercism
|
||||||
typescript-language-server
|
typescript-language-server # TODO: Defer to individual projects.
|
||||||
lua-language-server
|
|
||||||
starship
|
|
||||||
audacity
|
audacity
|
||||||
pkgs-unstable.claude-code
|
pkgs-unstable.claude-code
|
||||||
(pkgs-unstable.litellm.overrideAttrs (oldAttrs: rec {
|
(pkgs-unstable.litellm.overrideAttrs (oldAttrs: rec {
|
||||||
|
|
@ -58,12 +62,11 @@
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# TODO BEGIN Interpolate the name of the host here.
|
# TODO BEGIN Interpolate the name of the host here.
|
||||||
flakeconf = "nvim /Users/uagm/nixos/flake.nix";
|
flakeconf = "nvim ${homeDirectory}/nixos/flake.nix";
|
||||||
sysconf = "nvim /Users/uagm/nixos/hosts/macbook/configuration.nix";
|
sysconf = "nvim ${homeDirectory}/nixos/hosts/macbook/configuration.nix";
|
||||||
homeconf = "nvim /Users/uagm/nixos/hosts/macbook/home.nix";
|
homeconf = "nvim ${homeDirectory}/nixos/hosts/macbook/home.nix";
|
||||||
nvconf = "nvim /Users/uagm/nixos/home-modules/explicit-configs/nvim/init.lua";
|
nvconf = "nvim ${homeDirectory}/nixos/home-modules/explicit-configs/nvim/init.lua";
|
||||||
# TODO: Interpolate the name of the host here.
|
nrsw = "sudo darwin-rebuild switch --flake ${homeDirectory}/nixos#macbook";
|
||||||
nrsw = "sudo darwin-rebuild switch --flake /Users/uagm/nixos#macbook";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue