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 ];
|
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;
|
fileSystems."/persist".neededForBoot = true;
|
||||||
boot.initrd.postDeviceCommands = lib.mkAfter (builtins.readFile ./impermanence.sh);
|
|
||||||
|
|
||||||
environment.persistence."/persist" = {
|
environment.persistence."/persist" = {
|
||||||
hideMounts = true;
|
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 = [
|
imports = [
|
||||||
./configs/persist
|
./configs/persist
|
||||||
./configs/sops
|
./configs/sops
|
||||||
|
./configs/getty
|
||||||
|
./configs/plymouth
|
||||||
./configs/brightnessctl
|
./configs/brightnessctl
|
||||||
./configs/pipewire
|
./configs/pipewire
|
||||||
./configs/zsh
|
./configs/zsh
|
||||||
@@ -22,16 +24,18 @@
|
|||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot = {
|
||||||
timeout = 3;
|
enable = true;
|
||||||
|
editor = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
timeout = 1;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
initrd.systemd.enable = true;
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
supportedFilesystems = [ "btrfs" "ntfs" ];
|
supportedFilesystems = [ "btrfs" "ntfs" ];
|
||||||
kernelParams = [ "loglevel=3" "quiet" ];
|
|
||||||
initrd.verbose = false;
|
|
||||||
consoleLogLevel = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
@@ -6,8 +6,9 @@
|
|||||||
name = "nix-cleanup";
|
name = "nix-cleanup";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
coreutils-full
|
coreutils-full
|
||||||
btrfs-progs
|
|
||||||
util-linux
|
util-linux
|
||||||
|
findutils
|
||||||
|
btrfs-progs
|
||||||
nix
|
nix
|
||||||
];
|
];
|
||||||
text = builtins.readFile ./cleanup.sh;
|
text = builtins.readFile ./cleanup.sh;
|
||||||
|
@@ -7,7 +7,7 @@ let
|
|||||||
runtimeInputs = with pkgs; [ coreutils-full ];
|
runtimeInputs = with pkgs; [ coreutils-full ];
|
||||||
bashOptions = [ "nounset" "pipefail" ];
|
bashOptions = [ "nounset" "pipefail" ];
|
||||||
text = ''
|
text = ''
|
||||||
if [ -z "$WAYLAND_DISPLAY" ]; then
|
if [ -z "''${WAYLAND_DISPLAY:-}" ]; then
|
||||||
echo "No Wayland session active. Exiting."
|
echo "No Wayland session active. Exiting."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user