Compare commits
4 Commits
25be2b18a0
...
c0117771a0
Author | SHA1 | Date |
---|---|---|
madmin | c0117771a0 | |
madmin | 71c89833c3 | |
madmin | 5528f9107c | |
madmin | 8cee6c464c |
|
@ -0,0 +1 @@
|
|||
# I guess this has to be here
|
Binary file not shown.
After Width: | Height: | Size: 3.4 MiB |
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# FIXME: Make this better
|
||||
sops_result=$(journalctl --no-pager --no-hostname --since "10 minutes ago" |
|
||||
tac |
|
||||
awk '!flag; /Starting sops-nix activation/{flag = 1};' |
|
||||
tac |
|
||||
grep sops)
|
||||
|
||||
# If we don't have "Finished sops-nix activation." in the logs, then we failed
|
||||
if [[ ! $sops_result =~ "Finished sops-nix activation" ]]; then
|
||||
echo "sops-nix failed to activate"
|
||||
echo "$sops_result"
|
||||
exit 1
|
||||
fi
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -z $1 ]; then
|
||||
export HOST=$1
|
||||
else
|
||||
export HOST=$(hostname)
|
||||
fi
|
||||
|
||||
sudo nixos-rebuild --show-trace --impure --flake .#$HOST switch
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -z $1 ]; then
|
||||
export HOST=$1
|
||||
else
|
||||
export HOST=$(hostname)
|
||||
fi
|
||||
|
||||
sudo nixos-rebuild --impure --flake .#$HOST switch
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -z $1 ]; then
|
||||
export HOST=$1
|
||||
else
|
||||
export HOST=$(hostname)
|
||||
fi
|
||||
|
||||
sudo nixos-rebuild --impure --flake .#$HOST test
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "monthly";
|
||||
fileSystems = = [ "/" ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=1h
|
||||
'';
|
||||
powerManagement.enable = true;
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 20;
|
||||
|
||||
#Optional helps save long term battery health
|
||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{ configLib, ... }:
|
||||
{
|
||||
imports = (configLib.scanPaths ./.);
|
||||
}
|
Loading…
Reference in New Issue