summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-10-29 22:17:49 +0100
committerSilas Schöffel <sils@sils.li>2024-10-29 22:32:23 +0100
commitd789d70da67f2c64715e9026a5eff7623bbee382 (patch)
tree3b07f02be38922fa064bf92e37af193bc14270f2
parentbasesystem: disable everything interfering with disko (diff)
downloadnix-config-d789d70da67f2c64715e9026a5eff7623bbee382.tar.gz
nix-config-d789d70da67f2c64715e9026a5eff7623bbee382.zip
opengl: rename to graphics
-rw-r--r--modules/nixos/sils/default.nix1
-rw-r--r--modules/nixos/sils/graphics.nix12
-rw-r--r--modules/nixos/sils/roles.nix19
-rw-r--r--sys/default.nix1
-rw-r--r--sys/opengl/default.nix3
5 files changed, 32 insertions, 4 deletions
diff --git a/modules/nixos/sils/default.nix b/modules/nixos/sils/default.nix
index 7655e29..57188c1 100644
--- a/modules/nixos/sils/default.nix
+++ b/modules/nixos/sils/default.nix
@@ -7,6 +7,7 @@
     ./environment.nix
     ./firejail.nix
     ./font.nix
+    ./graphics.nix
     ./hyprland.nix
     ./impermanence.nix
     ./meta.nix
diff --git a/modules/nixos/sils/graphics.nix b/modules/nixos/sils/graphics.nix
new file mode 100644
index 0000000..77f58d8
--- /dev/null
+++ b/modules/nixos/sils/graphics.nix
@@ -0,0 +1,12 @@
+{
+  lib,
+  config,
+  ...
+}: let
+  cfg = config.sils.graphics;
+in {
+  options.sils.graphics.enable = lib.mkEnableOption "graphics";
+  config = lib.mkIf cfg.enable {
+    hardware.graphics.enable = true;
+  };
+}
diff --git a/modules/nixos/sils/roles.nix b/modules/nixos/sils/roles.nix
index 1ee88dd..8da6998 100644
--- a/modules/nixos/sils/roles.nix
+++ b/modules/nixos/sils/roles.nix
@@ -11,6 +11,7 @@ in {
       apparmor.enable = lib.mkDefault true;
       basesystem.enable = lib.mkDefault true;
       bluetooth.enable = lib.mkDefault true;
+      graphics.enable = lib.mkDefault true;
       environment.enable = lib.mkDefault true;
       firejail.enable = false;
       font.enable = lib.mkDefault true;
@@ -22,6 +23,23 @@ in {
       sway.enable = lib.mkDefault false;
       theming.enable = lib.mkDefault true;
     }
+    else if roleCmp "laptop-light"
+    then {
+      apparmor.enable = lib.mkDefault true;
+      basesystem.enable = lib.mkDefault true;
+      bluetooth.enable = lib.mkDefault true;
+      graphics.enable = lib.mkDefault true;
+      environment.enable = lib.mkDefault true;
+      firejail.enable = false;
+      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 false;
+      sway.enable = lib.mkDefault false;
+      theming.enable = lib.mkDefault true;
+    }
     else if roleCmp "vm"
     then {}
     else if roleCmp "workstation"
@@ -30,6 +48,7 @@ in {
       basesystem.enable = lib.mkDefault true;
       disks.enable = lib.mkDefault true;
       bluetooth.enable = lib.mkDefault true;
+      graphics.enable = lib.mkDefault true;
       environment.enable = lib.mkDefault true;
       firejail.enable = false;
       font.enable = lib.mkDefault true;
diff --git a/sys/default.nix b/sys/default.nix
index c88c018..0ada9b1 100644
--- a/sys/default.nix
+++ b/sys/default.nix
@@ -1,7 +1,6 @@
 {...}: {
   imports = [
     ./keyboard
-    ./opengl
     ./packages
     ./services
     ./sound
diff --git a/sys/opengl/default.nix b/sys/opengl/default.nix
deleted file mode 100644
index 3eb41d1..0000000
--- a/sys/opengl/default.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{...}: {
-  hardware.opengl.enable = true;
-}