-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/homer: init #368594
base: master
Are you sure you want to change the base?
nixos/homer: init #368594
Conversation
2bfb232
to
c901971
Compare
ba4521a
to
169da2a
Compare
169da2a
to
7bda6be
Compare
finalDrv = lib.mkOption { | ||
readOnly = true; | ||
default = if cfg.settings != { } then homerPackageWithConfig else cfg.package; | ||
defaultText = '' | ||
if cfg.settings != {} | ||
then homerPackageWithConfig | ||
else cfg.package; | ||
''; | ||
type = lib.types.package; | ||
description = '' | ||
Final derivation containing the fully built static files | ||
''; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of building a complete separate package with the config in it - how about just serving the file directly at the correct endpoint?
E.g. for nginx I'm currently using something like this:
locations."= /assets/config.yml" = {
root = "${dirOf configFile}";
tryFiles = "/${baseNameOf configFile} =404";
extraConfig = ''
expires -1;
'';
};
where configFile
is just
configFile =
pkgs.writeText "homer-config.yml" (generators.toYAML { } cfg.settings);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please look again
A dead simple static HOMepage for your servER to keep your services on hand, from a simple yaml configuration file. | ||
''; | ||
|
||
virtualHost = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A location
(or something like subPath
) option would be great, for serving homer on a subdirectory path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please look again
7bda6be
to
bf80a77
Compare
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.