64 lines
1.4 KiB
Nix
64 lines
1.4 KiB
Nix
{ modulesPath, config, pkgs, ... }:
|
|
|
|
{
|
|
imports =
|
|
[
|
|
# Default path for lxc/lxd configuration
|
|
"${modulesPath}/virtualisation/lxc-container.nix"
|
|
];
|
|
boot.isContainer = true;
|
|
|
|
systemd.suppressedSystemUnits = [
|
|
"dev-mqueue.mount"
|
|
"sys-kernel-debug.mount"
|
|
"sys-fs-fuse-connections.mount"
|
|
];
|
|
|
|
# Essential packages
|
|
environment.systemPackages = with pkgs; [
|
|
openssh
|
|
binutils
|
|
man
|
|
git
|
|
];
|
|
|
|
# Administrative sudo user
|
|
users.users.admin = {
|
|
isNormalUser = true;
|
|
extraGroups = [ "wheel" ]; # wheel group is sudo access
|
|
};
|
|
|
|
security.sudo.wheelNeedsPassword = true;
|
|
|
|
# Facilitates access via VS Code Remote Explorer
|
|
programs.nix-ld.enable = true;
|
|
|
|
# Enable password-based SSH login for admin user
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
AllowUsers = ["admin"]; # everyone
|
|
PasswordAuthentication = true; # this is just a sandbox
|
|
PermitRootLogin = "yes";
|
|
};
|
|
};
|
|
|
|
networking = {
|
|
dhcpcd.enable = false;
|
|
useDHCP = false;
|
|
useHostResolvConf = false;
|
|
};
|
|
|
|
systemd.network = {
|
|
enable = true;
|
|
networks."50-eth0" = {
|
|
matchConfig.Name = "eth0";
|
|
networkConfig = {
|
|
DHCP = "ipv4";
|
|
IPv6AcceptRA = true;
|
|
};
|
|
linkConfig.RequiredForOnline = "routable";
|
|
};
|
|
};
|
|
system.stateVersion = "24.11"; # Did you read the comment?
|
|
} |