55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{ inputs }:
|
|
|
|
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
svc = config.system.service;
|
|
|
|
in
|
|
rec {
|
|
imports = [
|
|
"${inputs.liminix}/modules/network"
|
|
"${inputs.liminix}/modules/dnsmasq"
|
|
"${inputs.liminix}/modules/ssh"
|
|
];
|
|
|
|
hostname = "hello";
|
|
|
|
# configure the internal network (LAN) with an address
|
|
services.int = svc.network.address.build {
|
|
interface = config.hardware.networkInterfaces.lan2;
|
|
family = "inet";
|
|
address = "192.168.8.1";
|
|
prefixLength = 24;
|
|
};
|
|
|
|
services.sshd = svc.ssh.build { };
|
|
|
|
users.root = {
|
|
# the password is "secret". Use mkpasswd -m sha512crypt to
|
|
# create this hashed password string
|
|
passwd = "$6$y7WZ5hM6l5nriLmo$5AJlmzQZ6WA.7uBC7S8L4o19ESR28Dg25v64/vDvvCN01Ms9QoHeGByj8lGlJ4/b.dbwR9Hq2KXurSnLigt1W1";
|
|
};
|
|
|
|
services.dns =
|
|
let
|
|
interface = services.int;
|
|
in
|
|
svc.dnsmasq.build {
|
|
inherit interface;
|
|
ranges = [
|
|
"192.168.8.1,192.168.8.240"
|
|
"::,constructor:$(output ${interface} ifname),ra-stateless"
|
|
];
|
|
|
|
domain = "example.org";
|
|
};
|
|
|
|
# defaultProfile.packages = with pkgs; [
|
|
# figlet
|
|
# ];
|
|
}
|