Compare commits
No commits in common. "da7cd843b3f234d0fe820dfb6b20e7e7562f4b48" and "0f5460aa3a0b222909a17540f909d39334f5311a" have entirely different histories.
da7cd843b3
...
0f5460aa3a
2 changed files with 22 additions and 28 deletions
42
flake.nix
42
flake.nix
|
@ -90,6 +90,15 @@
|
||||||
|
|
||||||
inherit (import ./system/sshKeys.nix) mySSHKeys;
|
inherit (import ./system/sshKeys.nix) mySSHKeys;
|
||||||
|
|
||||||
|
myOptions = { lib, ... }: {
|
||||||
|
options = {
|
||||||
|
isWSL = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Notes
|
# Notes
|
||||||
|
@ -109,6 +118,7 @@
|
||||||
nixos-wsl = nixpkgs.lib.nixosSystem {
|
nixos-wsl = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
|
myOptions
|
||||||
./system/nixos-wsl/configuration.nix
|
./system/nixos-wsl/configuration.nix
|
||||||
./system/dotnet_os_codename-workaround.nix
|
./system/dotnet_os_codename-workaround.nix
|
||||||
# Source of this fix file is
|
# Source of this fix file is
|
||||||
|
@ -122,6 +132,8 @@
|
||||||
{
|
{
|
||||||
system.configurationRevision = self.shortRev or self.dirtyShortRev or "dirty";
|
system.configurationRevision = self.shortRev or self.dirtyShortRev or "dirty";
|
||||||
|
|
||||||
|
isWSL = true;
|
||||||
|
|
||||||
users.users.whovian = {
|
users.users.whovian = {
|
||||||
# extraGroups = myWslGroups;
|
# extraGroups = myWslGroups;
|
||||||
# See above "let" expression
|
# See above "let" expression
|
||||||
|
@ -167,7 +179,6 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
isoImage = {
|
isoImage = {
|
||||||
# Defaults
|
# Defaults
|
||||||
isoName = "nixos-24.11.20240607.051f920-x86_64-linux.iso";
|
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 = [
|
environment.systemPackages = [
|
||||||
pkgs._7zz
|
pkgs._7zz
|
||||||
pkgs.bat
|
pkgs.bat
|
||||||
|
@ -227,14 +230,6 @@
|
||||||
screen.enable = true;
|
screen.enable = true;
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true;
|
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
|
# Honestly unsure if I should be using `programs.zsh.envExtra` or
|
||||||
# `programs.zsh.localVariables` here.
|
# `programs.zsh.localVariables` here.
|
||||||
/*
|
/*
|
||||||
|
@ -251,15 +246,10 @@
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
defaultUserShell = pkgs.zsh;
|
defaultUserShell = pkgs.zsh;
|
||||||
users.root.openssh.authorizedKeys.keys = mySSHKeys;
|
users.root = {
|
||||||
users.nixos.openssh.authorizedKeys.keys = mySSHKeys;
|
shell = pkgs.zsh;
|
||||||
};
|
openssh.authorizedKeys.keys = mySSHKeys;
|
||||||
|
# Check if needed for "nixos" ISO user.
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
KbdInteractiveAuthentication = false;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
options,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -15,8 +15,12 @@
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
# Enable 'sudo' for the user.
|
# Enable 'sudo' for the user.
|
||||||
] ++ lib.optionals (!options ? wsl) [
|
] ++ lib.optionals (!config.isWSL) [
|
||||||
# These are the groups for baremetal machines, or possibly VMs.
|
# These are the groups for baremetal machines, or possibly VMs.
|
||||||
|
"networkmanager"
|
||||||
|
# Enable use of NetworkManager
|
||||||
|
"usb"
|
||||||
|
# This should enable access to usb devices.
|
||||||
"docker"
|
"docker"
|
||||||
# Enable 'docker' for the user.
|
# Enable 'docker' for the user.
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue