System : Attempt to use single HW config.
This commit is contained in:
parent
5978d1e3d1
commit
9503cf06f9
|
@ -58,6 +58,8 @@ function bootstrap_nixos() {
|
||||||
parted -s "${target}" mktable gpt
|
parted -s "${target}" mktable gpt
|
||||||
parted -s "${target}" mkpart primary 0% 512MB
|
parted -s "${target}" mkpart primary 0% 512MB
|
||||||
parted -s "${target}" mkpart primary 512MB 100%
|
parted -s "${target}" mkpart primary 512MB 100%
|
||||||
|
parted -s "${target}" name NIXBOOT
|
||||||
|
parted -s "${target}" name NIXROOT
|
||||||
|
|
||||||
# Format.
|
# Format.
|
||||||
mkfs.fat -F 32 "${target}1"
|
mkfs.fat -F 32 "${target}1"
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
./module/common/Bootloader.nix
|
./module/common/Bootloader.nix
|
||||||
./module/common/Distrobox.nix
|
./module/common/Distrobox.nix
|
||||||
./module/common/Dotfiles.nix
|
./module/common/Dotfiles.nix
|
||||||
|
./module/common/Filesystem.nix
|
||||||
./module/common/Firewall.nix
|
./module/common/Firewall.nix
|
||||||
./module/common/Kernel.nix
|
./module/common/Kernel.nix
|
||||||
./module/common/Locale.nix
|
./module/common/Locale.nix
|
||||||
|
@ -37,7 +38,6 @@
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./host/${hostname}/Configuration.nix
|
./host/${hostname}/Configuration.nix
|
||||||
./host/${hostname}/HardwareConfiguration.nix
|
|
||||||
{ networking.hostName = hostname; }
|
{ networking.hostName = hostname; }
|
||||||
{ system.stateVersion = inputs.self.nixosModules.const.stateVersion; }
|
{ system.stateVersion = inputs.self.nixosModules.const.stateVersion; }
|
||||||
inputs.self.nixosModules.common
|
inputs.self.nixosModules.common
|
||||||
|
@ -66,6 +66,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./module/AmdGpu.nix
|
./module/AmdGpu.nix
|
||||||
|
./module/AmdCpu.nix
|
||||||
./module/Flatpak.nix
|
./module/Flatpak.nix
|
||||||
./module/Gnome.nix
|
./module/Gnome.nix
|
||||||
./module/PowersaveAmd.nix
|
./module/PowersaveAmd.nix
|
||||||
|
@ -88,6 +89,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./module/AmdGpu.nix
|
./module/AmdGpu.nix
|
||||||
|
./module/AmdCpu.nix
|
||||||
./module/Docker.nix
|
./module/Docker.nix
|
||||||
./module/Flatpak.nix
|
./module/Flatpak.nix
|
||||||
./module/Ftpd.nix
|
./module/Ftpd.nix
|
||||||
|
@ -102,6 +104,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./module/AmdGpu.nix
|
./module/AmdGpu.nix
|
||||||
|
./module/AmdCpu.nix
|
||||||
./module/Flatpak.nix
|
./module/Flatpak.nix
|
||||||
./module/Gnome.nix
|
./module/Gnome.nix
|
||||||
./module/PowersaveAmd.nix
|
./module/PowersaveAmd.nix
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -16,13 +16,11 @@
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (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
|
# 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`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.ens32.useDHCP = lib.mkDefault true;
|
# networking.interfaces.ens32.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|
4
.config/linux/system/module/AmdCpu.nix
Normal file
4
.config/linux/system/module/AmdCpu.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }: {
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
10
.config/linux/system/module/common/Filesystem.nix
Normal file
10
.config/linux/system/module/common/Filesystem.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }: {
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-partlabel/NIXROOT";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-partlabel/NIXBOOT";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
networking.useDHCP = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
swapDevices = [ ];
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue