chore: untrack machine-specific hardware-configuration.nix

This commit is contained in:
2026-08-06 00:00:15 +07:00
parent ca023da655
commit c297755e2c
3 changed files with 3 additions and 28 deletions
+1
View File
@@ -0,0 +1 @@
hosts/*/hardware-configuration.nix
+2 -2
View File
@@ -45,9 +45,9 @@ git clone <repo-url> ~/nixos-config
cd ~/nixos-config cd ~/nixos-config
``` ```
### 4. Replace the hardware config ### 4. Provide the hardware config
The `hardware-configuration.nix` inside `hosts/nixos/` is machine-specific. Replace it with your own: `hardware-configuration.nix` is machine-specific and not tracked in git. Copy the one generated by the NixOS installer:
```bash ```bash
cp /etc/nixos/hardware-configuration.nix ~/nixos-config/hosts/nixos/hardware-configuration.nix cp /etc/nixos/hardware-configuration.nix ~/nixos-config/hosts/nixos/hardware-configuration.nix
-26
View File
@@ -1,26 +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 + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/51da3f97-16fa-4ed5-a12f-a4466b66359f";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/7a05616d-d8d8-4fa5-9810-49118204c9f2"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}