49 lines
852 B
Nix
49 lines
852 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
with lib;
|
||
|
let
|
||
|
cfg = config.base;
|
||
|
in {
|
||
|
options.base = {
|
||
|
name = mkOption {
|
||
|
type = types.str;
|
||
|
description = "Name of the machine, use for hostname";
|
||
|
};
|
||
|
};
|
||
|
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;
|
||
|
};
|
||
|
}
|