refactor foureighty hardware config
This commit is contained in:
parent
536c0a842a
commit
f8e1b886be
3 changed files with 52 additions and 52 deletions
|
@ -2,38 +2,27 @@
|
|||
{
|
||||
networking.hostName = "foureighty";
|
||||
|
||||
boot = {
|
||||
# need unlocked kernel for throttled daemon
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
imports = [
|
||||
<home-manager/nixos>
|
||||
./hardware-configuration.nix
|
||||
../../boot.nix
|
||||
../../common.nix
|
||||
../../gfx-nvidia-optimus.nix
|
||||
../../zerotier.nix
|
||||
../../distributed-builds.nix
|
||||
../../libvirt.nix
|
||||
../../backups.nix
|
||||
../../gnome
|
||||
];
|
||||
|
||||
kernelModules = [ "acpi_call" ];
|
||||
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
||||
|
||||
initrd.luks.devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-uuid/a9e8a44f-15be-4844-a0a1-46892cc5e44e";
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
|
||||
loader.grub = {
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
};
|
||||
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
time.hardwareClockInLocalTime = true;
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
hardware.trackpoint.enable = true;
|
||||
services.throttled.enable = true;
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 25;
|
||||
};
|
||||
|
||||
hardware.trackpoint.enable = true;
|
||||
services.hardware.bolt.enable = true;
|
||||
services.fprintd = {
|
||||
enable = true;
|
||||
|
@ -61,20 +50,4 @@
|
|||
home.file.".config/i3/status.toml".source = ../../../.config/i3/status-double-bat.toml;
|
||||
};
|
||||
|
||||
imports = [
|
||||
<home-manager/nixos>
|
||||
./hardware-configuration.nix
|
||||
../../boot.nix
|
||||
../../common.nix
|
||||
../../gfx-nvidia-optimus.nix
|
||||
../../zerotier.nix
|
||||
../../distributed-builds.nix
|
||||
../../libvirt.nix
|
||||
../../backups.nix
|
||||
../../gnome
|
||||
];
|
||||
|
||||
|
||||
nix.maxJobs = 2;
|
||||
nix.buildCores = 6;
|
||||
}
|
||||
|
|
|
@ -3,13 +3,31 @@
|
|||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot = {
|
||||
kernel.sysctl = {
|
||||
"vm.swappiness" = 75;
|
||||
};
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"vm.swappiness" = 75;
|
||||
kernelModules = [ "kvm-intel" "acpi_call" ];
|
||||
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
||||
|
||||
initrd = {
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
luks.devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-uuid/a9e8a44f-15be-4844-a0a1-46892cc5e44e";
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
loader.grub = {
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
};
|
||||
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
fileSystems."/" = { device = "/dev/disk/by-uuid/7ae9348d-604e-4196-a27b-24a7495438c3"; fsType = "ext4"; };
|
||||
|
@ -18,5 +36,12 @@
|
|||
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 8;
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 25;
|
||||
};
|
||||
|
||||
nix.maxJobs = 2;
|
||||
nix.buildCores = 6;
|
||||
}
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
fonts.fontconfig.enable = true;
|
||||
home-manager.users.cyryl = {...}: {
|
||||
imports = [
|
||||
../../home-common.nix
|
||||
../../programs/git.nix
|
||||
../../gui.nix
|
||||
imports = [
|
||||
../../home-manager
|
||||
../../home-manager/gui.nix
|
||||
../../home-manager/programs/git.nix
|
||||
];
|
||||
];
|
||||
home.stateVersion = config.system.stateVersion;
|
||||
|
||||
|
|
Loading…
Reference in a new issue