nix-darwin/flake.nix

114 lines
3.3 KiB
Nix
Raw Normal View History

{
description = "Personal nix-darwin system flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
};
outputs = inputs@{ self, nix-darwin, nix-homebrew, homebrew-core, homebrew-cask, home-manager, nixpkgs }:
let
configuration = { pkgs, ... }: {
users.users.erogers = {
name = "erogers";
home = "/Users/erogers";
};
environment.systemPackages = with pkgs; [
neovim # Text editor of choice
htop # Resource manager
iina # Media player
# raycast # AI chat/Application launcher/Automation tool
# kanata # Keyboard remapping tool
];
homebrew = {
enable = true;
taps = [];
brews = [
"kanata"
"mpv"
"lua"
"luarocks"
"guile"
"scrcpy"
"ffmpeg"
2026-01-04 12:22:41 -04:00
"direnv"
];
casks = [
"font-jetbrains-mono"
"font-monocraft-nerd-font"
"obsidian"
"raycast"
2026-01-04 12:22:41 -04:00
"foobar2000"
"android-platform-tools"
2026-01-04 12:22:41 -04:00
"zen"
"krita"
2026-04-04 19:21:49 -04:00
"sioyek"
"shortcat"
"leader-key"
];
};
system.primaryUser = "erogers";
system.defaults = {
dock.autohide = true;
finder.AppleShowAllExtensions = true;
2026-08-02 01:06:08 -04:00
NSGlobalDomain.AppleShowAllFiles = true;
# finder.AppleShowAllFiles
NSGlobalDomain.AppleShowScrollBars = "WhenScrolling";
};
nix.enable =false;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Allow unfree software
nixpkgs.config.allowUnfree = true;
# Allow for TouchID authentication when executing commands with sudo
security.pam.services.sudo_local.touchIdAuth = true;
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 6;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
};
in
{
# Build darwin flake using:
# $ darwin-rebuild build --flake .#Angrboda
darwinConfigurations."Angrboda" = nix-darwin.lib.darwinSystem {
modules = [
configuration
nix-homebrew.darwinModules.nix-homebrew {
nix-homebrew = {
enable = true;
enableRosetta = true;
user = "erogers";
autoMigrate = true;
};
}
home-manager.darwinModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.erogers = import ./home.nix;
}
];
};
};
}