mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-26 00:18:28 +02:00
add basic vm configuration
This commit is contained in:
parent
a9cfb32b12
commit
26e43a6da8
5 changed files with 111 additions and 6 deletions
48
hosts/vm/default.nix
Normal file
48
hosts/vm/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
tmp.useTmpfs = true;
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "dvorak";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
htop-vim
|
||||
];
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user.name = "Rouven Seifert";
|
||||
user.email = "rouven@rfive.de";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# firmware updates
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../../keys/ssh/rouven-thinkpad
|
||||
];
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
}
|
23
hosts/vm/hardware-configuration.nix
Normal file
23
hosts/vm/hardware-configuration.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
|
||||
# Replace with actual config
|
||||
device = "/dev/sda";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue