mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 18:19:11 +00:00
users/foo-dogsquared: use upstream config for custom-homepage
This commit is contained in:
parent
c52c7f49f6
commit
47f6c0bee9
@ -24,16 +24,23 @@ in
|
|||||||
|
|
||||||
custom-homepage = {
|
custom-homepage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sections.services = lib.mkMerge [
|
sections = lib.mkMerge [
|
||||||
|
# Merge the upstream since any new files will be overridden. It also
|
||||||
|
# allows us to attach data to it such as new links to the hardcoded
|
||||||
|
# sections.
|
||||||
|
(lib.importTOML "${config.users.foo-dogsquared.programs.custom-homepage.package.src}/data/foodogsquared-homepage/links.toml")
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Local services";
|
services = {
|
||||||
flavorText = "For your local productivity";
|
name = "Local services";
|
||||||
textOnly = true;
|
flavorText = "For your local productivity";
|
||||||
weight = (-50);
|
textOnly = true;
|
||||||
|
weight = (-50);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf config.services.archivebox.webserver.enable {
|
(lib.mkIf config.services.archivebox.webserver.enable {
|
||||||
links = lib.singleton {
|
services.links = lib.singleton {
|
||||||
url = "http://localhost:${builtins.toString config.state.ports.archivebox-webserver.value}";
|
url = "http://localhost:${builtins.toString config.state.ports.archivebox-webserver.value}";
|
||||||
text = "Archive webserver";
|
text = "Archive webserver";
|
||||||
};
|
};
|
||||||
|
@ -131,7 +131,7 @@ in
|
|||||||
"browser.search.widget.inNavBar" = true;
|
"browser.search.widget.inNavBar" = true;
|
||||||
"browser.search.openintab" = true;
|
"browser.search.openintab" = true;
|
||||||
"browser.startup.homepage" =
|
"browser.startup.homepage" =
|
||||||
lib.mkIf userCfg.programs.custom-homepage.enable "file://${userCfg.programs.custom-homepage.finalPackage}";
|
lib.mkIf userCfg.programs.custom-homepage.enable "file://${userCfg.programs.custom-homepage.finalPackage}/index.html";
|
||||||
|
|
||||||
# Some privacy settings...
|
# Some privacy settings...
|
||||||
"privacy.donottrackheader.enabled" = true;
|
"privacy.donottrackheader.enabled" = true;
|
||||||
|
@ -99,10 +99,15 @@ in
|
|||||||
|
|
||||||
# Set every music-related services from the encompassing NixOS
|
# Set every music-related services from the encompassing NixOS
|
||||||
# configuration.
|
# configuration.
|
||||||
users.foo-dogsquared.programs.custom-homepage.sections.services.links = lib.mkMerge [
|
users.foo-dogsquared.programs.custom-homepage.sections = lib.mkMerge [
|
||||||
(lib.mkIf (attrs.nixosConfig.services.gonic.enable or false) (lib.singleton {
|
(lib.mkIf (attrs.nixosConfig.services.gonic.enable or false) (let
|
||||||
url = "http://localhost:${builtins.toString attrs.nixosConfig.state.ports.gonic.value}";
|
subsonicLink = {
|
||||||
text = "Subsonic music server";
|
url = "http://localhost:${builtins.toString attrs.nixosConfig.state.ports.gonic.value}";
|
||||||
|
text = "Jukebox server";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
services.links = lib.singleton subsonicLink;
|
||||||
|
music.links = lib.mkAfter [ (subsonicLink // { text = "Subsonic music server"; }) ];
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -171,9 +176,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Set this to the custom homepage.
|
# Set this to the custom homepage.
|
||||||
users.foo-dogsquared.programs.custom-homepage.sections.services.links = lib.singleton {
|
users.foo-dogsquared.programs.custom-homepage.sections = let
|
||||||
url = "http://localhost:${builtins.toString config.state.ports.mopidy.value}";
|
mopidyLink = {
|
||||||
text = "Music streaming server";
|
url = "http://localhost:${builtins.toString config.state.ports.mopidy.value}";
|
||||||
|
text = "Music streaming server";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
services.links = lib.singleton mopidyLink;
|
||||||
|
music.links = lib.singleton (mopidyLink // { text = "Mopidy server"; });
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user