2025-09-21 13:18:38 -04:00
|
|
|
{
|
|
|
|
|
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
|
2025-10-18 17:29:05 -04:00
|
|
|
htop # Resource manager
|
2025-09-21 13:18:38 -04:00
|
|
|
iina # Media player
|
2026-08-02 09:54:04 -04:00
|
|
|
# raycast # AI chat/Application launcher/Automation tool
|
|
|
|
|
# kanata # Keyboard remapping tool
|
2025-09-21 13:18:38 -04:00
|
|
|
];
|
|
|
|
|
|
2025-10-18 17:29:05 -04:00
|
|
|
homebrew = {
|
|
|
|
|
enable = true;
|
|
|
|
|
taps = [];
|
|
|
|
|
brews = [
|
|
|
|
|
"kanata"
|
|
|
|
|
"mpv"
|
|
|
|
|
"lua"
|
|
|
|
|
"luarocks"
|
|
|
|
|
"guile"
|
|
|
|
|
"scrcpy"
|
|
|
|
|
"ffmpeg"
|
2026-01-04 12:22:41 -04:00
|
|
|
"direnv"
|
2025-10-18 17:29:05 -04:00
|
|
|
];
|
|
|
|
|
casks = [
|
|
|
|
|
"font-jetbrains-mono"
|
|
|
|
|
"font-monocraft-nerd-font"
|
|
|
|
|
"obsidian"
|
|
|
|
|
"raycast"
|
2026-01-04 12:22:41 -04:00
|
|
|
"foobar2000"
|
2025-10-18 17:29:05 -04:00
|
|
|
"android-platform-tools"
|
2026-01-04 12:22:41 -04:00
|
|
|
"zen"
|
2026-03-03 19:49:47 -04:00
|
|
|
"krita"
|
2026-04-04 19:21:49 -04:00
|
|
|
"sioyek"
|
2026-04-05 12:21:30 -04:00
|
|
|
"shortcat"
|
2026-08-02 09:54:04 -04:00
|
|
|
"leader-key"
|
2026-08-14 18:44:28 -04:00
|
|
|
"mouseless"
|
2025-10-18 17:29:05 -04:00
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-21 13:18:38 -04:00
|
|
|
system.primaryUser = "erogers";
|
|
|
|
|
system.defaults = {
|
|
|
|
|
dock.autohide = true;
|
|
|
|
|
finder.AppleShowAllExtensions = true;
|
2026-08-02 01:06:08 -04:00
|
|
|
NSGlobalDomain.AppleShowAllFiles = true;
|
|
|
|
|
# finder.AppleShowAllFiles
|
2026-08-02 09:54:04 -04:00
|
|
|
NSGlobalDomain.AppleShowScrollBars = "WhenScrolling";
|
2025-09-21 13:18:38 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|