From 0bcc0c1492ebb2cc74a97bfccaae4ca37ca9e01a Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Sun, 16 Jun 2024 17:35:00 +0200 Subject: sils/roles: use lib.mkDefault this allows for host-specific overrides --- modules/nixos/sils/roles.nix | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/modules/nixos/sils/roles.nix b/modules/nixos/sils/roles.nix index 1c71046..4058ef9 100644 --- a/modules/nixos/sils/roles.nix +++ b/modules/nixos/sils/roles.nix @@ -1,22 +1,26 @@ -{config, ...}: let +{ + config, + lib, + ... +}: let roleCmp = string: config.role.sils == string; in { config.sils = if roleCmp "laptop" then { - apparmor.enable = true; - basesystem.enable = true; - bluetooth.enable = true; - environment.enable = true; + apparmor.enable = lib.mkDefault true; + basesystem.enable = lib.mkDefault true; + bluetooth.enable = lib.mkDefault true; + environment.enable = lib.mkDefault true; firejail.enable = false; - font.enable = true; - hyprland.enable = true; - impermanence.enable = true; - networking.enable = true; - nix-config.enable = true; - plymouth.enable = true; - sway.enable = true; - theming.enable = true; + font.enable = lib.mkDefault true; + hyprland.enable = lib.mkDefault true; + impermanence.enable = lib.mkDefault true; + networking.enable = lib.mkDefault true; + nix-config.enable = lib.mkDefault true; + plymouth.enable = lib.mkDefault true; + sway.enable = lib.mkDefault true; + theming.enable = lib.mkDefault true; } else if roleCmp "vm" then {} -- cgit 1.4.1