{ 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" "direnv" ]; casks = [ "font-jetbrains-mono" "font-monocraft-nerd-font" "obsidian" "raycast" "foobar2000" "android-platform-tools" "zen" "obs" "krita" "sioyek" ]; }; system.primaryUser = "erogers"; system.defaults = { dock.autohide = true; finder.AppleShowAllExtensions = true; }; 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; } ]; }; }; }