2023-04-10 00:44:28 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.base;
|
|
|
|
in {
|
|
|
|
options.base = {
|
|
|
|
name = mkOption {
|
|
|
|
type = types.str;
|
2023-04-10 18:35:08 +02:00
|
|
|
example = "server-1";
|
|
|
|
description = "Name of the machine, use for hostname";
|
|
|
|
};
|
|
|
|
domainName = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
example = "example.com";
|
2023-04-18 21:25:10 +02:00
|
|
|
description = "Domain of the machine, use for hostname";
|
2023-04-10 00:44:28 +02:00
|
|
|
};
|
2023-04-18 21:25:10 +02:00
|
|
|
admin_email = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
example = "example@example.com";
|
|
|
|
description = "Email of the admin, use for ACME and stuff";
|
2023-04-19 23:24:14 +02:00
|
|
|
};
|
2023-04-10 00:44:28 +02:00
|
|
|
};
|
|
|
|
config = {
|
|
|
|
swapDevices = [
|
|
|
|
{
|
|
|
|
device = "/swapfile";
|
|
|
|
priority = 0;
|
|
|
|
size = 1024;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.kernelParams = [ "console=tty0" "console=ttyS0,115200"];
|
|
|
|
services.qemuGuest.enable = true;
|
|
|
|
|
|
|
|
networking.hostName = "${cfg.name}";
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
console = {
|
|
|
|
font = "Lat2-Terminus16";
|
|
|
|
keyMap = "fr";
|
|
|
|
};
|
|
|
|
|
|
|
|
users.users.histausse = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [
|
|
|
|
"wheel"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
vim
|
|
|
|
git
|
|
|
|
wget
|
|
|
|
];
|
|
|
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
};
|
|
|
|
}
|