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