❄️ Dotfiles for our NixOS system configuration.
1{ 2 lib, 3 pkgs, 4 osConfig, 5 ... 6}: 7 8let 9 signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICM6XP+CNc2CStEDe/W4LfkcRcG98obQiM2aqnydCRbX"; 10 11 opSshSignPath = 12 if (osConfig ? wsl) then 13 "/mnt/c/Users/Chloe/AppData/Local/1Password/app/8/op-ssh-sign-wsl" 14 else if pkgs.stdenv.hostPlatform.isDarwin then 15 "/Applications/1Password.app/Contents/MacOS/op-ssh-sign" 16 else 17 "${pkgs._1password-gui}/bin/op-ssh-sign"; 18in 19{ 20 home.file.".ssh/allowed_signers".text = "* ${signingKey}"; 21 22 programs.git = { 23 enable = true; 24 userName = "Chloe"; 25 userEmail = "chloe@sapphic.moe"; 26 27 extraConfig = lib.mkMerge [ 28 { 29 user.signingkey = signingKey; 30 gpg.format = "ssh"; 31 gpg.ssh.program = opSshSignPath; 32 gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; 33 commit.gpgsign = true; 34 } 35 36 (lib.mkIf (osConfig ? wsl) { 37 core.sshCommand = "ssh.exe"; 38 }) 39 ]; 40 }; 41}