diff options
Diffstat (limited to 'nix')
-rw-r--r-- | nix/flake/hosts.nix | 1 | ||||
-rw-r--r-- | nix/profiles/home-manager/dev.nix | 16 | ||||
-rw-r--r-- | nix/profiles/home-manager/git.nix | 6 | ||||
-rw-r--r-- | nix/profiles/home-manager/ssh.nix | 21 | ||||
-rw-r--r-- | nix/profiles/home-manager/work.nix | 53 |
5 files changed, 91 insertions, 6 deletions
diff --git a/nix/flake/hosts.nix b/nix/flake/hosts.nix index 2d655d6..7348672 100644 --- a/nix/flake/hosts.nix +++ b/nix/flake/hosts.nix @@ -26,6 +26,7 @@ in { darwinConfigurations = { mba-fcuny = mkDarwinConfig "aarch64-darwin" ../../hosts/mba; + HQ-C02FK3Q7MD6T = mkDarwinConfig "x86_64-darwin" ../../hosts/work; }; } ]; diff --git a/nix/profiles/home-manager/dev.nix b/nix/profiles/home-manager/dev.nix index e0ca68b..6eacdc9 100644 --- a/nix/profiles/home-manager/dev.nix +++ b/nix/profiles/home-manager/dev.nix @@ -22,24 +22,28 @@ in goPath = ".local/share/pkg.go"; goBin = ".local/bin.go"; package = pkgs.go_1_21; + goPrivate = [ "github.rbx.com/roblox/*" "github.com/fcuny/world/*" ]; }; home.packages = with pkgs; [ + # go go-tools golangci-lint gopls + # docker dive # explore layers in docker images - pythonEnv - - kubectl + # shell + shellcheck + # ops google-cloud-sdk + kubectl + tfswitch - rnix-lsp - alejandra - nil + # python + pythonEnv ]; home.sessionPath = [ diff --git a/nix/profiles/home-manager/git.nix b/nix/profiles/home-manager/git.nix index d7b07c3..93909de 100644 --- a/nix/profiles/home-manager/git.nix +++ b/nix/profiles/home-manager/git.nix @@ -35,6 +35,12 @@ branch.sort = "authordate"; commit.template = "${config.xdg.dataHome}/git/commit.template"; + + url = { + "ssh://git@github.rbx.com/" = { + insteadOf = "https://github.rbx.com/"; + }; + }; }; ignores = [ diff --git a/nix/profiles/home-manager/ssh.nix b/nix/profiles/home-manager/ssh.nix index 47aee8a..0ed401e 100644 --- a/nix/profiles/home-manager/ssh.nix +++ b/nix/profiles/home-manager/ssh.nix @@ -10,12 +10,33 @@ IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" ''; matchBlocks = { + "personal" = { + hostname = "github.com"; + user = "git"; + forwardAgent = false; + extraOptions = { preferredAuthentications = "publickey"; }; + }; "github.com" = { hostname = "github.com"; user = "git"; forwardAgent = false; extraOptions = { preferredAuthentications = "publickey"; }; }; + "github.rbx.com" = { + hostname = "github.com"; + user = "git"; + forwardAgent = false; + extraOptions = { preferredAuthentications = "publickey"; }; + }; }; }; + + # Generate ssh agent config for 1Password - I want both my personal and work keys + home.file.".config/1Password/ssh/agent.toml".text = '' + [[ssh-keys]] + account = "my.1password.com" + + [[ssh-keys]] + account = "roblox.1password.com" + ''; } diff --git a/nix/profiles/home-manager/work.nix b/nix/profiles/home-manager/work.nix new file mode 100644 index 0000000..d9b0dab --- /dev/null +++ b/nix/profiles/home-manager/work.nix @@ -0,0 +1,53 @@ +{ pkgs, ... }: { + + home.stateVersion = "23.05"; + + imports = [ + ./dev.nix + ./firefox.nix + ./git.nix + ./ssh.nix + ./zsh.nix + ]; + + home.packages = with pkgs; [ + # general shell utils + direnv + ripgrep + tree + wget + + # data manipulation + jless + jq + yq + + # nix related + nil + nix-direnv + nixd + nixfmt + nixpkgs-fmt + rnix-lsp + ]; + + home.sessionVariables = { + EDITOR = "emacsclient -a="; + VISUAL = "emacsclient -a="; + LESS = "-FRSXM"; + LESSCHARSET = "utf-8"; + PAGER = "less"; + }; + + programs = { + direnv = { + enable = true; + nix-direnv.enable = true; + enableZshIntegration = true; + config = { + global.disable_stdin = true; + global.strict_env = true; + }; + }; + }; +} |