mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
feat: impermanence tuning for nbl
This commit is contained in:
parent
4cfdf7e1b2
commit
f02873ecd9
5 changed files with 20 additions and 13 deletions
|
|
@ -1855,7 +1855,6 @@ My work machine. Built for more security, this is the gold standard of my config
|
||||||
wallpaper = ../../wallpaper/lenovowp.png;
|
wallpaper = ../../wallpaper/lenovowp.png;
|
||||||
hasBluetooth = true;
|
hasBluetooth = true;
|
||||||
hasFingerprint = true;
|
hasFingerprint = true;
|
||||||
initialSetup = true;
|
|
||||||
impermanence = false;
|
impermanence = false;
|
||||||
isBtrfs = true;
|
isBtrfs = true;
|
||||||
};
|
};
|
||||||
|
|
@ -6061,6 +6060,8 @@ Normally, doing that also resets the lecture that happens on the first use of =s
|
||||||
# So if it doesn't run, the btrfs system effectively acts like a normal system
|
# So if it doesn't run, the btrfs system effectively acts like a normal system
|
||||||
# Taken from https://github.com/NotAShelf/nyx/blob/2a8273ed3f11a4b4ca027a68405d9eb35eba567b/modules/core/common/system/impermanence/default.nix
|
# Taken from https://github.com/NotAShelf/nyx/blob/2a8273ed3f11a4b4ca027a68405d9eb35eba567b/modules/core/common/system/impermanence/default.nix
|
||||||
|
|
||||||
|
boot.initrd.systemd.enable = true;
|
||||||
|
|
||||||
boot.initrd.systemd.services.rollback = lib.mkIf config.swarselsystems.impermanence {
|
boot.initrd.systemd.services.rollback = lib.mkIf config.swarselsystems.impermanence {
|
||||||
description = "Rollback BTRFS root subvolume to a pristine state";
|
description = "Rollback BTRFS root subvolume to a pristine state";
|
||||||
wantedBy = [ "initrd.target" ];
|
wantedBy = [ "initrd.target" ];
|
||||||
|
|
@ -6112,16 +6113,16 @@ Normally, doing that also resets the lecture that happens on the first use of =s
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories =
|
directories =
|
||||||
[
|
[
|
||||||
"/.cache/nix/"
|
"/.cache/nix"
|
||||||
"/srv"
|
"/srv"
|
||||||
"/etc/nixos"
|
"/etc/nixos"
|
||||||
"/etc/nix"
|
"/etc/nix"
|
||||||
"/home/swarsel/.dotfiles"
|
"/home/swarsel/.dotfiles"
|
||||||
"/etc/NetworkManager/system-connections"
|
"/etc/NetworkManager/system-connections"
|
||||||
"/etc/secureboot"
|
"/etc/secureboot"
|
||||||
"/var/db/sudo/"
|
"/var/db/sudo"
|
||||||
"/var/cache/"
|
"/var/cache"
|
||||||
"/var/lib/"
|
"/var/lib"
|
||||||
];
|
];
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
# So if it doesn't run, the btrfs system effectively acts like a normal system
|
# So if it doesn't run, the btrfs system effectively acts like a normal system
|
||||||
# Taken from https://github.com/NotAShelf/nyx/blob/2a8273ed3f11a4b4ca027a68405d9eb35eba567b/modules/core/common/system/impermanence/default.nix
|
# Taken from https://github.com/NotAShelf/nyx/blob/2a8273ed3f11a4b4ca027a68405d9eb35eba567b/modules/core/common/system/impermanence/default.nix
|
||||||
|
|
||||||
|
boot.initrd.systemd.enable = true;
|
||||||
|
|
||||||
boot.initrd.systemd.services.rollback = lib.mkIf config.swarselsystems.impermanence {
|
boot.initrd.systemd.services.rollback = lib.mkIf config.swarselsystems.impermanence {
|
||||||
description = "Rollback BTRFS root subvolume to a pristine state";
|
description = "Rollback BTRFS root subvolume to a pristine state";
|
||||||
wantedBy = [ "initrd.target" ];
|
wantedBy = [ "initrd.target" ];
|
||||||
|
|
@ -61,16 +63,16 @@
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories =
|
directories =
|
||||||
[
|
[
|
||||||
"/.cache/nix/"
|
"/.cache/nix"
|
||||||
"/srv"
|
"/srv"
|
||||||
"/etc/nixos"
|
"/etc/nixos"
|
||||||
"/etc/nix"
|
"/etc/nix"
|
||||||
"/home/swarsel/.dotfiles"
|
"/home/swarsel/.dotfiles"
|
||||||
"/etc/NetworkManager/system-connections"
|
"/etc/NetworkManager/system-connections"
|
||||||
"/etc/secureboot"
|
"/etc/secureboot"
|
||||||
"/var/db/sudo/"
|
"/var/db/sudo"
|
||||||
"/var/cache/"
|
"/var/cache"
|
||||||
"/var/lib/"
|
"/var/lib"
|
||||||
];
|
];
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,6 @@
|
||||||
wallpaper = ../../wallpaper/lenovowp.png;
|
wallpaper = ../../wallpaper/lenovowp.png;
|
||||||
hasBluetooth = true;
|
hasBluetooth = true;
|
||||||
hasFingerprint = true;
|
hasFingerprint = true;
|
||||||
initialSetup = true;
|
|
||||||
impermanence = false;
|
impermanence = false;
|
||||||
isBtrfs = true;
|
isBtrfs = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,15 @@
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "cryptd" "usbhid" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
boot.initrd.luks.devices."cryptroot" = {
|
||||||
|
# improve performance on ssds
|
||||||
|
bypassWorkqueues = true;
|
||||||
|
preLVM = true;
|
||||||
|
};
|
||||||
|
|
||||||
# fileSystems."/" =
|
# fileSystems."/" =
|
||||||
# {
|
# {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
timeout 300 'swaylock -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize '
|
timeout 300 'swaylock -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize '
|
||||||
timeout 600 'swaymsg "output * power off"'
|
timeout 600 'swaymsg "output * dpms off"'
|
||||||
after-resume 'swaymsg "output * power on"'
|
after-resume 'swaymsg "output * dpms on"'
|
||||||
before-sleep 'swaylock -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize -'
|
before-sleep 'swaylock -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize -'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue