10
hosts/common/configs/getty/default.nix
Normal file
10
hosts/common/configs/getty/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
services.getty.extraArgs = lib.mkIf (config.services.getty.autologinUser != null) [
|
||||
"--skip-login"
|
||||
"--noissue"
|
||||
"--nohints"
|
||||
"--nohostname"
|
||||
];
|
||||
}
|
@@ -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;
|
||||
|
30
hosts/common/configs/plymouth/default.nix
Normal file
30
hosts/common/configs/plymouth/default.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
}
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user