diff --git a/flake.lock b/flake.lock index 5638c4e..1209a00 100644 --- a/flake.lock +++ b/flake.lock @@ -263,6 +263,22 @@ "type": "github" } }, + "plymouth-themes": { + "flake": false, + "locked": { + "lastModified": 1626085315, + "narHash": "sha256-VNGvA8ujwjpC2rTVZKrXni2GjfiZk7AgAn4ZB4Baj2k=", + "owner": "adi1090x", + "repo": "plymouth-themes", + "rev": "bf2f570bee8e84c5c20caac353cbe1d811a4745f", + "type": "github" + }, + "original": { + "owner": "adi1090x", + "repo": "plymouth-themes", + "type": "github" + } + }, "ranger-icons": { "flake": false, "locked": { @@ -307,6 +323,7 @@ "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", + "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "ranger-sixel": "ranger-sixel", "sea-orm-cli": "sea-orm-cli", diff --git a/flake.nix b/flake.nix index 84166de..c5aa23c 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,9 @@ nil-lsp.url = "github:oxalica/nil"; nil-lsp.inputs.nixpkgs.follows = "nixpkgs-unstable"; + plymouth-themes.url = "github:adi1090x/plymouth-themes"; + plymouth-themes.flake = false; + # my stuff dhist.url = "github:lelgenio/dhist"; }; diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 5cef9e7..a6576cd 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -29,7 +29,7 @@ in { fsType = "btrfs"; options = [ "subvol=nixos" ]; }; - boot.initrd.luks.reusePassphrases = true; + # boot.initrd.luks.reusePassphrases = true; boot.initrd.luks.devices = { "main".device = "/dev/disk/by-label/CRYPT_ROOT"; "data".device = "/dev/disk/by-label/CRYPT_DATA"; diff --git a/overlays/default.nix b/overlays/default.nix index b096ce2..776d799 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -9,6 +9,7 @@ }) (import ./sixel-patches.nix (inputs // { inherit pkgs; })) (final: prev: { + plymouth-theme-red = (import ./plymouth-theme-red.nix (inputs // { inherit pkgs; })); uservars = import ../user/variables.nix; dhist = inputs.dhist.packages.${system}.dhist; mpvpaper = inputs.wegank.packages.${prev.system}.mpvpaper; diff --git a/overlays/plymouth-theme-red.nix b/overlays/plymouth-theme-red.nix new file mode 100644 index 0000000..3d536f4 --- /dev/null +++ b/overlays/plymouth-theme-red.nix @@ -0,0 +1,25 @@ +inputs@{ pkgs, ... }: +pkgs.stdenv.mkDerivation rec { + pname = "red-loader-plymouth"; + version = "0.0.1"; + + src = inputs.plymouth-themes; + + buildInputs = [ + pkgs.git + ]; + + configurePhase = '' + mkdir -p $out/share/plymouth/themes/ + ''; + + buildPhase = '' + ''; + + installPhase = '' + cp -r pack_4/red_loader $out/share/plymouth/themes + cat pack_4/red_loader/red_loader.plymouth | sed "s@\/usr\/@$out\/@" > \ + $out/share/plymouth/themes/red_loader/red_loader.plymouth + ''; +} + diff --git a/system/boot.nix b/system/boot.nix new file mode 100644 index 0000000..3ce0843 --- /dev/null +++ b/system/boot.nix @@ -0,0 +1,42 @@ +{ config, pkgs, inputs, ... }: { + console = { + font = "ter-132n"; + packages = [pkgs.terminus_font]; + earlySetup = false; + }; + + boot = { + consoleLogLevel = 0; + initrd.verbose = false; + kernelParams = [ + "quiet" + "splash" + "boot.shell_on_fail" + "loglevel=3" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + ]; + + initrd.systemd.enable = true; + loader = { + # It's still possible to open the bootloader list by pressing any key + # It will just not appear on screen unless a key is pressed + timeout = 0; + efi.canTouchEfiVariables = true; + efi.efiSysMountPoint = "/boot/efi"; + systemd-boot = { + enable = true; + # editor = false; + # configurationLimit = 100; + }; + }; + plymouth = { + enable = true; + theme = "red_loader"; + themePackages = [ + pkgs.plymouth-theme-red + ]; + }; + }; +} diff --git a/system/configuration.nix b/system/configuration.nix index 3dfb7b7..e64b891 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -2,14 +2,9 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, inputs, ... }: { - imports = [ ./gamemode.nix ./cachix.nix ./media-packages.nix ]; + imports = [ ./gamemode.nix ./cachix.nix ./media-packages.nix ./boot.nix ]; packages.media-packages.enable = true; - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.efi.efiSysMountPoint = "/boot/efi"; - boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernel.sysctl = {