56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{ depot, lib, pkgs, ... }:
|
|
let
|
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
|
in
|
|
{
|
|
imports = [ ./common.nix ];
|
|
|
|
home.sessionVariables.GITHUB_TOKEN = with depot.ops; if builtins.hasAttr "githubToken" secrets then secrets.githubToken else null;
|
|
home.sessionVariables.VAULT_ADDR = "https://vault.int.lukegb.com/";
|
|
programs.git = {
|
|
enable = true;
|
|
package = pkgs.gitAndTools.gitFull;
|
|
extraConfig = {
|
|
user.name = "Luke Granger-Brown";
|
|
user.email = "git@lukegb.com";
|
|
pull.ff = "only";
|
|
};
|
|
};
|
|
programs.direnv.enable = true;
|
|
programs.vim = {
|
|
plugins = (with pkgs.vimPlugins; [
|
|
vim-go
|
|
]);
|
|
extraConfig = ''
|
|
source $VIMRUNTIME/defaults.vim
|
|
|
|
let g:go_def_mode='gopls'
|
|
let g:go_info_mode='gopls'
|
|
let g:go_fmt_command='goimports'
|
|
|
|
set mouse=
|
|
'';
|
|
};
|
|
programs.ssh.controlMaster = "auto";
|
|
programs.ssh.controlPersist = "10m";
|
|
|
|
programs.bash.initExtra = lib.mkAfter ''
|
|
ssh-add -q -l >/dev/null || ssh-add -c -q
|
|
'';
|
|
|
|
home.packages = lib.mkAfter (with pkgs; ([
|
|
depot.go.access
|
|
depot.nix.pkgs.datez
|
|
depot.nix.pkgs.common-updater-scripts
|
|
depot.nix.pkgs.jj
|
|
git-absorb
|
|
go
|
|
gopls
|
|
gotools
|
|
graphicsmagick-imagemagick-compat
|
|
vault
|
|
youtube-dl
|
|
] ++ lib.optionals isLinux [
|
|
depot.nix.pkgs.copybara
|
|
]));
|
|
}
|