From 098edb7f4491718f7334d3c487acc9119e4d4971 Mon Sep 17 00:00:00 2001 From: marc Date: Sun, 4 Dec 2022 19:31:40 +0100 Subject: [PATCH] Use grub in reykjavik + add grub theme --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 4 ++++ hosts/reykjavik/default.nix | 14 +++++++++++++- hosts/reykjavik/hardware.nix | 2 +- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index a0402a3..5e1b87f 100644 --- a/flake.lock +++ b/flake.lock @@ -50,6 +50,26 @@ "type": "github" } }, + "grub2-themes": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1668213765, + "narHash": "sha256-mTx1jAy6AOY4moWRGvCHYnUNX4qBL/ba47ZcIkhczJM=", + "owner": "vinceliuice", + "repo": "grub2-themes", + "rev": "c106dfb9b5b18ad092ff0f952f2b734933e8283e", + "type": "github" + }, + "original": { + "owner": "vinceliuice", + "repo": "grub2-themes", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -153,6 +173,7 @@ "root": { "inputs": { "emacs-overlay": "emacs-overlay", + "grub2-themes": "grub2-themes", "home-manager": "home-manager", "nix-colors": "nix-colors", "nixpkgs": "nixpkgs_2", diff --git a/flake.nix b/flake.nix index 86a0bd8..3047a00 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,9 @@ emacs-overlay.url = "github:nix-community/emacs-overlay"; # - Themeing --------------------------------- + grub2-themes.url = "github:vinceliuice/grub2-themes"; + grub2-themes.inputs.nixpkgs.follows = "nixpkgs"; + nix-colors.url = "github:misterio77/nix-colors"; }; @@ -45,6 +48,7 @@ [ inputs.home-manager.nixosModules.home-manager inputs.nix-colors.homeManagerModule + inputs.grub2-themes.nixosModule ] # All my personal modules ++ (lib.my.mapModulesRec' (toString ./modules) import); diff --git a/hosts/reykjavik/default.nix b/hosts/reykjavik/default.nix index 3cfc82d..0ad09d7 100644 --- a/hosts/reykjavik/default.nix +++ b/hosts/reykjavik/default.nix @@ -18,7 +18,19 @@ in # - Bootloader --------------------------------- - boot.loader.systemd-boot.enable = true; + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + grub = { + enable = true; + efiSupport = true; + #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work for your system + device = "nodev"; + }; + grub2-theme.enable = true; + }; # - Themeing --------------------------------- diff --git a/hosts/reykjavik/hardware.nix b/hosts/reykjavik/hardware.nix index 4f23117..ec71852 100644 --- a/hosts/reykjavik/hardware.nix +++ b/hosts/reykjavik/hardware.nix @@ -18,7 +18,7 @@ fsType = "ext4"; }; - "/boot" = { + "/boot/efi" = { device = "/dev/disk/by-label/BOOT"; fsType = "vfat"; };