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

+5
View File
@@ -0,0 +1,5 @@
{ inputs, self, ... }: {
flake.nixosModules.gaming = { pkgs, config, lib, ... }: {
hardware.steam-hardware.enable = true;
};
}
+18 -7
View File
@@ -1,22 +1,33 @@
{ inputs, self, ... }: { { inputs, self, ... }: {
flake.nixosModules.graphics = { pkgs, lib, config, ...}: { 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) { config = inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.equibop.enable = lib.mkDefault true; home-manager.users.grey.features.applications.gui.equibop = lib.mkDefault config.features.applications.gui.equibop;
} { } {
environment.systemPackages = [ pkgs.equibop ]; environment.systemPackages = [ pkgs.equibop ];
}); };
}; };
flake.homeModules.graphics = { pkgs, lib, config, ... }: { 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) { config = lib.mkIf (config.features.applications.gui.equibop.enable) {
programs.equibop.enable = true; programs.equibop.enable = true;
xdg.configFile."autostart/equibop.desktop" = { xdg.configFile."autostart/equibop.desktop" = lib.mkIf (config.features.applications.gui.equibop.autostart) {
enable = true;
text = '' text = ''
[Desktop Entry] [Desktop Entry]
Type=Application 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;
};
};
};
}
+1 -1
View File
@@ -57,7 +57,7 @@
features.applications = { features.applications = {
shellScripts = lib.mkOption { shellScripts = lib.mkOption {
type = lib.types.attrsOf (lib.types.str); type = lib.types.attrsOf (lib.types.str);
default = []; default = {};
}; };
extraPackages = lib.mkOption { extraPackages = lib.mkOption {
+7 -3
View File
@@ -1,12 +1,16 @@
{ inputs, self, ... }: { { inputs, self, ... }: {
flake.homeModules.kitagawa = { config, pkgs, ... }: { flake.homeModules.kitagawa = { config, pkgs, ... }: let
mkConfigCommand = args: "zsh -c 'cd ${config.info.rootPath}; git add .; nh os switch ${args}'";
in {
programs.zsh.shellAliases = { programs.zsh.shellAliases = {
wake-takamaki = "ssh sakamoto .local/bin/wake-takamaki"; wake-takamaki = "ssh sakamoto .local/bin/wake-takamaki";
shutdown-takamaki = "ssh takamaki universal-shutdown"; shutdown-takamaki = "ssh takamaki universal-shutdown";
reboot-takamaki = "ssh takamaki universal-reboot"; reboot-takamaki = "ssh takamaki universal-reboot";
switch-takamaki-os = "ssh takamaki switch-os"; switch-takamaki-os = "ssh takamaki switch-os";
apply-config = "zsh -c 'cd ${config.info.rootPath}; git add .; nh os switch .'"; apply-config = mkConfigCommand "";
update-system = "zsh -c 'cd ${config.info.rootPath}; git add .; nh os switch -u .'"; remote-build-config = mkConfigCommand "-j 0";
trace-config = mkConfigCommand "-t";
update-config = mkConfigCommand "-u";
}; };
}; };
} }
+1 -2
View File
@@ -77,8 +77,6 @@
openFirewall = true; openFirewall = true;
}; };
hardware.steam-hardware.enable = true;
boot = { boot = {
# Enable "Silent boot" # Enable "Silent boot"
consoleLogLevel = 3; consoleLogLevel = 3;
@@ -94,6 +92,7 @@
flake.homeModules.kitagawa = { config, pkgs, inputs, lib, ... }: { flake.homeModules.kitagawa = { config, pkgs, inputs, lib, ... }: {
imports = with self.homeModules; [ imports = with self.homeModules; [
global global
audio
graphics graphics
]; ];
+10 -18
View File
@@ -8,20 +8,12 @@
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
}; };
flake.homeModules."grey@takamaki" = { pkgs, config, lib, ... }: let flake.homeModules."grey@takamaki" = { pkgs, config, lib, ... }: {
pkgsCross = import inputs.nixpkgs {
localSystem = "x86_64-linux";
hostSystem = "x86_64-linux";
crossSystem = "i686-linux";
};
steam-overriden-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 {
imports = with self.homeModules; [ imports = with self.homeModules; [
global global
audio audio
graphics graphics
gaming
]; ];
info = { info = {
@@ -37,13 +29,6 @@
''; '';
}; };
xdg.dataFile."applications/steam.desktop".source = steam-overriden-desktop-file;
xdg.configFile."autostart/steam.desktop" = {
source = steam-overriden-desktop-file;
force = true;
};
components = { components = {
windowManagers = "niri"; windowManagers = "niri";
shells = "noctalia"; shells = "noctalia";
@@ -59,6 +44,10 @@
easyeffects.enable = true; easyeffects.enable = true;
}; };
hardware = {
steam-controller.enable = true;
};
applications = { applications = {
cli = { cli = {
fastfetch.enable = true; fastfetch.enable = true;
@@ -68,7 +57,10 @@
gui = { gui = {
vscode.enable = true; vscode.enable = true;
equibop.enable = true; equibop = {
enable = true;
autostart = true;
};
kitty.enable = true; kitty.enable = true;
spotify = { spotify = {
enable = true; enable = true;