60 lines
1.5 KiB
Nix
60 lines
1.5 KiB
Nix
{
|
||
lib,
|
||
pkgs,
|
||
inputs,
|
||
...
|
||
}:
|
||
|
||
{
|
||
imports = [
|
||
./hardware-configuration.nix
|
||
./qemu-vm.nix
|
||
];
|
||
|
||
# Bootloader.
|
||
boot.loader.systemd-boot.enable = true;
|
||
networking.hostName = "s3ns-nixos-demo";
|
||
users.users.demo = {
|
||
isNormalUser = true;
|
||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||
initialPassword = "demo";
|
||
};
|
||
|
||
nix.channel.enable = true;
|
||
|
||
services.xserver = {
|
||
layout = "fr";
|
||
xkbVariant = "";
|
||
};
|
||
# Set your time zone.
|
||
time.timeZone = "Europe/Paris";
|
||
|
||
environment.systemPackages = with pkgs; [ neovim ];
|
||
services.openssh.enable = true;
|
||
|
||
users.users.root.openssh.authorizedKeys.keys = [
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDMBW7rTtfZL9wtrpCVgariKdpN60/VeAzXkh9w3MwbO julien@enigma"
|
||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1p76c2+I5EG/QoWbUywrRghB4k7+/Mik9I6GryKb5Rf4q8SMf7rR1ec9gSfdfVcLyez26oLfU88zo+YBAtN7gUWs4psG3xfGwKX42LT3i4oPZWMI8O93NTRN3Mrdlz+B0Py9OQODt0rfEohTNWghJUhvbOWsL8EeKg2fuV24GBZFsjz8YlDtKhQwynY3J6SHCnq2y6OcfQu6dnsGWQmF4Ahr1X9WTDGc2/NZbxzxW4uV00QQ+9noMTuI40Ge2/83e++caHxY8qxEFgNuQd38OPn0IyzpGsnbxKxvI9Ne/XSPtmuO3yzc6tfC75cbsUFkKFXkY2NQT5jXNj/Stz/xD"
|
||
];
|
||
|
||
virtualisation = {
|
||
cores = 8;
|
||
memorySize = 4096;
|
||
useBootLoader = true;
|
||
useEFIBoot = true;
|
||
forwardPorts = [
|
||
{
|
||
from = "host";
|
||
host.port = 5050;
|
||
guest.port = 22;
|
||
}
|
||
{
|
||
from = "host";
|
||
host.port = 8888;
|
||
guest.port = 8888;
|
||
}
|
||
];
|
||
};
|
||
|
||
system.stateVersion = "23.11";
|
||
}
|