mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 12:34:24 +01:00
Disable gpu for electron apps with wrapper-manager
This commit is contained in:
parent
6626303217
commit
1290098798
8 changed files with 108 additions and 4 deletions
12
wrappers/default.nix
Normal file
12
wrappers/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
_module.args.myWrappers = {
|
||||
spotify = import ./spotify.nix {inherit inputs pkgs lib;};
|
||||
obsidian = import ./obsidian.nix {inherit inputs pkgs lib;};
|
||||
marktext = import ./marktext.nix {inherit inputs pkgs lib;};
|
||||
};
|
||||
}
|
||||
21
wrappers/marktext.nix
Normal file
21
wrappers/marktext.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {disableGPU ? false}:
|
||||
(inputs.wrapper-manager.lib {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
{
|
||||
wrappers.marktext = {
|
||||
basePackage = pkgs.marktext;
|
||||
flags = [(lib.mkIf disableGPU "--disable-gpu")];
|
||||
};
|
||||
}
|
||||
];
|
||||
})
|
||||
.config
|
||||
.wrappers
|
||||
.marktext
|
||||
.wrapped
|
||||
21
wrappers/obsidian.nix
Normal file
21
wrappers/obsidian.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {disableGPU ? false}:
|
||||
(inputs.wrapper-manager.lib {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
{
|
||||
wrappers.obsidian = {
|
||||
basePackage = pkgs.obsidian;
|
||||
flags = [(lib.mkIf disableGPU "--disable-gpu")];
|
||||
};
|
||||
}
|
||||
];
|
||||
})
|
||||
.config
|
||||
.wrappers
|
||||
.obsidian
|
||||
.wrapped
|
||||
21
wrappers/spotify.nix
Normal file
21
wrappers/spotify.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {disableGPU ? false}:
|
||||
(inputs.wrapper-manager.lib {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
{
|
||||
wrappers.spotify = {
|
||||
basePackage = pkgs.spotify;
|
||||
flags = [(lib.mkIf disableGPU "--disable-gpu")];
|
||||
};
|
||||
}
|
||||
];
|
||||
})
|
||||
.config
|
||||
.wrappers
|
||||
.spotify
|
||||
.wrapped
|
||||
Loading…
Add table
Add a link
Reference in a new issue