diff options
Diffstat (limited to '')
| -rw-r--r-- | users/programs/1password.nix (renamed from users/profiles/1password.nix) | 0 | ||||
| -rw-r--r-- | users/programs/direnv.nix | 11 | ||||
| -rw-r--r-- | users/programs/eza.nix | 20 | ||||
| -rw-r--r-- | users/programs/fd.nix | 12 | ||||
| -rw-r--r-- | users/programs/fish.nix (renamed from users/profiles/fish.nix) | 5 | ||||
| -rw-r--r-- | users/programs/gh.nix (renamed from users/profiles/gh.nix) | 1 | ||||
| -rw-r--r-- | users/programs/git.nix (renamed from users/profiles/git.nix) | 29 | ||||
| -rw-r--r-- | users/programs/go.nix | 24 | ||||
| -rw-r--r-- | users/programs/k9s.nix | 59 | ||||
| -rw-r--r-- | users/programs/kubie.nix | 24 | ||||
| -rw-r--r-- | users/programs/ssh.nix (renamed from users/profiles/ssh.nix) | 10 | ||||
| -rw-r--r-- | users/programs/starship.nix (renamed from users/profiles/starship.nix) | 0 |
12 files changed, 150 insertions, 45 deletions
diff --git a/users/profiles/1password.nix b/users/programs/1password.nix index 63892c7..63892c7 100644 --- a/users/profiles/1password.nix +++ b/users/programs/1password.nix diff --git a/users/programs/direnv.nix b/users/programs/direnv.nix new file mode 100644 index 0000000..54585ca --- /dev/null +++ b/users/programs/direnv.nix @@ -0,0 +1,11 @@ +{ ... }: +{ + programs.direnv = { + enable = true; + nix-direnv.enable = true; + config = { + global.disable_stdin = true; + global.strict_env = true; + }; + }; +} diff --git a/users/programs/eza.nix b/users/programs/eza.nix new file mode 100644 index 0000000..d0326f6 --- /dev/null +++ b/users/programs/eza.nix @@ -0,0 +1,20 @@ +{ ... }: +{ + programs.eza = { + enable = true; + icons = "never"; + enableFishIntegration = false; + extraOptions = [ + "--group-directories-first" + "--no-quotes" + "--git-ignore" + "--icons=never" + ]; + }; + + programs.fish.shellAliases = { + la = "eza -la --git --color=always --group-directories-first"; + ll = "eza -la -L=1 --git --color=always --group-directories-first"; + lt = "eza -aT -L=2 --git --color=always --group-directories-first"; + }; +} diff --git a/users/programs/fd.nix b/users/programs/fd.nix new file mode 100644 index 0000000..cdbae66 --- /dev/null +++ b/users/programs/fd.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + # an alternative to find + programs.fd = { + enable = true; + hidden = true; + ignores = [ + ".git/" + ".direnv/" + ]; + }; +} diff --git a/users/profiles/fish.nix b/users/programs/fish.nix index 314e9f6..e5a1013 100644 --- a/users/profiles/fish.nix +++ b/users/programs/fish.nix @@ -22,10 +22,5 @@ g = "git"; gap = "git add --patch"; }; - shellAliases = { - la = "eza -la --git --color=always --group-directories-first"; - ll = "eza -la -L=1 --git --color=always --group-directories-first"; - lt = "eza -aT -L=2 --git --color=always --group-directories-first"; - }; }; } diff --git a/users/profiles/gh.nix b/users/programs/gh.nix index bf74766..b194b35 100644 --- a/users/profiles/gh.nix +++ b/users/programs/gh.nix @@ -2,7 +2,6 @@ { programs.gh = { enable = true; - settings = { version = 1; git_protocol = "ssh"; diff --git a/users/profiles/git.nix b/users/programs/git.nix index ebc753b..a95bb11 100644 --- a/users/profiles/git.nix +++ b/users/programs/git.nix @@ -37,29 +37,6 @@ in logf = "log --pretty=format:\"%C(yellow)%h%Cred%d %Creset%s%Cblue (%cn)\" --decorate --numstat"; }; - # https://stackoverflow.com/questions/74012449/git-includeif-hasconfigremote-url-not-working - # to test it's working as expected: - # run `git config --get-all user.email' in a repository to check that we get all the possible emails - # run `git config --get user.email' in a repository to check which email is selected - includes = [ - { - condition = "hasconfig:remote.*.url:git@github.rbx.com:*/**"; - path = pkgs.writeText "username.cfg" (lib.generators.toGitINI { user.email = "fcuny@roblox.com"; }); - } - { - condition = "hasconfig:remote.*.url:git@github.com:Roblox/**"; - path = pkgs.writeText "username.cfg" (lib.generators.toGitINI { user.email = "fcuny@roblox.com"; }); - } - { - condition = "hasconfig:remote.*.url:https://github.com/Roblox/**"; - path = pkgs.writeText "username.cfg" (lib.generators.toGitINI { user.email = "fcuny@roblox.com"; }); - } - { - condition = "hasconfig:remote.*.url:https://github.rbx.com/*/**"; - path = pkgs.writeText "username.cfg" (lib.generators.toGitINI { user.email = "fcuny@roblox.com"; }); - } - ]; - ignores = [ ".DS_Store" ".aider.*" @@ -109,12 +86,6 @@ in autosetuprebase = "remote"; sort = "authordate"; }; - - url = { - "ssh://git@github.rbx.com/" = { - insteadOf = "https://github.rbx.com/"; - }; - }; }; }; } diff --git a/users/programs/go.nix b/users/programs/go.nix new file mode 100644 index 0000000..0ae1ec1 --- /dev/null +++ b/users/programs/go.nix @@ -0,0 +1,24 @@ +{ pkgs, config, ... }: +{ + programs.go = { + enable = true; + goPath = ".local/share/pkg.go"; + goBin = ".local/bin.go"; + goPrivate = [ + "github.rbx.com/*" + "github.com/fcuny/*" + ]; + }; + + home.packages = with pkgs; [ + delve + go-tools # collection of tools, https://github.com/dominikh/go-tools + golangci-lint + gopls + ]; + + home.sessionPath = [ + config.home.sessionVariables.GOBIN + "${config.home.homeDirectory}/.local/bin" + ]; +} diff --git a/users/programs/k9s.nix b/users/programs/k9s.nix new file mode 100644 index 0000000..2d60ab1 --- /dev/null +++ b/users/programs/k9s.nix @@ -0,0 +1,59 @@ +{ ... }: +{ + programs.k9s = { + enable = true; + settings = { + k9s = { + refreshRate = 1; + }; + }; + plugin = { + plugins = { + log-bat = { + shortCut = "Shift-L"; + description = "Logs (bat)"; + scopes = [ "po" ]; + command = "bash"; + background = false; + args = [ + "-c" + "\"$@\" | bat" + "dummy-arg" + "kubectl" + "logs" + "$NAME" + "-n" + "$NAMESPACE" + "--context" + "$CONTEXT" + "--kubeconfig" + "$KUBECONFIG" + ]; + }; + log-bat-container = { + shortCut = "Shift-L"; + description = "Logs (bat)"; + scopes = [ "containers" ]; + command = "bash"; + background = false; + args = [ + "-c" + "\"$@\" | bat" + "dummy-arg" + "kubectl" + "logs" + "-c" + "$NAME" + "$POD" + "-n" + "$NAMESPACE" + "--context" + "$CONTEXT" + "--kubeconfig" + "$KUBECONFIG" + ]; + }; + }; + }; + }; +} diff --git a/users/programs/kubie.nix b/users/programs/kubie.nix new file mode 100644 index 0000000..5ac8678 --- /dev/null +++ b/users/programs/kubie.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + kubie # kubeconfig browser https://github.com/sbstp/kubie + ]; + + home.file.kubie = { + target = ".kube/kubie.yaml"; + text = '' + shell: fish + configs: + include: + - ~/.kube/rksconfig + prompt: + fish_use_rprompt: false + ''; + }; + + programs.fish = { + shellAbbrs = { + kctx = "kubie ctx"; + }; + }; +} diff --git a/users/profiles/ssh.nix b/users/programs/ssh.nix index 322a8bc..c236904 100644 --- a/users/profiles/ssh.nix +++ b/users/programs/ssh.nix @@ -23,16 +23,6 @@ controlPath = "none"; }; }; - "github.rbx.com" = { - hostname = "github.rbx.com"; - user = "git"; - forwardAgent = false; - extraOptions = { - preferredAuthentications = "publickey"; - controlMaster = "no"; - controlPath = "none"; - }; - }; }; }; diff --git a/users/profiles/starship.nix b/users/programs/starship.nix index 8a541ce..8a541ce 100644 --- a/users/profiles/starship.nix +++ b/users/programs/starship.nix |
