new host and other things !
This commit is contained in:
parent
2546a8d08e
commit
1625a54459
12 changed files with 216 additions and 15 deletions
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
7
modules/hardware/fs/lvm.nix
Normal file
7
modules/hardware/fs/lvm.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
# i don't use lvm, can be disabled
|
||||
services.lvm.enable = mkDefault false;
|
||||
}
|
||||
16
modules/hardware/fs/scrub.nix
Normal file
16
modules/hardware/fs/scrub.nix
Normal 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)
|
||||
}
|
||||
|
|
@ -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
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue