diff --git a/home/c/programs/git/default.nix b/home/c/programs/git/default.nix index b7e532b..8e5f9f5 100644 --- a/home/c/programs/git/default.nix +++ b/home/c/programs/git/default.nix @@ -34,6 +34,6 @@ ghq = {root = "~/repos";}; }; - diff-so-fancy.enable = true; + delta.enable = true; }; } diff --git a/home/c/programs/tmux/bar.patch b/home/c/programs/tmux/bar.patch new file mode 100644 index 0000000..02f604b --- /dev/null +++ b/home/c/programs/tmux/bar.patch @@ -0,0 +1,24 @@ +diff --git a/tmux-onedark-theme.tmux b/tmux-onedark-theme.tmux +index e440cc7..33ba373 100755 +--- a/tmux-onedark-theme.tmux ++++ b/tmux-onedark-theme.tmux +@@ -75,14 +75,14 @@ set "status-fg" "$onedark_white" + set "@prefix_highlight_fg" "$onedark_black" + set "@prefix_highlight_bg" "$onedark_green" + set "@prefix_highlight_copy_mode_attr" "fg=$onedark_black,bg=$onedark_green" +-set "@prefix_highlight_output_prefix" "  " ++set "@prefix_highlight_output_prefix" " " + + status_widgets=$(get "@onedark_widgets") + time_format=$(get "@onedark_time_format" "%R") + date_format=$(get "@onedark_date_format" "%d/%m/%Y") + +-set "status-right" "#[fg=$onedark_white,bg=$onedark_black,nounderscore,noitalics]${time_format}  ${date_format} #[fg=$onedark_visual_grey,bg=$onedark_black]#[fg=$onedark_visual_grey,bg=$onedark_visual_grey]#[fg=$onedark_white, bg=$onedark_visual_grey]${status_widgets} #[fg=$onedark_green,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_black,bg=$onedark_green,bold] #h #[fg=$onedark_yellow, bg=$onedark_green]#[fg=$onedark_red,bg=$onedark_yellow]" +-set "status-left" "#[fg=$onedark_black,bg=$onedark_green,bold] #S #{prefix_highlight}#[fg=$onedark_green,bg=$onedark_black,nobold,nounderscore,noitalics]" ++set "status-right" "#[fg=$onedark_white,bg=$onedark_black,nounderscore,noitalics]${time_format} ${date_format} #[fg=$onedark_visual_grey,bg=$onedark_black]#[fg=$onedark_visual_grey,bg=$onedark_visual_grey]#[fg=$onedark_white, bg=$onedark_visual_grey]${status_widgets} #[fg=$onedark_green,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_black,bg=$onedark_green,bold] #h #[fg=$onedark_yellow, bg=$onedark_green]#[fg=$onedark_red,bg=$onedark_yellow]" ++set "status-left" "#[fg=$onedark_black,bg=$onedark_green,bold] #S #{prefix_highlight}#[fg=$onedark_green,bg=$onedark_black,nobold,nounderscore,noitalics]" + +-set "window-status-format" "#[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_black] #I  #W #[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]" +-set "window-status-current-format" "#[fg=$onedark_black,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_visual_grey,nobold] #I  #W #[fg=$onedark_visual_grey,bg=$onedark_black,nobold,nounderscore,noitalics]" ++set "window-status-format" "#[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_black] #I #W #[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]" ++set "window-status-current-format" "#[fg=$onedark_black,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_visual_grey,nobold] #I #W #[fg=$onedark_visual_grey,bg=$onedark_black,nobold,nounderscore,noitalics]" diff --git a/home/c/programs/tmux/default.nix b/home/c/programs/tmux/default.nix index 0f4cfeb..e71d8f5 100644 --- a/home/c/programs/tmux/default.nix +++ b/home/c/programs/tmux/default.nix @@ -20,15 +20,15 @@ in { sensible yank { - plugin = onedark-theme; + plugin = onedark-theme.overrideAttrs (_: { + patches = [./bar.patch]; + }); extraConfig = "\n"; } { plugin = resurrect; extraConfig = '' - set -g @resurrect-strategy-vim 'session' - set -g @resurrect-strategy-nvim 'session' - set -g @resurrect-capture-pane-contents 'on' + set -g @resurrect-capture-pane-contents 'off' ''; } { @@ -62,8 +62,4 @@ in { bind -r l select-pane -R ''; }; - - # home.packages = [ - # pkgs.tmux-sessionizer-cl - # ]; } diff --git a/hosts/hermes/ddns.nix b/hosts/hermes/ddns.nix new file mode 100644 index 0000000..e8ea1c0 --- /dev/null +++ b/hosts/hermes/ddns.nix @@ -0,0 +1,13 @@ +{config, ...}: { + services.cloudflare-dyndns = { + enable = true; + ipv4 = true; + ipv6 = false; + proxied = false; + deleteMissing = false; + domains = []; + apiTokenFile = config.age.secrets.cloudflare-api.path; + }; + # services.cloudflare-dyndns.domains = []; + age.secrets."cloudflare-api".file = ../../secrets/cloudflare-api.age; +} diff --git a/hosts/hermes/default.nix b/hosts/hermes/default.nix index a49190c..da82c9e 100644 --- a/hosts/hermes/default.nix +++ b/hosts/hermes/default.nix @@ -2,6 +2,7 @@ imports = [ ./hardware-configuration.nix ./configuration.nix + ./ddns.nix ./quassel.nix ./fail2ban.nix ./containers.nix diff --git a/hosts/hermes/forgejo.nix b/hosts/hermes/forgejo.nix index f4d79c6..21ba439 100644 --- a/hosts/hermes/forgejo.nix +++ b/hosts/hermes/forgejo.nix @@ -6,6 +6,7 @@ domain = "git.cleslie.uk"; in { services = { + cloudflare-dyndns.domains = [domain]; forgejo = { enable = true; database.type = "postgres"; diff --git a/hosts/hermes/headscale.nix b/hosts/hermes/headscale.nix index d907330..5555b0b 100644 --- a/hosts/hermes/headscale.nix +++ b/hosts/hermes/headscale.nix @@ -13,6 +13,7 @@ in { ip_prefixes = "100.64.0.0/10"; }; }; + cloudflare-dyndns.domains = [domain]; caddy.virtualHosts.${domain}.extraConfig = '' reverse_proxy localhost:${toString config.services.headscale.port} ''; diff --git a/hosts/hermes/media.nix b/hosts/hermes/media.nix index 694a787..e1e5252 100644 --- a/hosts/hermes/media.nix +++ b/hosts/hermes/media.nix @@ -85,6 +85,8 @@ in { }; }; + cloudflare-dyndns.domains = ["media.cleslie.uk" "watch.cleslie.uk" "request.cleslie.uk"]; + jellyfin = { enable = true; package = pkgs.jellyfin; diff --git a/justfile b/justfile index a8b4607..82bf5a4 100644 --- a/justfile +++ b/justfile @@ -5,6 +5,7 @@ alias r := rebuild alias v := vim alias u := update alias c := cache +alias d := deploy rebuild: sudo nixos-rebuild switch --flake .# diff --git a/secrets/cloudflare-api.age b/secrets/cloudflare-api.age new file mode 100644 index 0000000..1ee3de6 --- /dev/null +++ b/secrets/cloudflare-api.age @@ -0,0 +1,8 @@ +age-encryption.org/v1 +-> ssh-ed25519 /RyXeg p2ROUhWiDQDOjALQnhhf566js8ivYTsgwNfCaaoe6yQ +UnCc2/4lb+PxnrKdAPVqwAyXavFGr8M3NV3+fSSdAU0 +-> ssh-ed25519 aSaoJQ hHqpvUCaH5RLAQwTdH1llfF/0aTraXtl25qFDaFhUwk ++4VMHc3PGR9HBlVTw4anbYORQPgFl24WGF5pwmt7w20 +--- qa7ctM764SNg3u/ITk+6DRXbLqF1Lom1xgKysY9DrkE +Z;Q +7k4%#pqvy] ieǺ]ɩi!4=s䉁JfpHs29sF}˪#i8 \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 5dec7e0..6aed516 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -10,4 +10,5 @@ in { "mesh-conf-infra.age".publicKeys = keys.c ++ allSystems; "mesh-conf-cleslie.age".publicKeys = keys.c ++ allSystems; "forgejo-password.age".publicKeys = keys.c ++ [systems.hermes]; + "cloudflare-api.age".publicKeys = keys.c ++ [systems.hermes]; }