mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-19 00: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 = {
|
||||
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")
|
||||
|
||||
{
|
||||
services = {
|
||||
name = "Local services";
|
||||
flavorText = "For your local productivity";
|
||||
textOnly = true;
|
||||
weight = (-50);
|
||||
};
|
||||
}
|
||||
|
||||
(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}";
|
||||
text = "Archive webserver";
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ in
|
||||
"browser.search.widget.inNavBar" = true;
|
||||
"browser.search.openintab" = true;
|
||||
"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...
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
|
@ -99,10 +99,15 @@ in
|
||||
|
||||
# Set every music-related services from the encompassing NixOS
|
||||
# configuration.
|
||||
users.foo-dogsquared.programs.custom-homepage.sections.services.links = lib.mkMerge [
|
||||
(lib.mkIf (attrs.nixosConfig.services.gonic.enable or false) (lib.singleton {
|
||||
users.foo-dogsquared.programs.custom-homepage.sections = lib.mkMerge [
|
||||
(lib.mkIf (attrs.nixosConfig.services.gonic.enable or false) (let
|
||||
subsonicLink = {
|
||||
url = "http://localhost:${builtins.toString attrs.nixosConfig.state.ports.gonic.value}";
|
||||
text = "Subsonic music server";
|
||||
text = "Jukebox server";
|
||||
};
|
||||
in {
|
||||
services.links = lib.singleton subsonicLink;
|
||||
music.links = lib.mkAfter [ (subsonicLink // { text = "Subsonic music server"; }) ];
|
||||
}))
|
||||
];
|
||||
}
|
||||
@ -171,10 +176,15 @@ in
|
||||
};
|
||||
|
||||
# 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
|
||||
mopidyLink = {
|
||||
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