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