From f4e714710519ed83f3cbdc3dbbfe19a55dbec631 Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 8 May 2020 21:53:52 +0200 Subject: [PATCH] Replace grub with systemd-boot --- configuration.nix | 25 ++++++++++++++----------- modules/gui.nix | 2 +- modules/networking.nix | 4 ++-- modules/software.nix | 11 ++++++++--- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/configuration.nix b/configuration.nix index 5b76ac2..9a9342d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,25 +9,24 @@ kernelModules = [ "i915" "acpi_call" ]; extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; supportedFilesystems = [ "zfs" ]; + zfs.requestEncryptionCredentials = true; }; # Intel CPU tweaks - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - hardware.opengl.extraPackages = with pkgs; [ - vaapiIntel - vaapiVdpau - libvdpau-va-gl - ]; + hardware.opengl.extraPackages = with pkgs; [ + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; # Bootloader configuration boot.loader = { - timeout = 2; - grub = { - efiSupport = true; + efi.canTouchEfiVariables = true; + systemd-boot = { + enable = true; configurationLimit = 50; - copyKernels = true; }; }; @@ -69,12 +68,16 @@ swapDevices = [ { device = "/swap"; size = 8192; } ]; boot.resumeDevice = "/swap"; + # NixOS version + system.stateVersion = "20.09"; + # Import other configuration modules imports = [ ./modules/software.nix ./modules/networking.nix ./modules/gui.nix ./modules/datasync.nix + ./modules/audio.nix ]; } diff --git a/modules/gui.nix b/modules/gui.nix index a4498ed..bd6c684 100644 --- a/modules/gui.nix +++ b/modules/gui.nix @@ -2,7 +2,7 @@ { # Display manager - service.xserver.displayManager = { + services.xserver.displayManager = { defaultSession = "sway"; sddm = { enable = true; diff --git a/modules/networking.nix b/modules/networking.nix index 9ea2178..4485543 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -9,10 +9,10 @@ # Set hostname and hostid networking = { hostName = "panacea"; - hostId = "a434d9ed230d"; + hostId = "8feb0bb8"; wireless = { enable = true; - } + }; }; # Enable zeroconf diff --git a/modules/software.nix b/modules/software.nix index e165dd7..6356393 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -5,11 +5,16 @@ # Monitoring htop # Password management - pass-wayland passff-host gitAndTools.pass-git-helper + pass-wayland + passff-host + gitAndTools.pass-git-helper # Browsers - firefox chromium + firefox + chromium # LaTeX - texlive.combind.scheme-full pandoc pandoc-citeproc + texlive.combind.scheme-full + pandoc + pandoc-citeproc ]; # Fonts declaration