Refactor configuration

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2023-07-30 12:44:50 +03:00
parent b8466b80fd
commit ffc7d9fdf2
No known key found for this signature in database
GPG key ID: 9F6DDABE11A2674D
7 changed files with 18 additions and 15 deletions

View file

@ -2,8 +2,12 @@
## Deploying
Setup disks, mount root to `/mnt` and `/boot` to `/mnt/boot` and run something like it
```shell
nixos-install --flake https://github.com/ivabus/nixos#host
git clone https://github.com/ivabus/nixos /mnt/etc/nixos
nixos-generate-config --show-hardware-config --root /mnt > /mnt/etc/nixos/machines/host/hardware.nix
nixos-install --flake path:.#host
```
## Rebuilding

View file

@ -6,4 +6,11 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
boot.kernelParams = [ "apple_dcp.show_notch=1" ];
hardware.asahi.peripheralFirmwareDirectory = ../../asahi/firmware;
hardware.asahi.addEdgeKernelConfig = true;
hardware.asahi.useExperimentalGPUDriver = true;
system.stateVersion = "23.05";
}

View file

@ -9,7 +9,6 @@
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.kernelParams = [ "apple_dcp.show_notch=1" ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c313a438-700c-4d9c-9413-354ebfb010eb";
@ -26,10 +25,6 @@
swapDevices =
[ { device = "/dev/disk/by-uuid/272341f1-b083-497e-b129-aef8732b5b50"; }
];
hardware.asahi.peripheralFirmwareDirectory = ../../asahi/firmware;
hardware.asahi.addEdgeKernelConfig = true;
hardware.asahi.useExperimentalGPUDriver = true;
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";

View file

@ -10,6 +10,11 @@
services.xserver.videoDrivers=["amdgpu"];
boot.initrd.kernelModules=["amdgpu"];
powerManagement = {
enable = true;
cpuFreqGovernor = "performance";
};
system.stateVersion = "23.05";
}

View file

@ -11,7 +11,6 @@
boot.kernelModules = [ "kvm-amd" "nct6775" ];
boot.extraModulePackages = [ ];
environment.etc = {
"sysconfig/lm_sensors".text = ''
HWMON_MODULES="lm75"
@ -34,10 +33,4 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.tlp.settings = {
START_CHARGE_THRESH_BAT0 = 40;
STOP_CHARGE_THRESH_BAT0 = 80;
};
powerManagement.enable = true;
powerManagement.cpuFreqGovernor = "performance";
}

View file

@ -7,7 +7,6 @@
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "vetus";
time.timeZone = "Europe/Moscow";
system.stateVersion = "23.05";
}

View file

@ -28,4 +28,4 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
}