mirror of
https://github.com/ivabus/nixos
synced 2024-11-10 02:25:18 +03:00
Refactor configuration
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
parent
b8466b80fd
commit
ffc7d9fdf2
|
@ -2,8 +2,12 @@
|
||||||
|
|
||||||
## Deploying
|
## Deploying
|
||||||
|
|
||||||
|
Setup disks, mount root to `/mnt` and `/boot` to `/mnt/boot` and run something like it
|
||||||
|
|
||||||
```shell
|
```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
|
## Rebuilding
|
||||||
|
|
|
@ -6,4 +6,11 @@
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
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.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
boot.kernelParams = [ "apple_dcp.show_notch=1" ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/c313a438-700c-4d9c-9413-354ebfb010eb";
|
{ device = "/dev/disk/by-uuid/c313a438-700c-4d9c-9413-354ebfb010eb";
|
||||||
|
@ -26,10 +25,6 @@
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/272341f1-b083-497e-b129-aef8732b5b50"; }
|
[ { 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;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||||
|
|
|
@ -10,6 +10,11 @@
|
||||||
services.xserver.videoDrivers=["amdgpu"];
|
services.xserver.videoDrivers=["amdgpu"];
|
||||||
boot.initrd.kernelModules=["amdgpu"];
|
boot.initrd.kernelModules=["amdgpu"];
|
||||||
|
|
||||||
|
powerManagement = {
|
||||||
|
enable = true;
|
||||||
|
cpuFreqGovernor = "performance";
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
boot.kernelModules = [ "kvm-amd" "nct6775" ];
|
boot.kernelModules = [ "kvm-amd" "nct6775" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"sysconfig/lm_sensors".text = ''
|
"sysconfig/lm_sensors".text = ''
|
||||||
HWMON_MODULES="lm75"
|
HWMON_MODULES="lm75"
|
||||||
|
@ -34,10 +33,4 @@
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
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;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "vetus";
|
networking.hostName = "vetus";
|
||||||
time.timeZone = "Europe/Moscow";
|
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,4 @@
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue