macos working like a charm
This commit is contained in:
@@ -23,17 +23,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# since darwin needs root now (will be removed in future)
|
|
||||||
system.primaryUser = "bhelderman";
|
|
||||||
|
|
||||||
power = {
|
|
||||||
sleep = {
|
|
||||||
computer = 30;
|
|
||||||
display = 5;
|
|
||||||
allowSleepByPowerButton = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# import home grown host specific home-manager modules
|
# import home grown host specific home-manager modules
|
||||||
home-manager.users.bhelderman.imports = [
|
home-manager.users.bhelderman.imports = [
|
||||||
../../../users/blake/hosts/cen-it-07.nix
|
../../../users/blake/hosts/cen-it-07.nix
|
||||||
@@ -61,14 +50,18 @@
|
|||||||
nix-homebrew = {
|
nix-homebrew = {
|
||||||
enable = true; # install homebrew
|
enable = true; # install homebrew
|
||||||
enableRosetta = true; # install homebrew for rosetta as well
|
enableRosetta = true; # install homebrew for rosetta as well
|
||||||
autoMigrate = true;
|
# autoMigrate = true;
|
||||||
user = "bhelderman"; # user owning homebrew prefix
|
user = "bhelderman"; # user owning homebrew prefix
|
||||||
};
|
};
|
||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# removes anything in homebrew not explicitly specified
|
# removes anything in homebrew not explicitly specified
|
||||||
#onActivation.cleanup = "uninstall";
|
onActivation = {
|
||||||
|
cleanup = "uninstall";
|
||||||
|
autoUpdate = true;
|
||||||
|
upgrade = false;
|
||||||
|
};
|
||||||
|
|
||||||
brews = [
|
brews = [
|
||||||
"mas"
|
"mas"
|
||||||
@@ -87,7 +80,31 @@
|
|||||||
"testflight" = 899247664;
|
"testflight" = 899247664;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# for mas to not throw rebuild fit
|
||||||
|
system.activationScripts.masFix.text = ''
|
||||||
|
if command -v mas >/dev/null; then
|
||||||
|
for app in ${toString (map (id: builtins.toString id) (builtins.attrValues config.homebrew.masApps))}; do
|
||||||
|
if mas list | grep -q "$app"; then
|
||||||
|
echo "mas app $app already installed, skipping"
|
||||||
|
else
|
||||||
|
mas install "$app"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
# since darwin needs root now (will be removed in future)
|
||||||
|
system.primaryUser = "bhelderman";
|
||||||
|
|
||||||
|
power = {
|
||||||
|
sleep = {
|
||||||
|
computer = 30;
|
||||||
|
display = 5;
|
||||||
|
allowSleepByPowerButton = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
system.stateVersion = 6;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+52
-48
@@ -9,18 +9,65 @@
|
|||||||
/*
|
/*
|
||||||
instructions for first time setup for macos here
|
instructions for first time setup for macos here
|
||||||
1. install the nix package manager with: `sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)`
|
1. install the nix package manager with: `sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)`
|
||||||
2. xfer or git clone flake to ~/.nix
|
2. install xcode tools with `xcode-select --install`
|
||||||
3. sign into icloud and by extension app store for mas
|
3. allow full disk access to terminal
|
||||||
4. rename some shell rc files with `sudo mv /etc/bashrc /etc/bashrc.before-nix-darwin && sudo mv /etc/zshrc /etc/zshrc.before-nix-darwin`
|
4. xfer or git clone flake to ~/.nix
|
||||||
5. install nix-darwin with: `nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake ~/.nix#host`
|
5. sign into icloud and by extension app store for mas
|
||||||
6. nh should be installed now so enjoy and use `nh darwin switch`
|
6. rename some shell rc files with `sudo mv /etc/bashrc /etc/bashrc.before-nix-darwin && sudo mv /etc/zshrc /etc/zshrc.before-nix-darwin`
|
||||||
|
7. install nix-darwin with: `nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake ~/.nix#host`
|
||||||
|
8. nh should be installed now so enjoy and use `nh darwin switch`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
];
|
];
|
||||||
|
|
||||||
# general macos system settings
|
# general macos system settings
|
||||||
|
# base system package install list
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
rsync
|
||||||
|
git
|
||||||
|
age
|
||||||
|
fzf
|
||||||
|
usbutils
|
||||||
|
pciutils
|
||||||
|
python3
|
||||||
|
vim
|
||||||
|
lf
|
||||||
|
btop
|
||||||
|
rectangle
|
||||||
|
pinentry_mac
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.bhelderman = {
|
||||||
|
home = "/Users/bhelderman";
|
||||||
|
# optional extras, e.g. shell, uid, etc.
|
||||||
|
};
|
||||||
|
|
||||||
|
# define home-manager user
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = {inherit inputs;};
|
||||||
|
backupFileExtension = "bak";
|
||||||
|
useUserPackages = true;
|
||||||
|
useGlobalPkgs = false;
|
||||||
|
users = {
|
||||||
|
"bhelderman" = import ../../users/blake/home_darwin.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# set timezone
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
# allow proprietary packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# enable flakes
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
|
stateVersion = 6;
|
||||||
defaults = {
|
defaults = {
|
||||||
trackpad = {
|
trackpad = {
|
||||||
Clicking = true;
|
Clicking = true;
|
||||||
@@ -95,48 +142,5 @@ instructions for first time setup for macos here
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# base system package install list
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
rsync
|
|
||||||
git
|
|
||||||
age
|
|
||||||
fzf
|
|
||||||
usbutils
|
|
||||||
pciutils
|
|
||||||
python3
|
|
||||||
vim
|
|
||||||
lf
|
|
||||||
btop
|
|
||||||
rectangle
|
|
||||||
pinentry_mac
|
|
||||||
];
|
|
||||||
|
|
||||||
users.users.bhelderman = {
|
|
||||||
home = "/Users/bhelderman";
|
|
||||||
# optional extras, e.g. shell, uid, etc.
|
|
||||||
};
|
|
||||||
|
|
||||||
# define home-manager user
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = {inherit inputs;};
|
|
||||||
backupFileExtension = "bak";
|
|
||||||
useUserPackages = true;
|
|
||||||
useGlobalPkgs = false;
|
|
||||||
users = {
|
|
||||||
"bhelderman" = import ../../users/blake/home_darwin.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# set timezone
|
|
||||||
time.timeZone = "America/Chicago";
|
|
||||||
|
|
||||||
# allow proprietary packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# enable flakes
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,25 +20,26 @@ in {
|
|||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
brews = [
|
brews = [
|
||||||
];
|
|
||||||
casks = [
|
|
||||||
"gnucash"
|
|
||||||
"utm"
|
|
||||||
"libreoffice"
|
|
||||||
"iperf3"
|
"iperf3"
|
||||||
"nmap"
|
"nmap"
|
||||||
"p7zip"
|
"p7zip"
|
||||||
"sl"
|
"sl"
|
||||||
"cowsay"
|
"cowsay"
|
||||||
];
|
];
|
||||||
|
casks = [
|
||||||
|
"gnucash"
|
||||||
|
"utm"
|
||||||
|
"libreoffice"
|
||||||
|
"firefox"
|
||||||
|
];
|
||||||
masApps = {
|
masApps = {
|
||||||
"pages" = 409201541;
|
# "pages" = 409201541;
|
||||||
"numbers" = 409203825;
|
# "numbers" = 409203825;
|
||||||
"keynote" = 409183694;
|
# "keynote" = 409183694;
|
||||||
"bitwarden" = 1352778147;
|
# "bitwarden" = 1352778147;
|
||||||
"darkreader" = 1438243180;
|
# "darkreader" = 1438243180;
|
||||||
"ghostery" = 6504861501;
|
# "ghostery" = 6504861501;
|
||||||
"privacy" = 6449850851;
|
# "privacy" = 6449850851;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ in {
|
|||||||
"microsoft-office"
|
"microsoft-office"
|
||||||
];
|
];
|
||||||
masApps = {
|
masApps = {
|
||||||
"configurator" = 1168254295;
|
# "configurator" = 1168254295;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ in {
|
|||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
|
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
|
firefox.enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user