Compare commits

..

2 commits

Author SHA1 Message Date
da7cd843b3 Remove isWSL and its related option module! 2024-06-12 03:10:07 -04:00
c440848d79 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.
2024-06-12 03:07:36 -04:00
2 changed files with 28 additions and 22 deletions

View file

@ -90,15 +90,6 @@
inherit (import ./system/sshKeys.nix) mySSHKeys;
myOptions = { lib, ... }: {
options = {
isWSL = lib.mkOption {
default = false;
type = lib.types.bool;
};
};
};
in
{
# Notes
@ -118,7 +109,6 @@
nixos-wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
myOptions
./system/nixos-wsl/configuration.nix
./system/dotnet_os_codename-workaround.nix
# Source of this fix file is
@ -132,8 +122,6 @@
{
system.configurationRevision = self.shortRev or self.dirtyShortRev or "dirty";
isWSL = true;
users.users.whovian = {
# extraGroups = myWslGroups;
# See above "let" expression
@ -179,6 +167,7 @@
{
/*
isoImage = {
# Defaults
isoName = "nixos-24.11.20240607.051f920-x86_64-linux.iso";
@ -203,6 +192,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 +227,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 +251,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;
};
};
}

View file

@ -1,6 +1,6 @@
{
lib,
config,
options,
pkgs,
...
}:
@ -15,12 +15,8 @@
extraGroups = [
"wheel"
# Enable 'sudo' for the user.
] ++ lib.optionals (!config.isWSL) [
] ++ lib.optionals (!options ? wsl) [
# These are the groups for baremetal machines, or possibly VMs.
"networkmanager"
# Enable use of NetworkManager
"usb"
# This should enable access to usb devices.
"docker"
# Enable 'docker' for the user.
];