Compare commits
4 commits
abeb891d5d
...
16ebf17d51
| Author | SHA1 | Date | |
|---|---|---|---|
| 16ebf17d51 | |||
| 804132ae4f | |||
| 20efe752c2 | |||
| 325bc887ef |
5 changed files with 79 additions and 5 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
./../programs/git.nix
|
./../programs/git.nix
|
||||||
./../programs/lsd.nix
|
./../programs/lsd.nix
|
||||||
./../programs/neovim.nix
|
./../programs/neovim.nix
|
||||||
|
./../programs/ssh.nix
|
||||||
./../programs/starship.nix
|
./../programs/starship.nix
|
||||||
./../programs/tmux.nix
|
./../programs/tmux.nix
|
||||||
./../programs/yt-dlp.nix
|
./../programs/yt-dlp.nix
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
anythingllm = {
|
anythingllm = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
containerConfig = {
|
containerConfig = {
|
||||||
image = "docker.io/mintplexlabs/anythingllm:1.9";
|
image = "docker.io/mintplexlabs/anythingllm:latest";
|
||||||
addHosts = [ "ollama.millironx.local:host-gateway" ];
|
addHosts = [ "ollama.millironx.local:host-gateway" ];
|
||||||
publishPorts = [ "3001:3001" ];
|
publishPorts = [ "3001:3001" ];
|
||||||
volumes =
|
volumes =
|
||||||
|
|
|
||||||
73
programs/ssh.nix
Normal file
73
programs/ssh.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
{ pkgs, lib, config, hostname, ... }:
|
||||||
|
let
|
||||||
|
sshIdPath = host: "~/.ssh/id_ed25519__${host}";
|
||||||
|
tailnetConfig = host: { identityFile = sshIdPath host; };
|
||||||
|
gitConfig = host: tailnetConfig host // { user = "git"; };
|
||||||
|
tailnetHosts = [ "anderson" "mcentire" "bosephus" ];
|
||||||
|
gitHosts = [ "github.com" "gitlab.com" "codeberg.org" "code.millironx.com" ];
|
||||||
|
tailnetMatchBlocks =
|
||||||
|
lib.genAttrs (lib.lists.remove hostname tailnetHosts) tailnetConfig;
|
||||||
|
gitMatchBlocks = lib.genAttrs gitHosts gitConfig // {
|
||||||
|
"code.millironx.com" = (gitConfig "code.millironx.com") // {
|
||||||
|
proxyCommand = "ssh anderson -W localhost:2222";
|
||||||
|
hostname = "code.millironx.com";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
enableDefaultConfig = false;
|
||||||
|
matchBlocks = {
|
||||||
|
"*" = { identitiesOnly = true; };
|
||||||
|
"aahz" = {
|
||||||
|
hostname = "nistac-108-37.dhcp.ksu.edu";
|
||||||
|
user = "tchristensen";
|
||||||
|
identityFile = sshIdPath "aahz";
|
||||||
|
};
|
||||||
|
"skeeve" = {
|
||||||
|
hostname = "129.130.108.157";
|
||||||
|
user = "tchristensen";
|
||||||
|
identityFile = sshIdPath "skeeve";
|
||||||
|
};
|
||||||
|
"ceres" = {
|
||||||
|
hostname = "ceres.scinet.usda.gov";
|
||||||
|
user = "thomas.christensen";
|
||||||
|
identitiesOnly = false;
|
||||||
|
serverAliveInterval = 20;
|
||||||
|
serverAliveCountMax = 30;
|
||||||
|
extraOptions = { TCPKeepAlive = "yes"; };
|
||||||
|
};
|
||||||
|
"atlas" = {
|
||||||
|
hostname = "Atlas-login-1.hpc.msstate.edu";
|
||||||
|
user = "thomas.christensen";
|
||||||
|
identitiesOnly = false;
|
||||||
|
serverAliveInterval = 20;
|
||||||
|
serverAliveCountMax = 30;
|
||||||
|
extraOptions = { TCPKeepAlive = "yes"; };
|
||||||
|
};
|
||||||
|
"atlas-dtn" = {
|
||||||
|
hostname = "Atlas-dtn.hpc.msstate.edu";
|
||||||
|
user = "thomas.christensen";
|
||||||
|
identitiesOnly = false;
|
||||||
|
};
|
||||||
|
"code.millironx.com" = {
|
||||||
|
proxyCommand = "ssh anderson -W localhost:2222";
|
||||||
|
};
|
||||||
|
} // tailnetMatchBlocks // gitMatchBlocks;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = let
|
||||||
|
# Answer no to overwrite questions
|
||||||
|
keygen = host: ''
|
||||||
|
yes "n" | \
|
||||||
|
ssh-keygen \
|
||||||
|
-t ed25519 \
|
||||||
|
-f ~/.ssh/id_ed25519__${host} \
|
||||||
|
-C "millironx@${hostname}" \
|
||||||
|
-N ""
|
||||||
|
'';
|
||||||
|
in [
|
||||||
|
(pkgs.writeShellScriptBin "ssh-bootstrap-keys"
|
||||||
|
(builtins.concatStringsSep "\n" (map keygen (tailnetHosts ++ gitHosts))))
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, hostname, ... }: {
|
||||||
programs.zed-editor = {
|
programs.zed-editor = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = null;
|
package = null;
|
||||||
|
|
@ -60,8 +60,8 @@
|
||||||
lsp = {
|
lsp = {
|
||||||
nil = { settings.nix.flake.autoArchive = true; };
|
nil = { settings.nix.flake.autoArchive = true; };
|
||||||
nixd = {
|
nixd = {
|
||||||
settings.options.home-manager.expr =
|
settings.options.home-manager.expr = ''
|
||||||
"(builtins.getFlake (builtins.toString ./.)).homeConfigurations.<name>.options";
|
(builtins.getFlake (builtins.toString ~/.config/home-manager)).homeConfigurations."millironx@${hostname}".options'';
|
||||||
};
|
};
|
||||||
texlab = {
|
texlab = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableSshSupport = true;
|
enableSshSupport = false;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
defaultCacheTtl = 604800;
|
defaultCacheTtl = 604800;
|
||||||
maxCacheTtl = 604800;
|
maxCacheTtl = 604800;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue