Add plymouth

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-25 20:16:25 +03:00
parent a69695dd73
commit eaa63dd272
6 changed files with 79 additions and 9 deletions

View File

@@ -0,0 +1,10 @@
{ config, lib, ... }:
{
services.getty.extraArgs = lib.mkIf (config.services.getty.autologinUser != null) [
"--skip-login"
"--noissue"
"--nohints"
"--nohostname"
];
}

View File

@@ -1,10 +1,35 @@
{ inputs, lib, ... }:
{ inputs, pkgs, ... }:
{
imports = [ inputs.impermanence.nixosModules.impermanence ];
boot.initrd.systemd =
let
bins = with pkgs; [
coreutils
util-linux
findutils
btrfs-progs
];
in
{
initrdBin = bins;
services.impermanence = {
description = "Rollback BTRFS subvolumes to a pristine state";
serviceConfig.Type = "oneshot";
wantedBy = [ "initrd.target" ];
before = [ "sysroot.mount" ];
after = [ "cryptsetup.target" ];
unitConfig.DefaultDependencies = "no";
path = bins;
script = builtins.readFile ./impermanence.sh;
};
};
fileSystems."/persist".neededForBoot = true;
boot.initrd.postDeviceCommands = lib.mkAfter (builtins.readFile ./impermanence.sh);
environment.persistence."/persist" = {
hideMounts = true;

View File

@@ -0,0 +1,30 @@
{ pkgs, ... }:
{
boot = {
plymouth =
let
theme = "connect";
in
{
enable = true;
inherit theme;
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override { selected_themes = [ theme ]; })
];
};
initrd.verbose = false;
consoleLogLevel = 0;
kernelParams = [
"quiet"
"loglevel=3"
"splash"
"boot.shell_on_fail"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
};
}

View File

@@ -4,6 +4,8 @@
imports = [
./configs/persist
./configs/sops
./configs/getty
./configs/plymouth
./configs/brightnessctl
./configs/pipewire
./configs/zsh
@@ -22,16 +24,18 @@
boot = {
loader = {
systemd-boot.enable = true;
timeout = 3;
systemd-boot = {
enable = true;
editor = false;
};
timeout = 1;
efi.canTouchEfiVariables = true;
};
initrd.systemd.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = [ "btrfs" "ntfs" ];
kernelParams = [ "loglevel=3" "quiet" ];
initrd.verbose = false;
consoleLogLevel = 0;
};
networking.networkmanager.enable = true;

View File

@@ -6,8 +6,9 @@
name = "nix-cleanup";
runtimeInputs = with pkgs; [
coreutils-full
btrfs-progs
util-linux
findutils
btrfs-progs
nix
];
text = builtins.readFile ./cleanup.sh;