fix: add offload condition to bind
This commit is contained in:
parent
c93bc1099c
commit
4d0a35652c
3 changed files with 9 additions and 6 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
{ mainMod }:
|
{ mainMod, nvidia-offload-enabled }:
|
||||||
let
|
let
|
||||||
|
prefix = if nvidia-offload-enabled then "offload " else "";
|
||||||
uwsm = "uwsm app --";
|
uwsm = "uwsm app --";
|
||||||
browser = "offload firefox";
|
browser = "${prefix}firefox";
|
||||||
terminal = "offload ghostty";
|
terminal = "${prefix}ghostty";
|
||||||
filemanager = "nemo";
|
filemanager = "nemo";
|
||||||
scripts = "~/.config/scripts";
|
scripts = "~/.config/scripts";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
system,
|
system,
|
||||||
hyprcursor-size,
|
hyprcursor-size,
|
||||||
xcursor-size,
|
xcursor-size,
|
||||||
|
nvidia-offload-enabled,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -31,8 +32,6 @@ let
|
||||||
song_info=$(playerctl metadata --format '{{title}} {{artist}}')
|
song_info=$(playerctl metadata --format '{{title}} {{artist}}')
|
||||||
echo "$song_info"
|
echo "$song_info"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hyprlockAccent = "lavender";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
@ -62,7 +61,7 @@ in
|
||||||
|
|
||||||
settings =
|
settings =
|
||||||
{
|
{
|
||||||
bind = import ./hypr/bind.nix { inherit mainMod; };
|
bind = import ./hypr/bind.nix { inherit mainMod nvidia-offload-enabled; };
|
||||||
bindm = import ./hypr/bindm.nix { inherit mainMod; };
|
bindm = import ./hypr/bindm.nix { inherit mainMod; };
|
||||||
monitor = import ./hypr/monitor.nix;
|
monitor = import ./hypr/monitor.nix;
|
||||||
plugin = plugins;
|
plugin = plugins;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
nix-version,
|
nix-version,
|
||||||
git-config,
|
git-config,
|
||||||
username,
|
username,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ let
|
||||||
# Get bus id with `lshw`
|
# Get bus id with `lshw`
|
||||||
intel-bus-id = "PCI:0:2:0";
|
intel-bus-id = "PCI:0:2:0";
|
||||||
nvidia-bus-id = "PCI:1:0:0";
|
nvidia-bus-id = "PCI:1:0:0";
|
||||||
|
nvidia-offload-enabled = config.hardware.nvidia.prime.offload.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -50,6 +52,7 @@ in
|
||||||
hyprcursor-size
|
hyprcursor-size
|
||||||
git-config
|
git-config
|
||||||
username
|
username
|
||||||
|
nvidia-offload-enabled
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
users."${username}" = {
|
users."${username}" = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue