assertions + more descriptive initializations

This commit is contained in:
2025-09-28 14:51:08 -06:00
parent 712a0728a3
commit 6da8588e40
30 changed files with 94 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
{ config, lib, ... }:
{
options.my.services.network.enable = lib.mkEnableOption "enable";
options.my.services.network.enable = lib.mkEnableOption "network configuration and services";
config = lib.mkIf config.my.services.network.enable {
networking = {
enableIPv6 = true;

View File

@@ -5,7 +5,7 @@
...
}:
{
options.my.services.nvidia.enable = lib.mkEnableOption "enable";
options.my.services.nvidia.enable = lib.mkEnableOption "NVIDIA GPU drivers and CUDA";
config = lib.mkIf config.my.services.nvidia.enable {
environment.variables.CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv";
boot.kernelParams = lib.mkIf (config.networking.hostName == "workstation") [ "nvidia-drm.fbdev=1" ];

View File

@@ -11,7 +11,7 @@ let
];
in
{
options.my.services.printing.enable = lib.mkEnableOption "enable";
options.my.services.printing.enable = lib.mkEnableOption "printing services and drivers";
config = lib.mkIf config.my.services.printing.enable {
users.users.jawz.packages = [ pkgs.simple-scan ];
services.printing = {

View File

@@ -6,7 +6,7 @@
}:
{
imports = [ inputs.nix-gaming.nixosModules.pipewireLowLatency ];
options.my.services.sound.enable = lib.mkEnableOption "enable";
options.my.services.sound.enable = lib.mkEnableOption "audio system and PipeWire";
config = lib.mkIf config.my.services.sound.enable {
services.pulseaudio.enable = false;
security.rtkit.enable = true; # make pipewire realtime-capable

View File

@@ -9,7 +9,7 @@ let
interface = config.my.interfaces.${config.networking.hostName};
in
{
options.my.services.wireguard.enable = lib.mkEnableOption "enable";
options.my.services.wireguard.enable = lib.mkEnableOption "WireGuard VPN configuration";
config = lib.mkIf (config.my.services.wireguard.enable && config.my.secureHost) {
sops.secrets."wireguard/private".sopsFile = ../../secrets/wireguard.yaml;
networking = {