System : Attempt to use single HW config.

This commit is contained in:
Dmitry Voronin 2024-02-21 01:58:01 +03:00
parent 5978d1e3d1
commit 9503cf06f9
8 changed files with 22 additions and 41 deletions

View file

@ -58,6 +58,8 @@ function bootstrap_nixos() {
parted -s "${target}" mktable gpt
parted -s "${target}" mkpart primary 0% 512MB
parted -s "${target}" mkpart primary 512MB 100%
parted -s "${target}" name NIXBOOT
parted -s "${target}" name NIXROOT
# Format.
mkfs.fat -F 32 "${target}1"

View file

@ -19,6 +19,7 @@
./module/common/Bootloader.nix
./module/common/Distrobox.nix
./module/common/Dotfiles.nix
./module/common/Filesystem.nix
./module/common/Firewall.nix
./module/common/Kernel.nix
./module/common/Locale.nix
@ -37,7 +38,6 @@
modules = [
./host/${hostname}/Configuration.nix
./host/${hostname}/HardwareConfiguration.nix
{ networking.hostName = hostname; }
{ system.stateVersion = inputs.self.nixosModules.const.stateVersion; }
inputs.self.nixosModules.common
@ -66,6 +66,7 @@
system = "x86_64-linux";
modules = [
./module/AmdGpu.nix
./module/AmdCpu.nix
./module/Flatpak.nix
./module/Gnome.nix
./module/PowersaveAmd.nix
@ -88,6 +89,7 @@
system = "x86_64-linux";
modules = [
./module/AmdGpu.nix
./module/AmdCpu.nix
./module/Docker.nix
./module/Flatpak.nix
./module/Ftpd.nix
@ -102,6 +104,7 @@
system = "x86_64-linux";
modules = [
./module/AmdGpu.nix
./module/AmdCpu.nix
./module/Flatpak.nix
./module/Gnome.nix
./module/PowersaveAmd.nix

View file

@ -1,38 +0,0 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/fea39df0-7f07-4c33-88e8-0777ef0d3764";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CEBE-053D";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp42s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -16,13 +16,11 @@
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens32.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -0,0 +1,4 @@
{ ... }: {
boot.kernelModules = [ "kvm-amd" ];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,10 @@
{ ... }: {
fileSystems."/" = {
device = "/dev/disk/by-partlabel/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/NIXBOOT";
fsType = "vfat";
};
}

View file

@ -1,3 +1,4 @@
{ ... }: {
networking.networkmanager.enable = true;
networking.useDHCP = true;
}

View file

@ -1,3 +1,4 @@
{ ... }: {
zramSwap.enable = true;
swapDevices = [ ];
}