depot/ops/nixos/lib/home-manager/client.nix

56 lines
1.3 KiB
Nix
Raw Normal View History

2020-10-25 11:36:16 +00:00
{ depot, lib, pkgs, ... }:
let
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
in
2020-10-25 11:36:16 +00:00
{
imports = [ ./common.nix ];
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
programs.bash.initExtra = lib.mkAfter ''
ssh-add -q -l >/dev/null || ssh-add -c -q
'';
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
depot.nix.pkgs.common-updater-scripts
2022-12-02 03:04:25 +00:00
git-absorb
2020-10-25 11:36:16 +00:00
go
gopls
gotools
2020-10-25 11:36:16 +00:00
graphicsmagick-imagemagick-compat
2022-01-23 23:58:55 +00:00
vault
youtube-dl
] ++ lib.optionals isLinux [
depot.nix.pkgs.copybara
]));
2020-10-25 11:36:16 +00:00
}