-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: Create options for applications, other fixes
This creates a new option `ghaf.programs.<name>`, which allows us to configure applications across targets and whether they run inside a VM or not. This also fixes Chromium border glitch, and Element border colour (SP-4645 & SP-4644). Signed-off-by: Humaid Alqasimi <humaid.alqassimi@tii.ae>
- Loading branch information
1 parent
a4ba18d
commit 710cd4b
Showing
9 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ | |
./virtualization/docker.nix | ||
./systemd | ||
./services | ||
./programs | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
config, | ||
lib, | ||
... | ||
}: let | ||
cfg = config.ghaf.programs.chromium; | ||
in { | ||
options.ghaf.programs.chromium = { | ||
enable = lib.mkEnableOption "Enable Chromium program settings"; | ||
useZathuraVM = lib.mkEnableOption "Open PDFs in Zathura VM"; | ||
}; | ||
config = lib.mkIf cfg.enable { | ||
programs.chromium.enable = true; | ||
|
||
# Fix border glitch when going maximised->minimised. | ||
programs.chromium.initialPrefs.browser.custom_chrome_frame = false; | ||
|
||
# Don't use pdf.js, open externally. | ||
programs.chromium.extraOpts."AlwaysOpenPdfExternally" = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright 2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
imports = [ | ||
./zathura.nix | ||
./chromium.nix | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
config, | ||
lib, | ||
... | ||
}: let | ||
cfg = config.ghaf.programs.zathura; | ||
in { | ||
options.ghaf.programs.zathura = { | ||
enable = lib.mkEnableOption "Enable Zathura program settings"; | ||
}; | ||
config = lib.mkIf cfg.enable { | ||
# Use regular clipboard instead of primary clipboard. | ||
environment.etc."zathurarc".text = '' | ||
set selection-clipboard clipboard | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters