diff --git a/common/base.nix b/common/base.nix index 14a12c0..71d565f 100644 --- a/common/base.nix +++ b/common/base.nix @@ -16,9 +16,10 @@ ./locales/paris.nix + ./programs/git.nix ./programs/neovim.nix ./programs/zsh.nix - ./programs/git.nix + ./programs/ssh.nix ./services/sshd.nix ]; diff --git a/common/programs/ssh.nix b/common/programs/ssh.nix new file mode 100644 index 0000000..70dc9f2 --- /dev/null +++ b/common/programs/ssh.nix @@ -0,0 +1,11 @@ +let + sshKeys = import ../../crypto/ssh-keys.nix; +in { + programs.ssh = { + knownHosts = { + "enry".publicKey = sshKeys.host.enry; + "phoenix".publicKey = sshKeys.host.phoenix; + "new-new-phoenix".publicKey = sshKeys.host.new-new-phoenix; + }; + }; +} diff --git a/common/programs/zsh.nix b/common/programs/zsh.nix index 05d66bb..e963590 100644 --- a/common/programs/zsh.nix +++ b/common/programs/zsh.nix @@ -9,7 +9,6 @@ ll = "ls -al"; done = "curl -d 'Done' ntfy.sh/tasiaiso_done"; rebuild = "sudo nixos-rebuild switch -flake -I nixos-config=/home/tasia/Desktop/nixos-config"; # .#hostname - "git ap" = "git add -p"; }; ohMyZsh = { diff --git a/common/services/sshd.nix b/common/services/sshd.nix index 253632b..956a72c 100644 --- a/common/services/sshd.nix +++ b/common/services/sshd.nix @@ -37,7 +37,7 @@ AllowTcpForwarding no # wip - AllowTcpForwarding yes + # AllowTcpForwarding yes X11Forwarding no AllowAgentForwarding no AllowStreamLocalForwarding no diff --git a/crypto/ssh-keys.nix b/crypto/ssh-keys.nix index 4602094..a0a4522 100644 --- a/crypto/ssh-keys.nix +++ b/crypto/ssh-keys.nix @@ -14,7 +14,3 @@ rec { new-new-phoenix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFXu/iFf6yhi6A0f6Lvp+wyltMHq1YgxZan5OdCKP9gE root@new-new-phoenix"; }; } - -programs.ssh.knownHosts = { - "new-new-phoenix".publicKey = sshKeys.new-new-phoenix.host; -}; diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig index e58c4c1..a87fef9 100644 --- a/dotfiles/.gitconfig +++ b/dotfiles/.gitconfig @@ -4,3 +4,6 @@ format = ssh [commit] gpgsign = true +[alias] + st = status + ap = add -p \ No newline at end of file diff --git a/dotfiles/.shellrc b/dotfiles/.shellrc new file mode 100644 index 0000000..3733729 --- /dev/null +++ b/dotfiles/.shellrc @@ -0,0 +1,10 @@ +export XDG_DATA_HOME="$HOME/.local/share" + +if [[ -n $SSH_CONNECTION ]] ; then + curl \ + -H "Title: New SSH session" \ + -H "Priority: urgent" \ + -H "Tags: urgent" \ + -d "$(cat /etc/hostname ): ssh session ($SSH_CONNECTION)" \ + ntfy.sh/tasiaiso_alerts &> /dev/null +fi diff --git a/hosts/new-new-phoenix/configuration.nix b/hosts/new-new-phoenix/configuration.nix index 1788c0b..89866f3 100644 --- a/hosts/new-new-phoenix/configuration.nix +++ b/hosts/new-new-phoenix/configuration.nix @@ -88,8 +88,8 @@ in { osu-lazer-bin - inputs.nixos-conf-editor.packages.${system}.nixos-conf-editor - inputs.nix-software-center.packages.${system}.nix-software-center + # inputs.nixos-conf-editor.packages.${system}.nixos-conf-editor + # inputs.nix-software-center.packages.${system}.nix-software-center ]; services.blueman.enable = true;