updated wsl configs

This commit is contained in:
Bryan Ramos 2024-11-09 11:04:03 -05:00
parent 5c3d410aa0
commit 4be8dceaa1
No known key found for this signature in database
GPG key ID: E5D35432910B37AC
10 changed files with 165 additions and 45 deletions

View file

@ -1,30 +1,36 @@
{ pkgs, lib, config, ... }:
{ system.stateVersion = "23.11";
{
system.stateVersion = "23.11";
boot.isContainer = true;
# Users
users.users = {
${config.user.name} = {
isNormalUser = true;
extraGroups = config.user.groups;
openssh.authorizedKeys.keys = [ "${config.user.keys.ssh.primary}" ];
openssh.authorizedKeys.keys = [
"${config.user.keys.ssh.primary}"
"${config.user.keys.ssh.windows}"
];
};
};
boot.isContainer = true;
# Nix
nix = {
channel.enable = false;
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
extraOptions = ''
experimental-features = nix-command flakes
'';
settings = {
auto-optimise-store = true;
trusted-users = [ "${config.user.name}" ];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
dates = "daily";
options = "--delete-older-than 7d";
};
};
@ -34,29 +40,11 @@
execWheelOnly = true;
};
# System Services
services = {
cron = {
enable = true;
systemCronJobs = [];
};
};
# Locale
time = {
timeZone = "America/New_York";
};
services.timesyncd = lib.mkDefault {
enable = true;
servers = [
"0.pool.ntp.org"
"1.pool.ntp.org"
"2.pool.ntp.org"
"3.pool.ntp.org"
];
};
i18n.defaultLocale = "en_US.UTF-8";
console = {
@ -66,6 +54,7 @@
# Networking
networking = {
hostName = "wsl";
useDHCP = lib.mkDefault true;
firewall = {
enable = true;
@ -73,12 +62,21 @@
};
};
services.openssh = {
enable = true;
startWhenNeeded = true;
settings = {
X11Forwarding = false;
PasswordAuthentication = false;
# System Services
services = {
openssh = {
enable = true;
startWhenNeeded = true;
settings = {
X11Forwarding = false;
PasswordAuthentication = false;
};
};
timesyncd = lib.mkDefault {
enable = true;
servers = [
"time.windows.com"
];
};
};
}