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