Massive refactor
This commit is contained in:
parent
572ac016c4
commit
56c640398b
48 changed files with 271 additions and 1335 deletions
|
|
@ -56,30 +56,18 @@
|
|||
];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
users.users.porta.extraGroups = [ "docker" ];
|
||||
users.users.${user-parts.user.username}.extraGroups = [ "docker" ];
|
||||
boot = {
|
||||
loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
#double-minegrub-menu = {
|
||||
# enable = true;
|
||||
# main_menu_background = "random";
|
||||
# splash_text = "100% Declarative";
|
||||
# world_selection_background_scaled = "1920x1080";
|
||||
#};
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = lib.mkDefault 5;
|
||||
};
|
||||
# initrd.systemd.enable = true;
|
||||
#plymouth.plymouth-minecraft-theme.enable = true;
|
||||
};
|
||||
# Minegrub supplies its own GRUB theme; don't layer Stylix's GRUB theme over it.
|
||||
#stylix.targets.grub.enable = false;
|
||||
# The local Minecraft theme supplies Plymouth's theme and assets.
|
||||
#stylix.targets.plymouth.enable = false;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
|
@ -116,10 +104,6 @@
|
|||
|
||||
services.fstrim.enable = true;
|
||||
|
||||
nixpkgs.config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
# Display arrangement detected on fractal: HDMI-A-1 is primary,
|
||||
# with DP-2 immediately to its right.
|
||||
home-manager.users.${user-parts.user.username} = {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.nixosModules.double-minegrub-menu =
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.boot.loader.grub.double-minegrub-menu;
|
||||
|
||||
backgroundArg =
|
||||
if cfg.main_menu_background == "random" then ""
|
||||
else "backgrounds/${cfg.main_menu_background}";
|
||||
if cfg.main_menu_background == "random" then "" else "backgrounds/${cfg.main_menu_background}";
|
||||
splashTextArg = if cfg.splash_text == "random" then "" else cfg.splash_text;
|
||||
|
||||
minegrubTheme = pkgs.fetchFromGitHub {
|
||||
|
|
@ -34,20 +38,22 @@
|
|||
|
||||
themeDir = "${minegrubTheme}/minegrub";
|
||||
backgroundDir = "${minegrubTheme}/background_options";
|
||||
themeFiles = builtins.listToAttrs (map
|
||||
(file: {
|
||||
name = builtins.unsafeDiscardStringContext
|
||||
("grub/themes/minegrub" + lib.removePrefix (toString themeDir) (toString file));
|
||||
themeFiles = builtins.listToAttrs (
|
||||
map (file: {
|
||||
name = builtins.unsafeDiscardStringContext (
|
||||
"grub/themes/minegrub" + lib.removePrefix (toString themeDir) (toString file)
|
||||
);
|
||||
value = file;
|
||||
})
|
||||
(lib.filesystem.listFilesRecursive themeDir));
|
||||
backgroundFiles = builtins.listToAttrs (map
|
||||
(file: {
|
||||
name = builtins.unsafeDiscardStringContext
|
||||
("grub/themes/minegrub/backgrounds" + lib.removePrefix (toString backgroundDir) (toString file));
|
||||
}) (lib.filesystem.listFilesRecursive themeDir)
|
||||
);
|
||||
backgroundFiles = builtins.listToAttrs (
|
||||
map (file: {
|
||||
name = builtins.unsafeDiscardStringContext (
|
||||
"grub/themes/minegrub/backgrounds" + lib.removePrefix (toString backgroundDir) (toString file)
|
||||
);
|
||||
value = file;
|
||||
})
|
||||
(lib.filesystem.listFilesRecursive backgroundDir));
|
||||
}) (lib.filesystem.listFilesRecursive backgroundDir)
|
||||
);
|
||||
in
|
||||
{
|
||||
options.boot.loader.grub.double-minegrub-menu = {
|
||||
|
|
@ -83,7 +89,9 @@
|
|||
};
|
||||
extraFiles = {
|
||||
"grub/mainmenu.cfg" = ./mainmenu.cfg;
|
||||
} // themeFiles // backgroundFiles;
|
||||
}
|
||||
// themeFiles
|
||||
// backgroundFiles;
|
||||
extraConfig = ''
|
||||
if [ -z "$chosen" ] ; then
|
||||
if [ "''${config_file}" ] ; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue