This repository has no description
0

Configure Feed

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

superconfig / machines / barnacle / configuration.nix
5.1 kB 188 lines
1{ 2 pkgs, 3 self, 4 lib, 5 ... 6}: 7 8{ 9 imports = [ 10 self.inputs.nix-index-database.darwinModules.nix-index 11 self.inputs.nix-rosetta-builder.darwinModules.default 12 ]; 13 clan.core.networking.targetHost = "root@localhost"; 14 programs.nix-index-database.comma.enable = true; 15 16 nixpkgs.hostPlatform = "aarch64-darwin"; 17 environment.systemPackages = [ 18 self.packages.${pkgs.system}.nvim 19 self.packages.${pkgs.system}.pass 20 self.packages.${pkgs.system}.passmenu 21 self.packages.${pkgs.system}.tmux 22 self.packages.${pkgs.system}.mutt 23 self.packages.${pkgs.system}.notmuch 24 self.packages.${pkgs.system}.claude 25 self.packages.${pkgs.system}.mpv 26 self.packages.${pkgs.system}.s 27 28 self.packages.${pkgs.system}.secretive 29 30 # zsh dependencies 31 pkgs.fzf 32 pkgs.atuin 33 34 pkgs.gnupg 35 pkgs.pinentry_mac 36 pkgs.lazygit 37 pkgs.sshuttle 38 pkgs.git 39 pkgs.iterm2 40 (self.lib.halalify pkgs.firefox-bin-unwrapped) 41 pkgs.ripgrep 42 pkgs.alt-tab-macos 43 pkgs.nixd 44 pkgs.nil 45 pkgs.age-plugin-se 46 pkgs.gh 47 pkgs.tea 48 pkgs.rbw 49 ]; 50 51 environment.variables = { 52 EDITOR = "nvim"; 53 }; 54 55 # Use a custom configuration.nix location. 56 # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix 57 # environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; 58 59 nix = { 60 package = pkgs.nix; 61 settings = { 62 extra-experimental-features = [ 63 "nix-command" 64 "flakes" 65 ]; 66 }; 67 }; 68 69 # homebrew = { 70 # enable = true; 71 # casks = [ 72 # "gpg-suite" 73 # ]; 74 # }; 75 76 # keyboard settings 77 system.keyboard = { 78 enableKeyMapping = true; 79 }; 80 81 # Add skhd for keyboard shortcuts 82 services.skhd = { 83 enable = true; 84 skhdConfig = '' 85 # Test with simpler combo first 86 cmd - f12 : /usr/bin/say "test works" 87 # Open passmenu with Hyper-P 88 ctrl + shift + alt + cmd - p : /run/current-system/sw/bin/passmenu 89 ''; 90 }; 91 92 system.defaults = { 93 # minimal dock 94 dock = { 95 autohide = true; 96 orientation = "left"; 97 show-process-indicators = false; 98 show-recents = false; 99 static-only = true; 100 }; 101 # a finder that tells me what I want to know and lets me work 102 finder = { 103 AppleShowAllExtensions = true; 104 ShowPathbar = true; 105 FXEnableExtensionChangeWarning = false; 106 }; 107 # Tab between form controls and F-row that behaves as F1-F12 108 NSGlobalDomain = { 109 AppleKeyboardUIMode = 3; 110 "com.apple.keyboard.fnState" = true; 111 }; 112 }; 113 114 # Enable Rosetta builder for x86_64 builds 115 nix-rosetta-builder = { 116 enable = true; 117 potentiallyInsecureExtraNixosModule = { 118 # Fix DNS resolution in the VM 119 networking.nameservers = [ 120 "8.8.8.8" 121 "1.1.1.1" 122 ]; 123 # Pin to Linux 6.12 LTS to avoid "rosetta error: unhandled auxillary 124 # vector type 29" — newer kernels (6.18+) expose AT_MINSIGSTKSZ which 125 # Rosetta doesn't handle yet. 126 # https://github.com/lima-vm/lima/issues/3592 127 boot.kernelPackages = 128 (import self.inputs.nixpkgs { system = "aarch64-linux"; }).linuxKernel.packages.linux_6_12; 129 }; 130 }; 131 132 # Create /etc/zshrc that loads the nix-darwin environment. 133 programs.zsh.enable = true; # default shell on catalina 134 programs.zsh.shellInit = self.packages.${pkgs.system}.zsh.zshrc; 135 programs.zsh.promptInit = ""; # Disable default prompt 136 programs.zsh.interactiveShellInit = '' 137 export SSH_AUTH_SOCK=/Users/lassulus/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh 138 ''; 139 140 # enable sudo touch 141 security.pam.services.sudo_local.touchIdAuth = true; 142 143 # Enable Touch ID in tmux sessions with pam_reattach 144 security.pam.services.sudo_local.text = lib.mkBefore '' 145 auth optional ${pkgs.pam-reattach}/lib/pam/pam_reattach.so ignore_ssh 146 ''; 147 148 # disable natural scrolling 149 system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = false; 150 programs.direnv.enable = true; 151 programs.nix-index.enable = true; 152 programs.gnupg.agent = { 153 enable = true; 154 enableSSHSupport = true; 155 }; 156 157 # Used for backwards compatibility, please read the changelog before changing. 158 # $ darwin-rebuild changelog 159 system.stateVersion = 6; 160 161 system.primaryUser = "lassulus"; 162 163 services.openssh.enable = true; 164 users.users.lassulus.openssh.authorizedKeys.keys = [ 165 self.keys.ssh.barnacle.public 166 self.keys.ssh.yubi_pgp.public 167 self.keys.ssh.yubi1.public 168 self.keys.ssh.yubi2.public 169 self.keys.ssh.solo2.public 170 self.keys.ssh.xerxes.public 171 ]; 172 users.users.root.openssh.authorizedKeys.keys = [ 173 self.keys.ssh.barnacle.public 174 self.keys.ssh.yubi_pgp.public 175 self.keys.ssh.yubi1.public 176 self.keys.ssh.yubi2.public 177 self.keys.ssh.solo2.public 178 self.keys.ssh.xerxes.public 179 ]; 180 181 users.users.root.shell = pkgs.zsh; 182 users.users.root.uid = 0; 183 users.knownUsers = [ "root" ]; 184 185 system.activationScripts.postActivation.text = '' 186 install ${./US_INTL.keylayout} /Library/Keyboard\ Layouts/US_INTL.keylayout 187 ''; 188}