2024-12-21 14:31:57 -08:00
|
|
|
{ config, pkgs, user, lib, inputs, nixos-wsl, hostname, ... }:
|
2024-09-27 15:25:33 -07:00
|
|
|
let
|
|
|
|
defaultUser = user;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
nixos-wsl.nixosModules.wsl
|
|
|
|
];
|
|
|
|
|
|
|
|
wsl = {
|
|
|
|
inherit defaultUser;
|
|
|
|
|
|
|
|
enable = true;
|
|
|
|
wslConf.automount.root = "/mnt";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Set networking options
|
2024-12-21 14:31:57 -08:00
|
|
|
networking.hostName = "${hostname}";
|
2024-09-27 15:25:33 -07:00
|
|
|
networking.firewall.checkReversePath = "loose";
|
|
|
|
networking.firewall.enable = false;
|
|
|
|
|
|
|
|
boot.isContainer = true;
|
|
|
|
|
|
|
|
# configure root
|
|
|
|
users.users.root = {
|
|
|
|
extraGroups = [ "root" ];
|
|
|
|
};
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
|
|
|
# Disable systemd units that don't make sense on WSL
|
|
|
|
systemd.services."serial-getty@ttyS0".enable = false;
|
|
|
|
systemd.services."serial-getty@hvc0".enable = false;
|
|
|
|
systemd.services."getty@tty1".enable = false;
|
|
|
|
systemd.services."autovt@".enable = false;
|
|
|
|
|
|
|
|
systemd.services.firewall.enable = false;
|
|
|
|
systemd.services.systemd-resolved.enable = false;
|
|
|
|
systemd.services.systemd-udevd.enable = false;
|
|
|
|
|
|
|
|
# Don't allow emergency mode, because we don't have a console.
|
|
|
|
systemd.enableEmergencyMode = false;
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2024-09-27 16:53:05 -07:00
|
|
|
firefox
|
2024-10-02 09:10:57 -07:00
|
|
|
wget
|
2024-09-27 15:25:33 -07:00
|
|
|
];
|
|
|
|
|
2024-10-02 12:59:39 -07:00
|
|
|
# Add DoD CA certs to trusted source
|
2024-10-02 09:10:57 -07:00
|
|
|
security.pki.certificateFiles = [
|
2025-02-06 22:18:39 -08:00
|
|
|
./certs/DoDRootCA3.crt
|
|
|
|
./certs/DoDRootCA4.crt
|
|
|
|
./certs/DoDRootCA5.crt
|
|
|
|
./certs/DoDRootCA6.crt
|
|
|
|
./certs/DoDInteroperabilityRootCA2.crt
|
|
|
|
./certs/USDoDCCEBInteroperabilityRootCA2.crt
|
2024-10-02 09:10:57 -07:00
|
|
|
];
|
|
|
|
|
2024-09-27 15:25:33 -07:00
|
|
|
# Modules
|
|
|
|
modules = {
|
2024-09-29 08:48:38 -07:00
|
|
|
programs = {
|
2024-09-30 10:35:46 -07:00
|
|
|
chezmoi.apply = true;
|
2024-10-02 12:59:39 -07:00
|
|
|
git.keys = false;
|
2024-09-29 08:48:38 -07:00
|
|
|
};
|
2024-09-27 15:25:33 -07:00
|
|
|
};
|
|
|
|
}
|