nixos_config/system/nixos-wsl/configuration.nix
Whovian9369 d9046b8321 Various changes to config, see notes under the fold.
- Adds `mySSHKeys` via `inherit` from `system/sshKeys.nix` for easier setting of allowed SSH keys
  - Especially useful for self-built `x86_64-linux` NixOS ISO.
- Swap where user groups are set to `system/users.nix`
- Add `myOptions.isWSL` to identify if an environment is used in WSL or not.
  - Used for setting user groups between WSL and bare-metal.
  - Requires adding `myOptions` as module to WSL systems?
    - Need to investiage if this properly works on bare-metal machines
      - So likely needs tested in VM?
- Added `myOptions.isWSL` option to `nixos-wsl` for group setting reasons, see above.
- Fleshed out `nixosConfigurations.isoimage-pc` to make keep some tools handy for live environment.
  - Plus, gave ssh key access to `root` user on ISO.
  - Need to double check if `nixos` user needs keys too.
    - Is that user still even generated with current config? Need to test.
- Added `unnix_script` to `home-manager` environment's `home.packages`, so I can remove Nix Store paths from text input easily for ease of comparing against other builds.
2024-06-09 05:05:25 -04:00

46 lines
1.2 KiB
Nix

{ lib,
pkgs,
config,
modulesPath,
nixos-wsl,
...
}:
{
imports = [
./packages.nix
# ./users.nix
./wsl.nix
];
networking.hostName = "nixos-wsl";
# Enable nix flakes
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
time.timeZone = "America/New_York";
/*
Add environment.pathsToLink for auto-completion for system packages (e.g. systemd).
Appears to be required due to [GitHub - nix-community/home-manager]:
https://github.com/nix-community/home-manager/blob/c781b28add41b74423ab2e64496d4fc91192e13a/modules/programs/zsh.nix#L348-L358
[/modules/programs/zsh.nix]
https://github.com/nix-community/home-manager/issues/3521#issuecomment-1367197995
[Issue #3521]
06 June 2024:
Appears to be handled by "programs.zsh.enableCompletion" being enabled.
https://github.com/NixOS/nixpkgs/blob/49f6869f71fb2724674ccc18670bbde70843d43f/nixos/modules/programs/zsh/zsh.nix#L305
I appear to have "programs.zsh.enableCompletion" disabled for some reason?
Need to look into this again at some point, I suppose.
*/
environment.pathsToLink = [
"/share/zsh"
];
system.stateVersion = "22.05";
}