made togglable plugins option for mobile03

This commit is contained in:
2026-08-24 13:21:22 +01:00
parent 4476a7f809
commit 9748ccaa0c
2 changed files with 51 additions and 26 deletions

View File

@@ -10,10 +10,14 @@
inputs', inputs',
... ...
}: {config, ...}: let }: {config, ...}: let
modules = with self.nixosModules; [ modules = with self.nixosModules;
audio [
systemTheme audio
]; systemTheme
]
++ [
inputs.hyprland.inputs.hyprland.nixosModules.default
];
runtimePkgs = self'.packages.hyprland.passthru.runtimePackages; runtimePkgs = self'.packages.hyprland.passthru.runtimePackages;
lib = pkgs.lib; lib = pkgs.lib;
@@ -24,31 +28,49 @@
else lib.getExe pkg; else lib.getExe pkg;
in { in {
imports = modules; imports = modules;
programs.hyprland = {
enable = true; options = {
package = self'.packages.hyprland; hyprland.enablePlugins = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable plugins, basically just touchscreen support";
};
}; };
services.displayManager.defaultSession = "hyprland"; config = {
services.xserver.enable = true; programs.hyprland =
security.polkit.enable = true; {
enable = true;
package = self'.packages.hyprland;
}
// lib.optionalAttrs config.hyprland.enablePlugins {
plugins = with pkgs.hyprlandPlugins; [
hyprspace
hyprgrass
];
};
environment.systemPackages = with pkgs; [ services.displayManager.defaultSession = "hyprland";
gsettings-desktop-schemas services.xserver.enable = true;
]; security.polkit.enable = true;
system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] '' environment.systemPackages = with pkgs; [
mkdir -p /run/hypr-runtime-env/bin gsettings-desktop-schemas
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: pkg: '' ];
ln -sfn ${runtimeTarget name pkg} /run/hypr-runtime-env/bin/${name}
'')
runtimePkgs)}
'';
system.activationScripts.hyprConfig = lib.stringAfter ["specialfs"] '' system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] ''
mkdir -p /run/hypr/config mkdir -p /run/hypr-runtime-env/bin
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: pkg: ''
''; ln -sfn ${runtimeTarget name pkg} /run/hypr-runtime-env/bin/${name}
'')
runtimePkgs)}
'';
system.activationScripts.hyprConfig = lib.stringAfter ["specialfs"] ''
mkdir -p /run/hypr/config
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config
'';
};
}); });
perSystem = { perSystem = {
self', self',

View File

@@ -8,8 +8,11 @@
desktop desktop
mobile03Configuration mobile03Configuration
intelDrivers intelDrivers
development development
upower upower
({...}: {
hyprland.enablePlugins = true;
})
]; ];
}; };
} }