diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-09-21 15:28:08 -0500 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-09-21 15:28:08 -0500 |
| commit | 8fa6ed6444a3df3647bed8396b42936bdf76ab39 (patch) | |
| tree | b045bb7e2b2267fec6ecce8372751ccbef1182b7 | |
| parent | 14d0c1fdf529fce896f46b651d1495288cf3013c (diff) | |
new machines! random other changes
| -rw-r--r-- | flake.lock | 2 | ||||
| -rw-r--r-- | hosts.toml | 18 | ||||
| -rw-r--r-- | hosts/ganymede/caddy.nix | 4 | ||||
| -rw-r--r-- | hosts/mercury/nixos.nix | 22 | ||||
| -rw-r--r-- | hosts/mercury/wireguard.nix | 1 | ||||
| -rw-r--r-- | modules/services/nixos/openssh.nix | 21 | ||||
| -rw-r--r-- | modules/terminal/hjem/programs/eza.nix | 8 | ||||
| -rw-r--r-- | modules/terminal/hjem/programs/lazygit.nix | 2 | ||||
| -rw-r--r-- | modules/user/nixos/default.nix | 8 |
9 files changed, 62 insertions, 24 deletions
@@ -183,7 +183,7 @@ "geolite-db": { "flake": false, "locked": { - "narHash": "sha256-Zf+qhr5wN6JFf9BKxY4dAH7g6F3AZpDB3ZRxNbt0PeM=", + "narHash": "sha256-Na5E1pifzdXc9jGDMh53zzvQG571QMfKldCtulw+ibE=", "type": "file", "url": "https://github.com/P3TERX/GeoLite.mmdb/releases/latest/download/GeoLite2-City.mmdb" }, @@ -7,11 +7,12 @@ wg_ip = "10.100.0.5" [hosts.ganymede] hostnames = ["ganymede", "192.168.50.2", "williamsfam.us.com"] +ip = "10.100.0.1" user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeAsRh11Jyv+7Fm4WhzV4XN0LMYQS1/yMbvT+pvFDcd collin@ganymede" host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9ogXwOPZbAyAq9ecuzJGeRXobWrT9I7icHeEKnpzwB" -wg_pubkey = "7BdBTJ/FQUOPjSU+Q1Ieg9VqMd2y8BCMqk61I5rMAnY=" wg_ip = "10.100.0.1" +wg_pubkey = "7BdBTJ/FQUOPjSU+Q1Ieg9VqMd2y8BCMqk61I5rMAnY=" caddy-root-ca = ''' -----BEGIN CERTIFICATE----- @@ -32,3 +33,18 @@ user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKwMBLWWxpf4jZN3R3iQ7XEAOMq0 wg_pubkey = "CWsD6IJYAbbAX756zb5TlChjEJEm0Q3KpeakfuaZIyA=" wg_ip = "10.100.0.24" + +[hosts.saturn] +ip = "192.168.50.3" +jump = "collin@ganymede" +user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAUURqA833VJRX59xMsrqsgT4uXCKWRaO+4Q5A4f5Vou admin@saturn" + +[hosts.mimas] +ip = "192.168.50.4" +jump = "collin@ganymede" +user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9g9DIR8aOTOPME41waUoAXDqEWhsgxrHgk8j7HfLkf admin@mimas" + +[hosts.tethys] +ip = "192.168.50.5" +jump = "collin@ganymede" +user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBaEvYE22LOXV3KzlFW5g169BBd/gux0GNs5l11mzhM admin@tethys" diff --git a/hosts/ganymede/caddy.nix b/hosts/ganymede/caddy.nix index cf85042..0fe2175 100644 --- a/hosts/ganymede/caddy.nix +++ b/hosts/ganymede/caddy.nix @@ -36,12 +36,12 @@ ''; virtualHosts = { - "jta.williamsfam.us.com" = { + "questions.williamsfam.us.com" = { logFormat = lib.mkForce '' output file /var/log/caddy/access-williamsfam.us.com.log ''; extraConfig = '' - root * /media/public/www/jta + root * /media/public/www/questions @hidden path */.* respond @hidden "Not Found" 404 diff --git a/hosts/mercury/nixos.nix b/hosts/mercury/nixos.nix index 87c0495..ff386cd 100644 --- a/hosts/mercury/nixos.nix +++ b/hosts/mercury/nixos.nix @@ -1,6 +1,7 @@ { inputs, hosts, + lib, ... }: { imports = [ @@ -17,11 +18,22 @@ services.upower.enable = true; - programs.ssh.extraConfig = '' - Host ganymede - HostName 10.100.0.1 - Port 22 - ''; + programs.ssh.extraConfig = + hosts + |> (lib.mapAttrsToList (hostname: hostAttrs: + if hostAttrs ? ip + then '' + Host ${hostname} + ${ + if hostAttrs ? jump + then "ProxyJump ${hostAttrs.jump}" + else "" + } + HostName ${hostAttrs.ip} + '' + else "")) + |> (builtins.filter (s: s != "")) + |> (lib.concatStringsSep "\n"); programs.kdeconnect.enable = true; diff --git a/hosts/mercury/wireguard.nix b/hosts/mercury/wireguard.nix index a103328..f8b1bd8 100644 --- a/hosts/mercury/wireguard.nix +++ b/hosts/mercury/wireguard.nix @@ -42,7 +42,6 @@ in { wants = ["network-online.target"]; script = '' REMOTE_IP=$(${pkgs.dnsutils}/bin/dig +short williamsfam.us.com | ${pkgs.gawk}/bin/awk 'NR==1') - if [[ -z "$REMOTE_IP" ]]; then echo "Failed to resolve DNS for configured domain" >&2 exit 1 diff --git a/modules/services/nixos/openssh.nix b/modules/services/nixos/openssh.nix index 4826369..eb8bff6 100644 --- a/modules/services/nixos/openssh.nix +++ b/modules/services/nixos/openssh.nix @@ -5,7 +5,6 @@ ... }: let cfg = config.collinux.services.sshd; - pure = x: [x]; authorizedKeys = hosts @@ -18,15 +17,19 @@ in { enable = true; allowSFTP = true; - hostKeys = pure { - path = "/etc/ssh/ssh_host_ed25519_key"; - type = "ed25519"; - }; + hostKeys = [ + { + path = "/etc/ssh/ssh_host_ed25519_key"; + type = "ed25519"; + } + ]; - listenAddresses = pure { - addr = "0.0.0.0"; - port = cfg.port; - }; + listenAddresses = [ + { + addr = "0.0.0.0"; + port = cfg.port; + } + ]; settings = { PermitRootLogin = "yes"; diff --git a/modules/terminal/hjem/programs/eza.nix b/modules/terminal/hjem/programs/eza.nix index b900ceb..a54fbbe 100644 --- a/modules/terminal/hjem/programs/eza.nix +++ b/modules/terminal/hjem/programs/eza.nix @@ -10,13 +10,15 @@ in files = (lib.optionalAttrs config.collinux.terminal.shells.fish.enable { ".config/fish/conf.d/eza.fish".text = '' - alias ls "eza -A -w 80 --group-directories-first -I '.git*'" + alias ls "eza -A -w 80 --group-directories-first --git" + alias ll "eza -Alho --no-permissions --group --group-directories-first --git" alias tree "eza -T" ''; }) - // (lib.optionalAttrs config.collinux.terminal.shells.fish.enable { + // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable { ".config/bash/conf.d/eza.bash".text = '' - alias ls="eza -A -w 80 --group-directories-first -I '.git*'" + alias ls="eza -A -w 80 --group-directories-first --git" + alias ll="eza -Alho --no-permissions --group --group-directories-first --git" alias tree="eza -T" ''; }); diff --git a/modules/terminal/hjem/programs/lazygit.nix b/modules/terminal/hjem/programs/lazygit.nix index 399d2f4..d4a22eb 100644 --- a/modules/terminal/hjem/programs/lazygit.nix +++ b/modules/terminal/hjem/programs/lazygit.nix @@ -7,7 +7,7 @@ cfg = config.collinux.terminal.programs.lazygit; settings = { - git.pagers = [{pager = "diff-so-fancy";}]; + git.diffRenderers = [{command = "diff-so-fancy";}]; gui = { showRandomTip = false; commitLength.show = false; diff --git a/modules/user/nixos/default.nix b/modules/user/nixos/default.nix index 239f7ce..a6fd52d 100644 --- a/modules/user/nixos/default.nix +++ b/modules/user/nixos/default.nix @@ -45,7 +45,13 @@ in { publicKey = data.host_pubkey; } // (lib.optionalAttrs (data ? hostnames) { - hostNames = data.hostnames; + hostNames = + data.hostnames + ++ ( + if data ? ip + then [data.ip] + else [] + ); })); }; |
