Compare commits

...

4 Commits

9 changed files with 82 additions and 0 deletions

1
assets/default.nix Normal file
View File

@ -0,0 +1 @@
# I guess this has to be here

BIN
assets/worm.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

16
scripts/check-sops.sh Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,7 @@
{
services.btrfs.autoScrub = {
enable = true;
interval = "monthly";
fileSystems = = [ "/" ];
};
}

View File

@ -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
};
};
}

View File

@ -0,0 +1,4 @@
{ configLib, ... }:
{
imports = (configLib.scanPaths ./.);
}