Compare commits
2 commits
0f5460aa3a
...
da7cd843b3
Author | SHA1 | Date | |
---|---|---|---|
da7cd843b3 | |||
c440848d79 |
2 changed files with 28 additions and 22 deletions
42
flake.nix
42
flake.nix
|
@ -90,15 +90,6 @@
|
||||||
|
|
||||||
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
|
||||||
|
@ -118,7 +109,6 @@
|
||||||
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
|
||||||
|
@ -132,8 +122,6 @@
|
||||||
{
|
{
|
||||||
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
|
||||||
|
@ -179,6 +167,7 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
isoImage = {
|
isoImage = {
|
||||||
# Defaults
|
# Defaults
|
||||||
isoName = "nixos-24.11.20240607.051f920-x86_64-linux.iso";
|
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 = [
|
environment.systemPackages = [
|
||||||
pkgs._7zz
|
pkgs._7zz
|
||||||
pkgs.bat
|
pkgs.bat
|
||||||
|
@ -230,6 +227,14 @@
|
||||||
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.
|
||||||
/*
|
/*
|
||||||
|
@ -246,10 +251,15 @@
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
defaultUserShell = pkgs.zsh;
|
defaultUserShell = pkgs.zsh;
|
||||||
users.root = {
|
users.root.openssh.authorizedKeys.keys = mySSHKeys;
|
||||||
shell = pkgs.zsh;
|
users.nixos.openssh.authorizedKeys.keys = mySSHKeys;
|
||||||
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,
|
||||||
config,
|
options,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -15,12 +15,8 @@
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
# Enable 'sudo' for the user.
|
# Enable 'sudo' for the user.
|
||||||
] ++ lib.optionals (!config.isWSL) [
|
] ++ lib.optionals (!options ? wsl) [
|
||||||
# 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