From d6efefc1d9e6b9fd515c5cb5f2a077e05caeaab7 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Mon, 3 Feb 2025 02:59:16 -0800 Subject: update nixos configuration to have ssh key for live iso; new journal entry --- nix/systems/installer/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'nix/systems') diff --git a/nix/systems/installer/default.nix b/nix/systems/installer/default.nix index cbfed0d..2b832f4 100644 --- a/nix/systems/installer/default.nix +++ b/nix/systems/installer/default.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: let commits = import ./commits.nix; in @@ -9,15 +9,28 @@ in enable = true; }; firewall = { - allowedTCPPorts = [ ]; + allowedTCPPorts = [ 22 ]; allowedUDPPorts = [ ]; }; wireless.enable = false; }; + services.openssh = { + enable = true; + ports = [ 22 ]; + settings = { + PasswordAuthentication = true; + AllowUsers = null; + UseDns = true; + PermitRootLogin = lib.mkForce "prohibit-password"; + }; + }; users.extraUsers.root.password = "nixos"; users.extraUsers.nixos.password = "nixos"; users.users = { + root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell" + ]; nixos = { packages = with pkgs; [ git @@ -35,7 +48,7 @@ fi ping -q -c1 google.com &>/dev/null && echo "online! Proceeding with the installation..." || nmtui cd if [ ! -d "$HOME/monorepo/" ]; then - git clone --recurse-submodules https://git.nullring.xyz/monorepo.git + git clone https://git.nullring.xyz/monorepo.git cd monorepo git checkout "${commits.monorepoCommitHash}" fi -- cgit