mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 20:50:15 +00:00
more darwin cleanup
This commit is contained in:
@ -1,34 +1,15 @@
|
||||
{ lib, ... }: {
|
||||
{ ... }: {
|
||||
|
||||
imports = [
|
||||
./system.nix
|
||||
./user.nix
|
||||
./tmux.nix
|
||||
./utilities.nix
|
||||
./hammerspoon.nix
|
||||
./alacritty.nix
|
||||
./dotfiles.nix
|
||||
./fonts.nix
|
||||
./hammerspoon.nix
|
||||
./homebrew.nix
|
||||
./system.nix
|
||||
./tmux.nix
|
||||
./user.nix
|
||||
./utilities.nix
|
||||
];
|
||||
|
||||
options = with lib; {
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
description = "Primary user of the system";
|
||||
};
|
||||
|
||||
gui = {
|
||||
enable = mkEnableOption {
|
||||
description = "Enable graphics";
|
||||
default = false;
|
||||
};
|
||||
|
||||
colorscheme = mkOption {
|
||||
type = types.attrs;
|
||||
description = "Base16 color scheme";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
28
modules/darwin/dotfiles.nix
Normal file
28
modules/darwin/dotfiles.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ config, ... }: {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
programs.fish = {
|
||||
shellAbbrs = {
|
||||
nr = "rebuild-darwin";
|
||||
nro = "rebuild-darwin offline";
|
||||
};
|
||||
functions = {
|
||||
rebuild-nixos = {
|
||||
body = ''
|
||||
if test "$argv[1]" = "offline"
|
||||
set option "--option substitute false"
|
||||
end
|
||||
pushd ${config.dotfilesPath}
|
||||
git add --all
|
||||
popd
|
||||
commandline -r darwin-rebuild switch $option --flake ${config.dotfilesPath}#macbook
|
||||
commandline -f execute
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
14
modules/darwin/fonts.nix
Normal file
14
modules/darwin/fonts.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.packages = with pkgs;
|
||||
[ (nerdfonts.override { fonts = [ "FiraCode" ]; }) ];
|
||||
|
||||
programs.alacritty.settings = {
|
||||
font.normal.family = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
{ config, ... }: {
|
||||
|
||||
# Homebrew - Mac-specific packages that aren't in Nix
|
||||
# Requires Homebrew to be installed (works if you rebuild twice)
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
autoUpdate = false; # Don't update during rebuild
|
||||
@ -34,10 +37,10 @@
|
||||
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||
[ "writeBoundary" ] ''
|
||||
if ! xcode-select --version 2>/dev/null; then
|
||||
xcode-select --install
|
||||
$DRY_RUN_CMD xcode-select --install
|
||||
fi
|
||||
if ! /usr/local/bin/brew --version 2>/dev/null; then
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
'';
|
||||
|
||||
|
8
modules/darwin/networking.nix
Normal file
8
modules/darwin/networking.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ ... }: {
|
||||
|
||||
networking = {
|
||||
computerName = "MacBook"; # Host name
|
||||
hostName = "MacBook";
|
||||
};
|
||||
|
||||
}
|
@ -5,9 +5,4 @@
|
||||
shell = pkgs.zsh; # Default shell
|
||||
};
|
||||
|
||||
#networking = {
|
||||
# computerName = "MacBook"; # Host name
|
||||
# hostName = "MacBook";
|
||||
#};
|
||||
|
||||
}
|
||||
|
@ -14,7 +14,6 @@
|
||||
kubectl
|
||||
k9s
|
||||
noti # Create notifications programmatically
|
||||
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||
];
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user