Fix the X1 bootloader issue

This commit is contained in:
Sameer Rahmani 2024-04-21 14:13:21 +01:00
parent 374733e40f
commit d53cd1b0d8
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
5 changed files with 66 additions and 55 deletions

View File

@ -17,14 +17,14 @@ params:
rec {
# A single nixos config outputting multiple formats.
# Alternatively put this in a configuration.nix.
generator = {config, ...}: {
generator = { config, ... }: {
imports = [
params.nixos-generators.nixosModules.all-formats
];
nixpkgs.hostPlatform = "x86_64-linux";
# customize an existing format
formatConfigs.iso = {config, ...}: {
formatConfigs.iso = { config, ... }: {
services.openssh.enable = true;
};
@ -32,19 +32,22 @@ rec {
git = import ./git;
base = {config, lib, pkgs, inputs, ...}:
base = { config, lib, pkgs, inputs, ... }:
let
universePkg = pkgs.callPackage ../derivations/universe.nix {};
in {
universePkg = pkgs.callPackage ../derivations/universe.nix { };
in
{
# point the system nixpkgs to this flake by indirecting through
# /etc so it changes when the system switches without having to
# restart all the terminals. thanks ElvishJerricco
nix.registry = builtins.mapAttrs (n: flake: { inherit flake; }) inputs;
environment.etc = lib.mapAttrs' (name: flake: {
environment.etc = lib.mapAttrs'
(name: flake: {
name = "nix/inputs/${name}";
value.source = flake.outPath;
}) inputs;
})
inputs;
nix.nixPath = [ "/etc/nix/inputs" ];
@ -190,7 +193,7 @@ rec {
networking.networkmanager.enable = true;
};
installerUser = {config, pkgs, ...}: {
installerUser = { config, pkgs, ... }: {
users = {
users.universe = {
password = "universe";
@ -207,7 +210,7 @@ rec {
};
};
bootable = { lib, pkgs, ...}: {
bootable = { lib, pkgs, ... }: {
boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
loader = {
@ -217,7 +220,7 @@ rec {
};
disk-installer = host: diskFile: { lib, pkgs, inputs, hostBuilderConfig, ... }: {
imports = [];
imports = [ ];
environment.systemPackages = [
@ -265,10 +268,10 @@ rec {
boot.loader.grub.device = "nodev";
boot.loader.grub.efiSupport = true;
boot.loader.grub.efiInstallAsRemovable = true;
boot.loader.grub.efiInstallAsRemovable = lib.mkDefault true;
};
styles = { lib, pkgs, inputs, ...}: {
styles = { lib, pkgs, inputs, ... }: {
imports = [
inputs.stylix.nixosModules.stylix
@ -307,7 +310,7 @@ rec {
};
yubikey = { config, lib, pkgs, ...}: {
yubikey = { config, lib, pkgs, ... }: {
services.pcscd.enable = true;
services.udev.packages = [ pkgs.yubikey-personalization ];
environment.systemPackages = [
@ -315,6 +318,6 @@ rec {
];
};
virtualisation = import ./virtualisation {};
udev = import ./udev {};
virtualisation = import ./virtualisation { };
udev = import ./udev { };
}

View File

@ -25,12 +25,12 @@
;; Uncomment this line for debugging
;; (setq debug-on-error t)
(eval-when-compile
(defvar fg42/font nil))
(defvar fg42/config/font-size nil))
(setq fg42/font '("Fira Code" 10))
(when-wm
(setq fg42/font '("Fira Code" 10)))
(setq fg42/font/font-size 8))
(fg42/setup-font)
(provide '.fg42)
;;; .fg42.el ends here

View File

@ -77,6 +77,7 @@ in
{
installer = import ./installer.nix (params // {
inherit host;
diskModule = (modules.disk-installer
host
(if inVM then ./majin/vm.disk.nix else ./majin/disks.nix));

View File

@ -45,6 +45,8 @@ let
'';
fileSystems."/".neededForBoot = true;
fileSystems."/boot/efi".neededForBoot = true;
services.gvfs.enable = true;
networking.firewall = {
@ -63,7 +65,11 @@ let
id = [ "24571728" "24571700" ];
};
};
boot.loader.efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi"; # ← use the same mount point here.
};
boot.loader.grub.efiInstallAsRemovable = lib.mkForce false;
};
lxsameer = pkgs.callPackage ../users/lxsameer/default.nix { };
@ -76,6 +82,7 @@ in
{
installer = import ./installer.nix (params // {
inherit host;
diskModule = (modules.disk-installer
host
(if inVM then ./x1/vm.disk.nix else ./x1/disks.nix));

View File

@ -9,12 +9,12 @@
type = "gpt";
partitions = {
ESP = {
size = "1G";
size = "10M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountpoint = "/boot/efi";
};
};
swap = {