refactor a bit

This commit is contained in:
Adithya 2024-06-29 23:30:15 +05:30
parent 88f5b1d57c
commit 2f766c0385
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
9 changed files with 43 additions and 61 deletions

View file

@ -8,7 +8,8 @@
./security.nix
];
nixpkgs.overlays = [
# https://github.com/NixOS/nixpkgs/issues/126755#issuecomment-869149243
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // { allowMissing = true; });

View file

@ -1,13 +1,24 @@
_: {
imports = [ ./filesystem.nix ./kernel.nix ];
{ lib, pkgs, ... }: {
imports = [ ./filesystem.nix ];
hardware.enableRedistributableFirmware = true;
boot = {
consoleLogLevel = 3;
initrd = {
availableKernelModules = [ "xhci_pci" ];
systemd.enable = true;
};
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4;
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
supportedFilesystems = [ "vfat" "btrfs" "ext4" ];
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View file

@ -1,18 +0,0 @@
{ lib
, pkgs
, ...
}: {
boot = {
consoleLogLevel = 3;
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4;
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
initrd = {
availableKernelModules = [ "xhci_pci" ];
systemd.enable = true;
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View file

@ -8,6 +8,7 @@
./security.nix
];
# https://github.com/NixOS/nixpkgs/issues/126755#issuecomment-869149243
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:

View file

@ -1,13 +1,24 @@
_: {
imports = [ ./filesystem.nix ./kernel.nix ];
{ lib, pkgs, ... }: {
imports = [ ./filesystem.nix ];
hardware.enableRedistributableFirmware = true;
boot = {
consoleLogLevel = 3;
initrd = {
availableKernelModules = [ "xhci_pci" ];
systemd.enable = true;
};
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4;
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
supportedFilesystems = [ "vfat" "btrfs" "ext4" ];
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View file

@ -1,18 +0,0 @@
{ lib
, pkgs
, ...
}: {
boot = {
consoleLogLevel = 3;
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4;
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
initrd = {
availableKernelModules = [ "xhci_pci" ];
systemd.enable = true;
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View file

@ -8,6 +8,7 @@
./security.nix
];
# https://github.com/NixOS/nixpkgs/issues/126755#issuecomment-869149243
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:

View file

@ -1,13 +1,24 @@
_: {
imports = [ ./filesystem.nix ./kernel.nix ];
{ lib, pkgs, ... }: {
imports = [ ./filesystem.nix ];
hardware.enableRedistributableFirmware = true;
boot = {
consoleLogLevel = 3;
initrd = {
availableKernelModules = [ "xhci_pci" ];
systemd.enable = true;
};
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4;
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
supportedFilesystems = [ "vfat" "btrfs" "ext4" ];
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View file

@ -1,18 +0,0 @@
{ lib
, pkgs
, ...
}: {
boot = {
consoleLogLevel = 3;
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4;
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
initrd = {
availableKernelModules = [ "xhci_pci" ];
systemd.enable = true;
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}