I DO NOT KNOW WHAT IM DOING

first flaking

+132
+132
flake.nix
··· 1 + { 2 + description = "Example nix-darwin system flake"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 6 + nix-darwin.url = "github:nix-darwin/nix-darwin/master"; 7 + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; 8 + 9 + nix-homebrew.url = "github:zhaofengli/nix-homebrew"; 10 + }; 11 + 12 + outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew }: 13 + let 14 + configuration = { pkgs, ... }: { 15 + system.primaryUser = "tynanpurdy"; 16 + security.pam.services.sudo_local.touchIdAuth = true; 17 + # List packages installed in system profile. To search by name, run: 18 + # $ nix-env -qaP | grep wget 19 + environment.systemPackages = 20 + [ pkgs.neovim 21 + pkgs.tailscale-gui 22 + pkgs.slack 23 + pkgs.notion-app 24 + pkgs.iterm2 25 + pkgs.discord 26 + pkgs.bitwarden-desktop 27 + pkgs.raycast 28 + pkgs.net-news-wire 29 + pkgs.bitwarden-desktop 30 + pkgs.zed-editor 31 + pkgs.obsidian 32 + ]; 33 + 34 + environment.variables = { 35 + GIT_AUTHOR_NAME = "Tynan Purdy"; 36 + GIT_AUTHOR_EMAIL = "did:plc:6ayddqghxhciedbaofoxkcbs"; 37 + }; 38 + 39 + system.keyboard = { 40 + enableKeyMapping = true; 41 + remapCapsLockToEscape = true; 42 + }; 43 + 44 + system.defaults.CustomUserPreferences = { 45 + "com.apple.symbolichotkeys" = { 46 + AppleSymbolicHotKeys = { 47 + # 64 is the Spolitght Search command ID 48 + "64" = { 49 + enabled = false; 50 + value = { 51 + parameters = [ 65535 49 1048576 ]; # cmd + space 52 + type = "standard"; 53 + }; 54 + }; 55 + }; 56 + }; 57 + }; 58 + 59 + homebrew = { 60 + enable = true; 61 + onActivation.cleanup = "zap"; 62 + 63 + brews = [ 64 + ]; 65 + 66 + casks = [ 67 + "markedit" 68 + "netnewswire" 69 + "qobuz" 70 + "zen" 71 + "stats" 72 + "affinity" 73 + "linearmouse" 74 + ]; 75 + 76 + masApps = { 77 + "Fantastical" = 975937182; 78 + "Aeronaut" = 6670275450; 79 + }; 80 + }; 81 + 82 + environment.shellAliases = { 83 + drs = "sudo darwin-rebuild switch --flake /etc/nix-darwin"; 84 + }; 85 + 86 + # Dock settings 87 + system.defaults.dock = { 88 + autohide = true; 89 + show-recents = false; 90 + }; 91 + system.defaults.dock.persistent-apps = [ 92 + "Applications/Zen.app" 93 + "${pkgs.discord}/Applications/Discord.app" 94 + "Applications/Fantastical.app" 95 + ]; 96 + 97 + # Necessary for using flakes on this system. 98 + nix.settings.experimental-features = "nix-command flakes"; 99 + 100 + # Enable alternative shell support in nix-darwin. 101 + # programs.fish.enable = true; 102 + 103 + # Set Git commit hash for darwin-version. 104 + system.configurationRevision = self.rev or self.dirtyRev or null; 105 + 106 + # Used for backwards compatibility, please read the changelog before changing. 107 + # $ darwin-rebuild changelog 108 + system.stateVersion = 6; 109 + 110 + # The platform the configuration will be used on. 111 + nixpkgs.hostPlatform = "aarch64-darwin"; 112 + nixpkgs.config.allowUnfree = true; 113 + }; 114 + in 115 + { 116 + # Build darwin flake using: 117 + # $ darwin-rebuild build --flake .#MacBook-Air 118 + darwinConfigurations."MacBook-Air" = nix-darwin.lib.darwinSystem { 119 + modules = [ 120 + configuration 121 + nix-homebrew.darwinModules.nix-homebrew 122 + { 123 + nix-homebrew = { 124 + enable = true; 125 + user = "tynanpurdy"; 126 + autoMigrate = true; 127 + }; 128 + } 129 + ]; 130 + }; 131 + }; 132 + }