2020-10-25 11:36:16 +00:00
|
|
|
{ depot, lib, pkgs, ... }:
|
2020-11-23 15:22:00 +00:00
|
|
|
let
|
2023-02-12 17:57:39 +00:00
|
|
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux isx86;
|
2020-11-23 15:22:00 +00:00
|
|
|
in
|
2020-10-25 11:36:16 +00:00
|
|
|
{
|
|
|
|
imports = [ ./common.nix ];
|
|
|
|
|
2020-11-23 16:47:17 +00:00
|
|
|
home.sessionVariables.GITHUB_TOKEN = with depot.ops; if builtins.hasAttr "githubToken" secrets then secrets.githubToken else null;
|
2022-03-11 18:44:52 +00:00
|
|
|
home.sessionVariables.VAULT_ADDR = "https://vault.int.lukegb.com/";
|
2020-10-25 11:36:16 +00:00
|
|
|
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=
|
|
|
|
'';
|
|
|
|
};
|
2020-11-09 00:21:32 +00:00
|
|
|
programs.ssh.controlMaster = "auto";
|
|
|
|
programs.ssh.controlPersist = "10m";
|
2020-10-25 11:36:16 +00:00
|
|
|
|
2020-11-05 01:57:55 +00:00
|
|
|
programs.bash.initExtra = lib.mkAfter ''
|
|
|
|
ssh-add -q -l >/dev/null || ssh-add -c -q
|
|
|
|
'';
|
|
|
|
|
2020-11-23 15:22:00 +00:00
|
|
|
home.packages = lib.mkAfter (with pkgs; ([
|
2022-03-25 01:24:21 +00:00
|
|
|
depot.go.access
|
2021-11-18 21:33:40 +00:00
|
|
|
depot.nix.pkgs.datez
|
2022-01-16 18:04:24 +00:00
|
|
|
depot.nix.pkgs.common-updater-scripts
|
2022-12-04 22:03:47 +00:00
|
|
|
depot.nix.pkgs.jj
|
2022-12-02 03:04:25 +00:00
|
|
|
git-absorb
|
2020-10-25 11:36:16 +00:00
|
|
|
go
|
|
|
|
gopls
|
2022-03-11 14:56:55 +00:00
|
|
|
gotools
|
2020-10-25 11:36:16 +00:00
|
|
|
graphicsmagick-imagemagick-compat
|
2022-01-23 23:58:55 +00:00
|
|
|
vault
|
2020-11-17 02:10:23 +00:00
|
|
|
youtube-dl
|
2023-02-12 17:57:39 +00:00
|
|
|
] ++ lib.optionals (isLinux && isx86) [
|
2020-11-23 15:22:00 +00:00
|
|
|
depot.nix.pkgs.copybara
|
|
|
|
]));
|
2020-10-25 11:36:16 +00:00
|
|
|
}
|