dcde00c428
We don't even boot so why are we doing complicated stuff
51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
# This is an example configuration for a "typical" small office/home
|
|
# router and wifi access point.
|
|
|
|
# You need to copy it to another filename and change the configuration
|
|
# wherever the text "EDIT" appears - please consult the tutorial
|
|
# documentation for details.
|
|
|
|
{ config, pkgs, lib, modulesPath, ... } :
|
|
let
|
|
liminix = (import ./npins).liminix;
|
|
inherit (pkgs.liminix.services) bundle oneshot longrun;
|
|
inherit (pkgs) serviceFns;
|
|
# EDIT: you can pick your preferred RFC1918 address space
|
|
# for NATted connections, if you don't like this one.
|
|
svc = config.system.service;
|
|
|
|
in rec {
|
|
boot = {
|
|
tftp = {
|
|
freeSpaceBytes = 3 * 1024 * 1024;
|
|
serverip = "10.0.0.1";
|
|
ipaddr = "10.0.0.8";
|
|
};
|
|
};
|
|
|
|
hardware.flash.eraseBlockSize = 126976;
|
|
|
|
imports = [
|
|
"${liminix}/modules/network"
|
|
"${liminix}/modules/ssh"
|
|
"${liminix}/modules/outputs/ubimage.nix"
|
|
];
|
|
rootfsType = "ubifs";
|
|
hostname = "hackens-router"; # EDIT
|
|
|
|
services.int = svc.network.address.build {
|
|
interface = config.hardware.networkInterfaces.wan;
|
|
family = "inet";
|
|
address = "10.0.0.8";
|
|
prefixLength = 24;
|
|
};
|
|
|
|
services.sshd = svc.ssh.build { };
|
|
|
|
users.root = {
|
|
# EDIT: choose a root password and then use
|
|
# "mkpasswd -m sha512crypt" to determine the hash.
|
|
# It should start wirh $6$.
|
|
passwd = "$6$9XlVymX951ai.c2C$SYtEF2Ykcud8VRuLRxfQRfuc9h7oJpVo.xDEv6fTWjBngMj3bPN9GbFMv3r.T.K2wIj1rTo9j1m58G.GTPKWo/";
|
|
};
|
|
}
|