new host and other things !

This commit is contained in:
Reid 2026-03-30 19:04:48 -07:00
parent 2546a8d08e
commit 1625a54459
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
12 changed files with 216 additions and 15 deletions

View file

@ -12,6 +12,7 @@ in {
a list of monitor configurations. each entry should be an attribute set with the following keys:
- `name`: The name of the monitor to configure
- `scale`: The scale factor to apply to the monitor
- `vrr`?: Whether or not the display supports variable refresh rate. Defaults to false
note: the first monitor in the list will be considered the "primary" monitor
'';
example = [
@ -26,6 +27,7 @@ in {
name = monitor.name;
value = {
scale = monitor.scale;
variable-refresh-rate = monitor.vrr or false;
};
}) cfg.monitors);
};

View file

@ -22,7 +22,7 @@ with lib;
interval = "weekly";
};
# tweak fstim service to run only when on AC power
# tweak fstrim service to run only when on AC power
# and to be nice to other processes
# (this is a good idea for any service that runs periodically)
systemd.services.fstrim = {

View file

@ -0,0 +1,7 @@
{ config, lib, ... }:
with lib;
{
# i don't use lvm, can be disabled
services.lvm.enable = mkDefault false;
}

View file

@ -0,0 +1,16 @@
{ config, lib, ... }:
with lib;
let
supportedFilesystems = builtins.map (builtins.getAttr "fsType") (builtins.attrValues config.fileSystems);
mkScrubConfig = fsType: {
enable = builtins.elem fsType supportedFilesystems;
interval = "weekly";
};
in {
services.btrfs.autoScrub = mkScrubConfig "btrfs";
services.zfs.autoScrub = mkScrubConfig "zfs";
# bcachefs exists but it was "ejected from the kernel" for "repeated violations of kernel dev. guidelines"
# linus "tech tips" torvalds said himself "nobody sane uses bcachefs and expects it to be stable" (https://en.wikipedia.org/wiki/Bcachefs#Stability)
}

View file

@ -8,24 +8,15 @@ let
withVencord = true;
};
finalPackage =
if cfg.equibop then pkgs.equibop else
if cfg.vesktop then pkgs.vesktop else
vanillaDiscordPackage;
in {
options.modules.software.distractions.discord = {
enable = mkEnableOption "Enable Discord, a social messaging app";
vesktop = mkEnableOption "Use Vesktop, an alternative Electron client with Vencord preinstalled";
equibop = mkEnableOption "Use Equibop, a fork of Vesktop with Equicord preinstalled";
};
config = mkIf cfg.enable {
assertions = [
{
assertion = !(cfg.vesktop && cfg.equibop);
message = "You must either enable Vesktop or Equibop, not both";
}
];
user.packages = [
finalPackage
];