diff --git a/cleo.darwin.nix b/cleo.darwin.nix index d7a2c34..ceb7364 100644 --- a/cleo.darwin.nix +++ b/cleo.darwin.nix @@ -90,6 +90,16 @@ in home = "/Users/matthew.bessette"; }; + services.openssh = { + enable = true; + extraConfig = '' + StrictModes no + # Deny everyone by default unless they match the subnet rule + Match Address !192.168.0.0/16 + DenyUsers * + ''; + }; + # Homebrew for Casks and specific binaries # In a nix-darwin setup, Homebrew packages are not actually stored inside the Nix store. # Instead, nix-darwin acts as a manager that triggers the standard Homebrew installation diff --git a/cleo.home.nix b/cleo.home.nix index 38ab88d..bb579cd 100644 --- a/cleo.home.nix +++ b/cleo.home.nix @@ -1,4 +1,4 @@ -{ config, pkgs, inputs, ... }: +{ config, pkgs, inputs, vars, ... }: { imports = [ ./programs.vscode.nix @@ -77,6 +77,8 @@ home.file."android-sdk/platform-tools/adb".source = config.lib.file.mkOutOfStoreSymlink "/opt/homebrew/bin/adb"; home.file."android-sdk/cmdline-tools/latest/bin/sdkmanager".source = config.lib.file.mkOutOfStoreSymlink "/opt/homebrew/bin/sdkmanager"; + home.file.".ssh/authorized_keys".text = (builtins.concatStringsSep "\n" vars.sshPublicKeys) + "\n"; + home.file.".copilot/settings.json".text = builtins.toJSON { footer = { showModelEffort = true; diff --git a/flake.nix b/flake.nix index c8f8b8e..2541065 100644 --- a/flake.nix +++ b/flake.nix @@ -140,6 +140,7 @@ system = linuxSystem; hostname = "caesium"; userConfig = (import ./variables.nix { inherit pkgs; })."mbessette"; + vars = import ./variables.nix { inherit pkgs; }; inherit inputs; }; modules = [ @@ -163,6 +164,7 @@ system = darwinSystem; hostname = "hydrogen"; userConfig = (import ./variables.nix { inherit pkgs; }).mbessette; + vars = import ./variables.nix { inherit pkgs; }; inherit inputs; }; modules = [ @@ -186,6 +188,7 @@ system = darwinSystem; hostname = "cleo-darwin"; userConfig = (import ./variables.nix { inherit pkgs; })."matthew.bessette"; + vars = import ./variables.nix { inherit pkgs; }; inherit inputs; }; modules = [ diff --git a/home.shared.nix b/home.shared.nix index 3b5a456..858fa3a 100644 --- a/home.shared.nix +++ b/home.shared.nix @@ -163,6 +163,7 @@ in enableBashIntegration = true; enableZshIntegration = true; settings = { + shell-integration-features = "ssh-terminfo,ssh-env"; macos-icon = "chalkboard"; keybind = [ "home=text:\\x01" # Ctrl-A -> beginning of line diff --git a/hydrogen.home.nix b/hydrogen.home.nix index 7ba2735..6fcdd17 100644 --- a/hydrogen.home.nix +++ b/hydrogen.home.nix @@ -1,7 +1,6 @@ { config, inputs, pkgs, ... }: { imports = [ ./programs.vscode.nix - ./programs.thunderbird.nix ]; home.sessionVariables = { diff --git a/variables.nix b/variables.nix index 4d89c9f..0ea9552 100644 --- a/variables.nix +++ b/variables.nix @@ -18,4 +18,8 @@ in { _1PassKeyName = "Cleo SSH Key"; _1PassKeyVault = "Cleo"; }; + sshPublicKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILsZW38Ad1GAhGgfo7LsBzt6M4oo30VafsmNrILPMVio" # Personal SSH Key + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHC7FdwVyL71a2+7K9DFqNEiuvHO4eDh5ndS1tivimMi" # Cleo SSH Key + ]; }