Virtualize elara
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,19 +1,17 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.initrd.kernelModules = [
|
||||
"xhci_pci"
|
||||
"uas"
|
||||
"sd_mod"
|
||||
];
|
||||
imports = [ ./display.nix ];
|
||||
|
||||
services.tlp.settings.DISK_DEVICES = "sda";
|
||||
hardware = {
|
||||
enableAllFirmware = true;
|
||||
|
||||
# By default, this host runs on an external SSD attached to himalia...
|
||||
imports = [ ../../himalia/hardware ];
|
||||
|
||||
# ...but it can also run attached to a SAS-provided laptop.
|
||||
specialisation.sas.configuration = {
|
||||
disabledModules = [ ../../himalia/hardware ];
|
||||
imports = [ ./sas ];
|
||||
cpu = {
|
||||
cores = 12;
|
||||
threads = 12;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.hypervGuest.enable = true;
|
||||
|
||||
services.fstrim.enable = true;
|
||||
}
|
||||
|
27
hosts/elara/hardware/display.nix
Normal file
27
hosts/elara/hardware/display.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.kernelParams = [ "video=hyperv_fb:1920x1200@60" ];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [ "Virtual-1, preferred, 0x0, 1" ];
|
||||
|
||||
workspace = [
|
||||
"1, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"2, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"3, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"4, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"5, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"6, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"7, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"8, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"9, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
"10, monitor:Virtual-1, layoutopt:orientation:left"
|
||||
];
|
||||
};
|
||||
|
||||
programs.vscode.profiles.default.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
|
||||
}
|
||||
];
|
||||
}
|
@@ -1,28 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./display.nix
|
||||
./keybinds.nix
|
||||
];
|
||||
|
||||
hardware = {
|
||||
enableAllFirmware = true;
|
||||
|
||||
cpu = {
|
||||
cores = 8;
|
||||
threads = 12;
|
||||
intel.updateMicrocode = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot = {
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
initrd.kernelModules = [
|
||||
"thunderbolt"
|
||||
"vmd"
|
||||
"nvme"
|
||||
];
|
||||
};
|
||||
|
||||
services.fstrim.enable = true;
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
boot.kernelParams = [ "video=eDP-1:1920x1200@60" ];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"eDP-1, preferred, 0x0, 1"
|
||||
", maxwidth, auto-center-up, 1"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"1, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"2, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"3, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"4, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"5, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"6, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"7, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"8, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"9, monitor:eDP-1, layoutopt:orientation:left"
|
||||
"10, monitor:eDP-1, layoutopt:orientation:left"
|
||||
];
|
||||
};
|
||||
|
||||
programs.vscode.profiles.default.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
|
||||
}
|
||||
];
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.bindle =
|
||||
let
|
||||
brightnessctl = lib.meta.getExe pkgs.brightnessctl;
|
||||
in
|
||||
[
|
||||
", XF86MonBrightnessUp, exec, ${brightnessctl} -q s 5%+"
|
||||
", XF86MonBrightnessDown, exec, ${brightnessctl} -q s 5%-"
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user