Initial framework: reusable modules, lib, pkgs, overlays, scripts, sample environment
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Import the LXC machine type and DNS service from the framework
|
||||
../../../../modules/machine-types/lxc
|
||||
../../../../modules/services/dns/default.nix
|
||||
];
|
||||
|
||||
# Enable LXC machine type
|
||||
lxc.enable = true;
|
||||
|
||||
# Host identity — replace with your own hostname and IP
|
||||
networking.hostName = "dns01";
|
||||
networking.useDHCP = true;
|
||||
|
||||
# DNS service configuration — adapt to your network
|
||||
services.dns = {
|
||||
enable = true;
|
||||
recursion = "AllowOnlyForPrivateNetworks";
|
||||
forwarders = [ "1.1.1.1" "8.8.8.8" ];
|
||||
listenAddresses = [ "10.0.0.10" "127.0.0.1" "::1" ];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Sample user configuration — adapt to your needs
|
||||
users.users.alice = {
|
||||
isNormalUser = true;
|
||||
description = "Alice (sample user)";
|
||||
extraGroups = [ "wheel" ]; # Enable sudo access
|
||||
openssh.authorizedKeys.keys = [
|
||||
# Replace with your own SSH public key
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7... alice@example"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user