Try to have a working filesystem
This commit is contained in:
parent
bb2c6e7de3
commit
8a9335f5ae
2 changed files with 41 additions and 25 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
{ imports =
|
{ imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
# ./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
|
@ -1,33 +1,49 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
{ lib, system, ... }:
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
boot = {
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
# use latest kernel
|
||||||
];
|
# kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
supportedFilesystems = [ "ext4" "btrfs" "xfs" "fat" "vfat" "cifs" "nfs" ];
|
||||||
|
growPartition = true;
|
||||||
|
kernelModules = [ "kvm-intel" ];
|
||||||
|
kernelParams = lib.mkForce [ ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
loader = {
|
||||||
boot.initrd.kernelModules = [ ];
|
grub = {
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
enable = true;
|
||||||
boot.extraModulePackages = [ ];
|
device = "nodev";
|
||||||
|
efiSupport = true;
|
||||||
|
efiInstallAsRemovable = true;
|
||||||
|
};
|
||||||
|
timeout = lib.mkForce 3;
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
initrd = {
|
||||||
{ device = "/dev/disk/by-uuid/cd191c1d-d2d7-44ae-8a9a-75ad7d8228a4";
|
availableKernelModules = [ "9p" "9pnet_virtio" "ata_piix" "uhci_hcd" "virtio_blk" "virtio_mmio" "virtio_net" "virtio_pci" "virtio_scsi" ];
|
||||||
|
kernelModules = [ "virtio_balloon" "virtio_console" "virtio_rng" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
tmp.cleanOnBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
autoResize = true;
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
"/boot" = {
|
||||||
[ { device = "/dev/disk/by-uuid/335e1191-f20f-4afc-bc2b-b156cf8dc2c2"; }
|
device = "/dev/disk/by-label/ESP";
|
||||||
];
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
services.fstrim = {
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
enable = true;
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
interval = "weekly";
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
};
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault system;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue