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