added borgbackup for thinkpad
This commit is contained in:
@ -11,6 +11,7 @@ let
|
|||||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||||
exec -a "$0" "$@"
|
exec -a "$0" "$@"
|
||||||
'';
|
'';
|
||||||
|
secrets = import ../configs/secrets.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
@ -64,11 +65,6 @@ in
|
|||||||
keyMap = "us";
|
keyMap = "us";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
videoDrivers = [ "nvidia" ];
|
|
||||||
# deviceSection = ''BusID "PCI:0:2:0"'';
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.nvidia.prime = {
|
hardware.nvidia.prime = {
|
||||||
offload.enable = true;
|
offload.enable = true;
|
||||||
|
|
||||||
@ -146,14 +142,51 @@ in
|
|||||||
[7 93 32767]
|
[7 93 32767]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
services.power-profiles-daemon.enable = false;
|
services = {
|
||||||
services.tlp = {
|
xserver = {
|
||||||
|
videoDrivers = [ "nvidia" ];
|
||||||
|
# deviceSection = ''BusID "PCI:0:2:0"'';
|
||||||
|
};
|
||||||
|
power-profiles-daemon.enable = false;
|
||||||
|
tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
START_CHARGE_THRESH_BAT0 = 80;
|
START_CHARGE_THRESH_BAT0 = 80;
|
||||||
STOP_CHARGE_THRESH_BAT0 = 90;
|
STOP_CHARGE_THRESH_BAT0 = 90;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
borgbackup.jobs.home = rec {
|
||||||
|
compression = "auto,zstd";
|
||||||
|
encryption = {
|
||||||
|
mode = "repokey-blake2" ;
|
||||||
|
passphrase = secrets.borg-desktop-key;
|
||||||
|
};
|
||||||
|
extraCreateArgs = "--list --stats --verbose --checkpoint-interval 600 --exclude-caches";
|
||||||
|
environment.BORG_RSH = "ssh -i ~/.ssh/id_borg_rsa";
|
||||||
|
paths = "/home/alex";
|
||||||
|
repo = "ssh://szczepan.ski/~/borg-backup/thinkpad";
|
||||||
|
startAt = "daily";
|
||||||
|
user = "alex";
|
||||||
|
prune.keep = {
|
||||||
|
daily = 7;
|
||||||
|
weekly = 4;
|
||||||
|
monthly = 6;
|
||||||
|
};
|
||||||
|
extraPruneArgs = "--save-space --list --stats";
|
||||||
|
exclude = map (x: paths + "/" + x) [
|
||||||
|
".config/chromium/Default/Service Worker/CacheStorage"
|
||||||
|
".cache"
|
||||||
|
".local/share/libvirt/images"
|
||||||
|
".local/share/Steam/steamapps"
|
||||||
|
"Games/guild-wars/drive_c/Program Files/Guild Wars/Gw.dat"
|
||||||
|
"Games/guild-wars-second/drive_c/Program Files/Guild Wars/Gw.dat"
|
||||||
|
"Kamera"
|
||||||
|
"Nextcloud"
|
||||||
|
"Sync"
|
||||||
|
"Workspace"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.alex.services.barrier.client = {
|
home-manager.users.alex.services.barrier.client = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
Reference in New Issue
Block a user