mirror of
https://github.com/ivabus/nixos
synced 2024-11-25 01:45:06 +03:00
Refactor configuration
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
parent
b8466b80fd
commit
ffc7d9fdf2
7 changed files with 18 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
services.xserver.videoDrivers=["amdgpu"];
|
||||
boot.initrd.kernelModules=["amdgpu"];
|
||||
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
cpuFreqGovernor = "performance";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "vetus";
|
||||
time.timeZone = "Europe/Moscow";
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue