Skip to content

Instantly share code, notes, and snippets.

@emptyflask
Last active April 21, 2020 17:49
Show Gist options
  • Save emptyflask/7aa04f800321c2483574f8985e26bea0 to your computer and use it in GitHub Desktop.
Save emptyflask/7aa04f800321c2483574f8985e26bea0 to your computer and use it in GitHub Desktop.
broken grub on nixos 20.03
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
# make a copy of this configuration, just in case
environment.etc.current-nixos-config.source = ./.;
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./security
./services
./users
];
nixpkgs.config.allowUnfree = true;
# Use the GRUB 2 boot loader.
boot = {
loader = {
efi = {
# canTouchEfiVariables = true;
# efiSysMountPoint = "/boot/efi";
};
grub = {
enable = true;
version = 2;
efiSupport = true;
# efiInstallAsRemovable = true;
# device = "/dev/nvme0n1";
device = "nodev";
useOSProber = true;
};
systemd-boot.enable = true;
};
# Kernel modules:
# hide hdmi audio device
# disable usb suspend so devices work after waking
extraModprobeConfig = ''
options snd_hda_intel enable=1,0
options usbcore autosuspend=-1
'';
};
system.stateVersion = "18.09";
}
# 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, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2292158c-5890-4ad7-8c04-9827b6c283e1";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/581B-D468";
fsType = "vfat";
};
fileSystems."/media/repository" =
{ device = "/dev/disk/by-uuid/8CFA8C6CFA8C547C";
fsType = "ntfs";
options = ["defaults" "user"];
};
fileSystems."/media/other" =
{ device = "/dev/disk/by-uuid/4F77A0F450ED4DAA";
fsType = "ntfs";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d0f7deea-4dd0-46f0-8759-70a1c1613ffb"; }
];
nix.maxJobs = lib.mkDefault 12;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment