move features not needed on laptop to be controlled with options

This commit is contained in:
greyweather committed 2026-08-31 14:48:40 +01:00
1 parent d8005f7871
commit bb831e45d7
7 files changed
+83 -31

No files matched your search

+18 -7
View File
@@ -1,22 +1,33 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { pkgs, lib, config, ...}: {
options.features.applications.gui.equibop.enable = lib.mkEnableOption "equibop";
options.features.applications.gui.equibop = {
enable = lib.mkEnableOption "equibop";
autostart = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf (config.features.applications.gui.equibop.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.equibop.enable = lib.mkDefault true;
config = inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.equibop = lib.mkDefault config.features.applications.gui.equibop;
} {
environment.systemPackages = [ pkgs.equibop ];
});
};
};
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
options.features.applications.gui.equibop.enable = lib.mkEnableOption "equibop";
options.features.applications.gui.equibop = {
enable = lib.mkEnableOption "equibop";
autostart = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf (config.features.applications.gui.equibop.enable) {
programs.equibop.enable = true;
xdg.configFile."autostart/equibop.desktop" = {
enable = true;
xdg.configFile."autostart/equibop.desktop" = lib.mkIf (config.features.applications.gui.equibop.autostart) {
text = ''
[Desktop Entry]
Type=Application
@@ -0,0 +1,41 @@
{ inputs, self, ... }: {
flake.nixosModules.gaming = { pkgs, config, lib, ... }: {
options.features.hardware.steam-controller.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable tweaks and configurations that assist when using Valve's Steam Controller";
};
config = lib.mkIf (config.features.hardware.steam-controller.enable) {
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
features.hardware.steam-controller.enable = lib.mkDefault true;
};
};
};
flake.homeModules.gaming = { pkgs, config, lib, inputs, ... }: {
options.features.hardware.steam-controller.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable tweaks and configurations that assist when using Valve's Steam Controller";
};
config = let
pkgsCross = import inputs.nixpkgs {
localSystem = "x86_64-linux";
hostSystem = "x86_64-linux";
crossSystem = "i686-linux";
};
steam-modified-desktop-file = pkgs.runCommand "modifySteamDesktopFile" {} ''
sed 's@Exec=/usr/bin/steam@Exec=env LD_PRELOAD=${pkgsCross.extest}/lib/libextest.so /usr/bin/steam@' ${self}/assets/steam.desktop.example > $out
'';
in lib.mkIf (config.features.hardware.steam-controller.enable) {
xdg.dataFile."applications/steam.desktop".source = steam-modified-desktop-file;
xdg.configFile."autostart/steam.desktop" = {
source = steam-modified-desktop-file;
force = true;
};
};
};
}