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
4.5 kB 175 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}.claude 24 self.packages.${pkgs.system}.mpv 25 26 self.packages.${pkgs.system}.secretive 27 28 # zsh dependencies 29 pkgs.fzf 30 pkgs.atuin 31 32 pkgs.gnupg 33 pkgs.pinentry_mac 34 pkgs.lazygit 35 pkgs.sshuttle 36 pkgs.git 37 pkgs.element-desktop 38 pkgs.iterm2 39 (self.lib.halalify pkgs.firefox-bin-unwrapped) 40 pkgs.ripgrep 41 pkgs.alt-tab-macos 42 pkgs.zed-editor 43 pkgs.nixd 44 pkgs.nil 45 pkgs.age-plugin-se 46 pkgs.gh 47 pkgs.tea 48 ]; 49 50 environment.variables = { 51 EDITOR = "nvim"; 52 }; 53 54 # Use a custom configuration.nix location. 55 # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix 56 # environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; 57 58 nix = { 59 package = pkgs.nix; 60 settings = { 61 extra-experimental-features = [ 62 "nix-command" 63 "flakes" 64 ]; 65 }; 66 }; 67 68 # homebrew = { 69 # enable = true; 70 # casks = [ 71 # "gpg-suite" 72 # ]; 73 # }; 74 75 # keyboard settings 76 system.keyboard = { 77 enableKeyMapping = true; 78 }; 79 80 # Add skhd for keyboard shortcuts 81 services.skhd = { 82 enable = true; 83 skhdConfig = '' 84 # Test with simpler combo first 85 cmd - f12 : /usr/bin/say "test works" 86 # Open passmenu with Hyper-P 87 ctrl + shift + alt + cmd - p : /run/current-system/sw/bin/passmenu 88 ''; 89 }; 90 91 system.defaults = { 92 # minimal dock 93 dock = { 94 autohide = true; 95 orientation = "left"; 96 show-process-indicators = false; 97 show-recents = false; 98 static-only = true; 99 }; 100 # a finder that tells me what I want to know and lets me work 101 finder = { 102 AppleShowAllExtensions = true; 103 ShowPathbar = true; 104 FXEnableExtensionChangeWarning = false; 105 }; 106 # Tab between form controls and F-row that behaves as F1-F12 107 NSGlobalDomain = { 108 AppleKeyboardUIMode = 3; 109 "com.apple.keyboard.fnState" = true; 110 }; 111 }; 112 113 # Enable Rosetta builder for x86_64 builds 114 nix-rosetta-builder = { 115 enable = true; 116 potentiallyInsecureExtraNixosModule = { 117 # Fix DNS resolution in the VM 118 networking.nameservers = [ 119 "8.8.8.8" 120 "1.1.1.1" 121 ]; 122 }; 123 }; 124 125 # Create /etc/zshrc that loads the nix-darwin environment. 126 programs.zsh.enable = true; # default shell on catalina 127 programs.zsh.shellInit = self.packages.${pkgs.system}.zsh.zshrc; 128 programs.zsh.promptInit = ""; # Disable default prompt 129 programs.zsh.interactiveShellInit = '' 130 export SSH_AUTH_SOCK=/Users/lassulus/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh 131 ''; 132 133 # enable sudo touch 134 security.pam.services.sudo_local.touchIdAuth = true; 135 136 # Enable Touch ID in tmux sessions with pam_reattach 137 security.pam.services.sudo_local.text = lib.mkBefore '' 138 auth optional ${pkgs.pam-reattach}/lib/pam/pam_reattach.so ignore_ssh 139 ''; 140 141 # disable natural scrolling 142 system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = false; 143 programs.direnv.enable = true; 144 programs.nix-index.enable = true; 145 programs.gnupg.agent = { 146 enable = true; 147 enableSSHSupport = true; 148 }; 149 150 # Used for backwards compatibility, please read the changelog before changing. 151 # $ darwin-rebuild changelog 152 system.stateVersion = 6; 153 154 system.primaryUser = "lassulus"; 155 156 services.openssh.enable = true; 157 users.users.lassulus.openssh.authorizedKeys.keys = [ 158 self.keys.ssh.barnacle.public 159 self.keys.ssh.yubi_pgp.public 160 self.keys.ssh.yubi1.public 161 self.keys.ssh.yubi2.public 162 self.keys.ssh.solo2.public 163 ]; 164 users.users.root.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 ]; 171 172 users.users.root.shell = pkgs.zsh; 173 users.users.root.uid = 0; 174 users.knownUsers = [ "root" ]; 175}