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
|
# 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) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
home.packages = with pkgs; [brave];
|
home.packages = with pkgs; [brave];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
};
|
};
|
||||||
# TODO configure chromium
|
# 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) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
home.packages = with pkgs; [chromium];
|
home.packages = with pkgs; [chromium];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
description = "Firefox profiles";
|
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) {
|
lib.optionalAttrs (options ? programs.firefox.profiles) {
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
description = "Librewolf profiles";
|
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) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
programs.librewolf-dashnix = {
|
programs.librewolf-dashnix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ in {
|
||||||
description = "Zen profiles";
|
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) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
programs.zen-browser = {
|
programs.zen-browser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -80,12 +80,15 @@ in {
|
||||||
"firefox"
|
"firefox"
|
||||||
"zen"
|
"zen"
|
||||||
"librewolf"
|
"librewolf"
|
||||||
|
"chromium"
|
||||||
|
"brave"
|
||||||
])
|
])
|
||||||
package
|
package
|
||||||
);
|
);
|
||||||
description = "The browser (the enum variants have preconfigured modules)";
|
description = "The browser (the enum variants have preconfigured modules)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.optionalAttrs (options ? home.packages) {
|
config = lib.optionalAttrs (options ? home.packages) {
|
||||||
home.packages =
|
home.packages =
|
||||||
if config.mods.homePackages.useDefaultPackages
|
if config.mods.homePackages.useDefaultPackages
|
||||||
|
|
@ -141,29 +144,7 @@ in {
|
||||||
warn_timeout = "-1s";
|
warn_timeout = "-1s";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs =
|
programs = config.mods.homePackages.specialPrograms;
|
||||||
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 {}
|
|
||||||
);
|
|
||||||
services = config.mods.homePackages.specialServices;
|
services = config.mods.homePackages.specialServices;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
config,
|
config,
|
||||||
options,
|
options,
|
||||||
...
|
...
|
||||||
|
|
@ -8,11 +7,11 @@
|
||||||
options.mods = {
|
options.mods = {
|
||||||
streamcontroller = {
|
streamcontroller = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
default = true;
|
default = false;
|
||||||
example = false;
|
example = true;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
Enables starship prompt
|
Enables streamcontroller
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
configFilePath = lib.mkOption {
|
configFilePath = lib.mkOption {
|
||||||
|
|
@ -31,7 +30,10 @@
|
||||||
programs.streamcontroller.enable = true;
|
programs.streamcontroller.enable = true;
|
||||||
}
|
}
|
||||||
// (lib.optionalAttrs (options ? home.file) {
|
// (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