Fix streamcontroller
This commit is contained in:
parent
7c70384da2
commit
b461a27228
7 changed files with 16 additions and 33 deletions
|
|
@ -14,7 +14,7 @@
|
|||
};
|
||||
# TODO configure brave
|
||||
};
|
||||
config = lib.mkIf config.mods.browser.brave.enable (
|
||||
config = lib.mkIf (config.mods.browser.brave.enable || config.mods.homePackages.browser == "brave") (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [brave];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
};
|
||||
# TODO configure chromium
|
||||
};
|
||||
config = lib.mkIf config.mods.browser.chromium.enable (
|
||||
config = lib.mkIf (config.mods.browser.chromium.enable || config.mods.homePackages.browser == "chromium") (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [chromium];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
description = "Firefox profiles";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.browser.firefox.enable (
|
||||
config = lib.mkIf (config.mods.browser.firefox.enable || config.mods.homePackages.browser == "firefox") (
|
||||
lib.optionalAttrs (options ? programs.firefox.profiles) {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
description = "Librewolf profiles";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.browser.librewolf.enable (
|
||||
config = lib.mkIf (config.mods.browser.librewolf.enable || config.mods.homePackages.browser == "librewolf") (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.librewolf-dashnix = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ in {
|
|||
description = "Zen profiles";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.browser.zen.enable (
|
||||
config = lib.mkIf (config.mods.browser.zen.enable || config.mods.homePackages.browser == "firefox") (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -80,12 +80,15 @@ in {
|
|||
"firefox"
|
||||
"zen"
|
||||
"librewolf"
|
||||
"chromium"
|
||||
"brave"
|
||||
])
|
||||
package
|
||||
);
|
||||
description = "The browser (the enum variants have preconfigured modules)";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages =
|
||||
if config.mods.homePackages.useDefaultPackages
|
||||
|
|
@ -141,29 +144,7 @@ in {
|
|||
warn_timeout = "-1s";
|
||||
};
|
||||
};
|
||||
programs =
|
||||
config.mods.homePackages.specialPrograms
|
||||
// (
|
||||
if config.mods.homePackages.browser == "firefox"
|
||||
then {
|
||||
firefox = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
else if config.mods.homePackages.browser == "zen"
|
||||
then {
|
||||
zen-browser = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
else if config.mods.homePackages.browser == "librewolf"
|
||||
then {
|
||||
librewolf-dashnix = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
else {}
|
||||
);
|
||||
programs = config.mods.homePackages.specialPrograms;
|
||||
services = config.mods.homePackages.specialServices;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
|
|
@ -8,11 +7,11 @@
|
|||
options.mods = {
|
||||
streamcontroller = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables starship prompt
|
||||
Enables streamcontroller
|
||||
'';
|
||||
};
|
||||
configFilePath = lib.mkOption {
|
||||
|
|
@ -31,7 +30,10 @@
|
|||
programs.streamcontroller.enable = true;
|
||||
}
|
||||
// (lib.optionalAttrs (options ? home.file) {
|
||||
home.file."var/app/com.core447.StreamController/data/pages/defaultpage.json".path = lib.mkIf (!isNull config.mods.streamcontroller.path) config.mods.streamcontroller.path;
|
||||
home.file.".var/app/com.core447.StreamController/data/pages/defaultpage.json" =
|
||||
lib.mkIf
|
||||
(!isNull config.mods.streamcontroller.configFilePath)
|
||||
{source = config.mods.streamcontroller.configFilePath;};
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue