more zram
This commit is contained in:
parent
9d1c00df96
commit
df52e81d9c
4 changed files with 35 additions and 38 deletions
|
@ -1,11 +1,8 @@
|
||||||
{
|
{ config, pkgs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi"];
|
initrd.availableKernelModules =
|
||||||
|
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi" ];
|
||||||
initrd.kernelModules = [ "dm-snapshot" ];
|
initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
@ -47,6 +44,6 @@
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
algorithm = "zstd";
|
algorithm = "zstd";
|
||||||
memoryPercent = 50;
|
memoryPercent = 100;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,28 +13,12 @@
|
||||||
./restic-server.nix
|
./restic-server.nix
|
||||||
./tailscale-cert.nix
|
./tailscale-cert.nix
|
||||||
./woodpecker-agent.nix
|
./woodpecker-agent.nix
|
||||||
|
./virtualisation.nix
|
||||||
];
|
];
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
programs.ccache.enable = true;
|
programs.ccache.enable = true;
|
||||||
networking.hostName = "bolty";
|
networking.hostName = "bolty";
|
||||||
boot.kernelModules = [ "kvm_amd" ];
|
|
||||||
virtualisation = {
|
|
||||||
libvirtd = {
|
|
||||||
enable = true;
|
|
||||||
qemu.ovmf.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
qemu
|
|
||||||
virt-manager
|
|
||||||
usbutils
|
|
||||||
virt-viewer
|
|
||||||
lm_sensors
|
|
||||||
];
|
|
||||||
networking.firewall.allowedTCPPorts = [ 5900 ];
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
|
||||||
security.allowUserNamespaces = true;
|
|
||||||
|
|
||||||
time.timeZone = "Europe/London";
|
time.timeZone = "Europe/London";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
{
|
{ config, pkgs, inputs, lib, ... }:
|
||||||
config,
|
let port = 8123;
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
port = 8123;
|
|
||||||
in {
|
in {
|
||||||
imports = [];
|
imports = [ ./virtualisation.nix ];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ port ];
|
networking.firewall.allowedTCPPorts = [ port ];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
21
nixos/boxes/bolty/virtualisation.nix
Normal file
21
nixos/boxes/bolty/virtualisation.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, pkgs, inputs, lib, ... }: {
|
||||||
|
boot.kernelModules = [ "kvm_amd" ];
|
||||||
|
virtualisation = {
|
||||||
|
libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
qemu.ovmf.enable = true;
|
||||||
|
allowedBridges = [ "br0" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
qemu
|
||||||
|
virt-manager
|
||||||
|
usbutils
|
||||||
|
virt-viewer
|
||||||
|
lm_sensors
|
||||||
|
];
|
||||||
|
networking.firewall.allowedTCPPorts = [ 5900 ];
|
||||||
|
|
||||||
|
security.allowUserNamespaces = true;
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue