Compare commits

..

No commits in common. "da7cd843b3f234d0fe820dfb6b20e7e7562f4b48" and "0f5460aa3a0b222909a17540f909d39334f5311a" have entirely different histories.

2 changed files with 22 additions and 28 deletions

View file

@ -90,6 +90,15 @@
inherit (import ./system/sshKeys.nix) mySSHKeys;
myOptions = { lib, ... }: {
options = {
isWSL = lib.mkOption {
default = false;
type = lib.types.bool;
};
};
};
in
{
# Notes
@ -109,6 +118,7 @@
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
@ -122,6 +132,8 @@
{
system.configurationRevision = self.shortRev or self.dirtyShortRev or "dirty";
isWSL = true;
users.users.whovian = {
# extraGroups = myWslGroups;
# See above "let" expression
@ -167,7 +179,6 @@
{
/*
isoImage = {
# Defaults
isoName = "nixos-24.11.20240607.051f920-x86_64-linux.iso";
@ -192,14 +203,6 @@
*/
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
@ -227,14 +230,6 @@
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.
/*
@ -251,15 +246,10 @@
users = {
defaultUserShell = pkgs.zsh;
users.root.openssh.authorizedKeys.keys = mySSHKeys;
users.nixos.openssh.authorizedKeys.keys = mySSHKeys;
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
users.root = {
shell = pkgs.zsh;
openssh.authorizedKeys.keys = mySSHKeys;
# Check if needed for "nixos" ISO user.
};
};
}

View file

@ -1,6 +1,6 @@
{
lib,
options,
config,
pkgs,
...
}:
@ -15,8 +15,12 @@
extraGroups = [
"wheel"
# Enable 'sudo' for the user.
] ++ lib.optionals (!options ? wsl) [
] ++ lib.optionals (!config.isWSL) [
# 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.
];