mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
updated boot settings
update pre-commit hook
This commit is contained in:
parent
4b19b9f711
commit
c8d102b945
6 changed files with 10 additions and 47 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
STAGED="$(git diff --name-only --cached | grep "**.nix" | tr '\n' ' ')"
|
||||
STAGED="$(git diff --name-only --cached --diff-filter=d | grep "**.nix" | tr '\n' ' ')"
|
||||
|
||||
if [ -z "$STAGED" ]; then
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{disko, ...}: {...}: {
|
||||
{disko, ...}: _: {
|
||||
imports = [disko.nixosModules.disko];
|
||||
disko.devices = {
|
||||
disk = {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,6 @@
|
|||
boot = {
|
||||
kernelModules = ["amdgpu"];
|
||||
initrd = {
|
||||
systemd.enable = true;
|
||||
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
|
||||
includeDefaultModules = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -47,9 +47,11 @@ _: {
|
|||
generationsDir.copyKernels = true;
|
||||
#override default
|
||||
systemd-boot.enable = false;
|
||||
efi.canTouchEfiVariables = false;
|
||||
grub = {
|
||||
enable = true;
|
||||
copyKernels = true;
|
||||
efiInstallAsRemovable = true;
|
||||
efiSupport = true;
|
||||
mirroredBoots = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,11 @@
|
|||
"vt.global_cursor_default=0"
|
||||
];
|
||||
consoleLogLevel = 3;
|
||||
initrd.verbose = false;
|
||||
initrd = {
|
||||
verbose = false;
|
||||
|
||||
systemd.enable = true;
|
||||
};
|
||||
plymouth = {
|
||||
enable = lib.mkDefault true;
|
||||
theme = "breeze";
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
{unstable, ...}: {
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
#TAKEN FROM https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-2.nix
|
||||
let
|
||||
useHostResolvConf = config.networking.resolvconf.enable && config.networking.useHostResolvConf;
|
||||
|
||||
bootStage2 = pkgs.substituteAll {
|
||||
src = pkgs.runCommand "stage-2-init.sh" {} ''
|
||||
sed '2i exec 1<>/dev/null' ${unstable}/nixos/modules/system/boot/stage-2-init.sh > $out
|
||||
'';
|
||||
shellDebug = "${pkgs.bashInteractive}/bin/bash";
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
inherit (config.boot) readOnlyNixStore systemdExecutable extraSystemdUnitPaths;
|
||||
inherit (config.system.nixos) distroName;
|
||||
isExecutable = true;
|
||||
inherit useHostResolvConf;
|
||||
inherit (config.system.build) earlyMountScript;
|
||||
path = lib.makeBinPath ([
|
||||
pkgs.coreutils
|
||||
pkgs.util-linux
|
||||
]
|
||||
++ lib.optional useHostResolvConf pkgs.openresolv);
|
||||
postBootCommands =
|
||||
pkgs.writeText "local-cmds"
|
||||
''
|
||||
${config.boot.postBootCommands}
|
||||
${config.powerManagement.powerUpCommands}
|
||||
'';
|
||||
};
|
||||
in {
|
||||
options.local.bootConfig.stage2patch.disable = lib.mkEnableOption "";
|
||||
config =
|
||||
lib.mkIf (!config.local.bootConfig.stage2patch.disable)
|
||||
{
|
||||
system.build.bootStage2 = lib.mkForce bootStage2;
|
||||
};
|
||||
_file = ./stage2patch.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue