From 9583e816d62f88fd7f58309a74f79ad79a4071ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jana=20D=C3=B6nszelmann?= Date: Tue, 17 Mar 2026 11:16:22 +0100 Subject: [PATCH] add ssh and jj --- hosts/fili/services/factorio/default.nix | 47 ++++++++++++------------ programs/default.nix | 10 ++--- programs/jj/default.nix | 19 +++++++++- programs/ssh.nix | 42 +++++++++++++++++++++ programs/tmux/default.nix | 5 ++- 5 files changed, 91 insertions(+), 32 deletions(-) create mode 100644 programs/ssh.nix diff --git a/hosts/fili/services/factorio/default.nix b/hosts/fili/services/factorio/default.nix index 80815ba..89a92a6 100644 --- a/hosts/fili/services/factorio/default.nix +++ b/hosts/fili/services/factorio/default.nix @@ -1,9 +1,8 @@ -{ - lib, - pkgs, - config, - secrets, - ... +{ lib +, pkgs +, config +, secrets +, ... }: let factorioVersion = @@ -61,12 +60,11 @@ let }; privateUsers = "no"; - imports = - { - config, - pkgs, - lib, - ... + config = + { config + , pkgs + , lib + , ... }: { systemd.services.factorio.serviceConfig.User = "factorio"; @@ -108,18 +106,19 @@ in }; containers = - factorioContainer "tawney" { - autosave-interval = 20; - admins = [ - "jonay2000" - "computerdruid" - "pineapple" - ]; - extraSettingsFile = config.sops.secrets.factorio.path; - # mods = getMods .factorio-mods/tawney; - package = factorioVersion "2.0.69" "sha256-I1FHuz7WtfCmmTiTxskv3+U1upWrhmBG9R+GUoS1c0E="; - port = 20001; - } + factorioContainer "tawney" + { + autosave-interval = 20; + admins = [ + "jonay2000" + "computerdruid" + "pineapple" + ]; + extraSettingsFile = config.sops.secrets.factorio.path; + # mods = getMods .factorio-mods/tawney; + package = factorioVersion "2.0.69" "sha256-I1FHuz7WtfCmmTiTxskv3+U1upWrhmBG9R+GUoS1c0E="; + port = 20001; + } // factorioContainer "snek" { autosave-interval = 20; admins = [ diff --git a/programs/default.nix b/programs/default.nix index fb72b37..c22ce6d 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -4,6 +4,7 @@ imports = lib.concatLists [ [ ./xdg.nix + ./ssh.nix ./nvim ./fish ./kanata @@ -43,11 +44,10 @@ inherit inputs; requirements = [ "graphical" ]; home-config = - { - config, - pkgs, - lib, - ... + { config + , pkgs + , lib + , ... }: let disableFeatures = [ diff --git a/programs/jj/default.nix b/programs/jj/default.nix index 18c1e79..021c9fa 100644 --- a/programs/jj/default.nix +++ b/programs/jj/default.nix @@ -100,8 +100,6 @@ inputs@{ machine, ... }: "-c" script ]; - in - { tug = [ "bookmark" "move" @@ -110,6 +108,9 @@ inputs@{ machine, ... }: "--to" "coalesce(@ & ~empty(), @-)" ]; + in + { + inherit tug; fuck = [ "bookmark" "move" @@ -153,6 +154,20 @@ inputs@{ machine, ... }: "--from" "trunk()" ]; + next = [ "edit" "@+" ]; + n = [ "edit" "@+" ]; + prev = [ "edit" "@-" ]; + p = [ "edit" "@-" ]; + + gp = [ "git" "push" ]; + t = tug; + + d = "describe"; + dm = [ "describe" "-m" ]; + e = "edit"; + s = "squash"; + si = "squash -i"; + sp = "split"; }; templates = { diff --git a/programs/ssh.nix b/programs/ssh.nix new file mode 100644 index 0000000..1300ac9 --- /dev/null +++ b/programs/ssh.nix @@ -0,0 +1,42 @@ +inputs@{ machine, ... }: { + imports = + machine.program { + name = "ssh"; + inherit inputs; + requirements = [ "cli" ]; + home-config = _: { + programs.ssh = { + enable = true; + enableDefaultConfig = false; + matchBlocks = { + fili = { + user = "jana"; + hostname = "donsz.nl"; + }; + icecube = { + hostname = "192.168.178.138"; + proxyJump = "fili"; + }; + ragdoll = { + hostname = "192.168.178.138"; + proxyJump = "fili"; + }; + + "*" = { + forwardAgent = false; + serverAliveInterval = 0; + serverAliveCountMax = 3; + compression = false; + addKeysToAgent = null; + hashKnownHosts = false; + userKnownHostsFile = "~/.ssh/known_hosts"; + controlMaster = "no"; + controlPath = "~/.ssh/master-%r@%n:%p"; + controlPersist = null; + }; + }; + }; + }; + } + ; +} diff --git a/programs/tmux/default.nix b/programs/tmux/default.nix index ca371cd..e59f691 100644 --- a/programs/tmux/default.nix +++ b/programs/tmux/default.nix @@ -120,6 +120,9 @@ inputs@{ machine, ... }: bind x swap-pane -D bind z resize-pane -Z + # swap a full screen and terminal + bind a if -F "#{?window_zoomed_flag,0,1}" "select-pane -l ; resize-pane -Z" "resize-pane -Z ; select-pane -l" + # double-click ^k (or lshift with kanata) for previous pane like ^w in vim bind -r ^k select-pane -l bind q confirm-before -p "kill-pane #P? (y/n)" kill-pane @@ -132,7 +135,7 @@ inputs@{ machine, ... }: bind r source-file ~/.config/tmux/tmux.conf \; display "config reloaded" bind ? list-keys - # Scroll oin man etc + # Scroll in man etc tmux_commands_with_legacy_scroll="nano less more man git" bind -T root WheelUpPane \