assertions + more descriptive initializations
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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" ];
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user