From c440848d7916a00de08927b4bf294fb0992a0d2c Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Wed, 12 Jun 2024 03:07:36 -0400 Subject: [PATCH] Mess with `isoimage-pc` some more. Including adding my SSH Keys to the `nixos` user, turning off password authentication, and basically nulling out `zsh-newuser-install` so it doesn't bug me every start the first shell on a fresh boot. --- flake.nix | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 1dc704e..68924a9 100644 --- a/flake.nix +++ b/flake.nix @@ -179,6 +179,7 @@ { /* + isoImage = { # Defaults isoName = "nixos-24.11.20240607.051f920-x86_64-linux.iso"; @@ -203,6 +204,14 @@ */ + isoImage = { + isoBaseName = "Whovian-nixos"; + # Defaults to config.system.nixos.distroId + # config.system.nixos.distroId simply output... "nixos" lol + # I'm adding "Whovian-" in front because I like marking that + # it's a custom image. + }; + environment.systemPackages = [ pkgs._7zz pkgs.bat @@ -230,6 +239,14 @@ screen.enable = true; zsh = { enable = true; + shellInit = '' zsh-newuser-install () {} ''; + /* + Disable "zsh/newuser" since this is a Live-DVD! + I just want a working shell to use, please. + See https://www.zsh.org/mla/users/2007/msg00396.html for + some conversation about this unchanged feature! ... + 17 years later! + */ # Honestly unsure if I should be using `programs.zsh.envExtra` or # `programs.zsh.localVariables` here. /* @@ -246,10 +263,15 @@ users = { defaultUserShell = pkgs.zsh; - users.root = { - shell = pkgs.zsh; - openssh.authorizedKeys.keys = mySSHKeys; - # Check if needed for "nixos" ISO user. + users.root.openssh.authorizedKeys.keys = mySSHKeys; + users.nixos.openssh.authorizedKeys.keys = mySSHKeys; + }; + + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; }; }; }