Dotfiles managed with Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: first commit

Includes all the currently necessary packages to work with a Mac

Daniel Vieites 68c7d9f9

+254
+2
.gitignore
··· 1 + /result* 2 + .DS_Store
+7
README.md
··· 1 + # Dotfiles 2 + 3 + - `flake.nix`: flake inputs and the exported `macos` configuration. 4 + - `macos.nix`: main macOS configuration, plus Homebrew settings. 5 + - `packages/shared.nix`: packages you want available everywhere. 6 + - `packages/macos.nix`: packages that only belong to this macOS setup. 7 + - `justfile`: shortcuts for `darwin-rebuild`.
+123
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-parts": { 4 + "inputs": { 5 + "nixpkgs-lib": [ 6 + "neovim-nightly-overlay", 7 + "nixpkgs" 8 + ] 9 + }, 10 + "locked": { 11 + "lastModified": 1772408722, 12 + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", 13 + "owner": "hercules-ci", 14 + "repo": "flake-parts", 15 + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", 16 + "type": "github" 17 + }, 18 + "original": { 19 + "owner": "hercules-ci", 20 + "repo": "flake-parts", 21 + "type": "github" 22 + } 23 + }, 24 + "neovim-nightly-overlay": { 25 + "inputs": { 26 + "flake-parts": "flake-parts", 27 + "neovim-src": "neovim-src", 28 + "nixpkgs": "nixpkgs" 29 + }, 30 + "locked": { 31 + "lastModified": 1774137890, 32 + "narHash": "sha256-o1bwfbAeJ4jouE0dG176+n0Oy30AIKoczX/Wjbx2Iwo=", 33 + "owner": "nix-community", 34 + "repo": "neovim-nightly-overlay", 35 + "rev": "004286778676bb67da256a0c1b93add3e1275be7", 36 + "type": "github" 37 + }, 38 + "original": { 39 + "owner": "nix-community", 40 + "repo": "neovim-nightly-overlay", 41 + "type": "github" 42 + } 43 + }, 44 + "neovim-src": { 45 + "flake": false, 46 + "locked": { 47 + "lastModified": 1774136084, 48 + "narHash": "sha256-84L6rm4ilbd+mg3mhTufTVTpY6lrlfNtFOlcIh5ekgo=", 49 + "owner": "neovim", 50 + "repo": "neovim", 51 + "rev": "0db8efcbe4fc9642597ac93556793948c01f8f6f", 52 + "type": "github" 53 + }, 54 + "original": { 55 + "owner": "neovim", 56 + "repo": "neovim", 57 + "type": "github" 58 + } 59 + }, 60 + "nix-darwin": { 61 + "inputs": { 62 + "nixpkgs": [ 63 + "nixpkgs" 64 + ] 65 + }, 66 + "locked": { 67 + "lastModified": 1773000227, 68 + "narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=", 69 + "owner": "nix-darwin", 70 + "repo": "nix-darwin", 71 + "rev": "da529ac9e46f25ed5616fd634079a5f3c579135f", 72 + "type": "github" 73 + }, 74 + "original": { 75 + "owner": "nix-darwin", 76 + "ref": "master", 77 + "repo": "nix-darwin", 78 + "type": "github" 79 + } 80 + }, 81 + "nixpkgs": { 82 + "locked": { 83 + "lastModified": 1773840656, 84 + "narHash": "sha256-9tpvMGFteZnd3gRQZFlRCohVpqooygFuy9yjuyRL2C0=", 85 + "owner": "NixOS", 86 + "repo": "nixpkgs", 87 + "rev": "9cf7092bdd603554bd8b63c216e8943cf9b12512", 88 + "type": "github" 89 + }, 90 + "original": { 91 + "owner": "NixOS", 92 + "ref": "nixpkgs-unstable", 93 + "repo": "nixpkgs", 94 + "type": "github" 95 + } 96 + }, 97 + "nixpkgs_2": { 98 + "locked": { 99 + "lastModified": 1773628058, 100 + "narHash": "sha256-hpXH0z3K9xv0fHaje136KY872VT2T5uwxtezlAskQgY=", 101 + "owner": "NixOS", 102 + "repo": "nixpkgs", 103 + "rev": "f8573b9c935cfaa162dd62cc9e75ae2db86f85df", 104 + "type": "github" 105 + }, 106 + "original": { 107 + "owner": "NixOS", 108 + "ref": "nixpkgs-unstable", 109 + "repo": "nixpkgs", 110 + "type": "github" 111 + } 112 + }, 113 + "root": { 114 + "inputs": { 115 + "neovim-nightly-overlay": "neovim-nightly-overlay", 116 + "nix-darwin": "nix-darwin", 117 + "nixpkgs": "nixpkgs_2" 118 + } 119 + } 120 + }, 121 + "root": "root", 122 + "version": 7 123 + }
+20
flake.nix
··· 1 + { 2 + description = "Personal 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 + neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; 10 + }; 11 + 12 + outputs = inputs@{ self, nix-darwin, ... }: { 13 + darwinConfigurations.macos = nix-darwin.lib.darwinSystem { 14 + specialArgs = { inherit inputs self; }; 15 + modules = [ 16 + ./macos.nix 17 + ]; 18 + }; 19 + }; 20 + }
+12
justfile
··· 1 + host := "macos" 2 + 3 + alias drs := switch 4 + 5 + _default: 6 + just -l 7 + 8 + build: 9 + darwin-rebuild build --flake .#{{host}} 10 + 11 + switch: 12 + sudo darwin-rebuild switch --flake .#{{host}}
+50
macos.nix
··· 1 + { pkgs, inputs, self, ... }: 2 + let 3 + sharedPackages = import ./packages/shared.nix { 4 + inherit pkgs inputs; 5 + }; 6 + 7 + macosPackages = import ./packages/macos.nix { 8 + inherit pkgs; 9 + }; 10 + in 11 + { 12 + nix.settings.experimental-features = "nix-command flakes"; 13 + 14 + nixpkgs.hostPlatform = "aarch64-darwin"; 15 + nixpkgs.config.allowUnfree = true; 16 + 17 + system.primaryUser = "vieitesprefapp"; 18 + system.stateVersion = 6; 19 + system.configurationRevision = self.rev or self.dirtyRev or null; 20 + 21 + environment.systemPackages = sharedPackages ++ macosPackages; 22 + 23 + homebrew = { 24 + enable = true; 25 + 26 + brews = [ 27 + "mole" 28 + ]; 29 + 30 + casks = [ 31 + "aldente" 32 + "brave-browser" 33 + "nikitabobko/tap/aerospace" 34 + "codexbar" 35 + "cmux" 36 + "hammerspoon" 37 + "karabiner-elements" 38 + "raycast" 39 + "shottr" 40 + "monitorcontrol" 41 + "logi-options+" 42 + ]; 43 + 44 + onActivation = { 45 + cleanup = "none"; 46 + autoUpdate = true; 47 + upgrade = true; 48 + }; 49 + }; 50 + }
+4
packages/macos.nix
··· 1 + { pkgs }: 2 + with pkgs; [ 3 + whatsapp-for-mac 4 + ]
+36
packages/shared.nix
··· 1 + { pkgs, inputs }: 2 + let 3 + system = pkgs.stdenv.hostPlatform.system; 4 + in 5 + with pkgs; [ 6 + actionlint 7 + awscli2 8 + bat 9 + bun 10 + cloudflared 11 + delta 12 + eza 13 + fd 14 + fzf 15 + gh 16 + git 17 + go 18 + htop 19 + just 20 + k9s 21 + kind 22 + kubectl 23 + nodejs_24 24 + opencode 25 + p7zip 26 + ripgrep 27 + ruby_3_4 28 + rustup 29 + stow 30 + tmux 31 + vim 32 + wget 33 + yq-go 34 + zoxide 35 + inputs.neovim-nightly-overlay.packages.${system}.default 36 + ]