all repos — searchix @ 4c4b980bff860dda725253438b499245338161df

Search engine for NixOS, nix-darwin, home-manager and NUR users

build: enable non-flake import

Alan Pearce
commit

4c4b980bff860dda725253438b499245338161df

parent

e9eed3ddc4229db707cccb30beddde15044eff16

3 files changed, 7 insertions(+), 7 deletions(-)

jump to
M flake.nixflake.nix
@@ -24,7 +24,7 @@
outputs = { self, nixpkgs, flake-utils, gomod2nix, pre-commit-hooks, simple-css }: { nixosModules = { - web = import ./nix/modules self; + web = import ./nix/modules; }; } // (flake-utils.lib.eachDefaultSystem (system:
M nix/modules/default.nixnix/modules/default.nix
@@ -1,4 +1,3 @@
-flake: { config , lib , pkgs
@@ -9,7 +8,7 @@ let
inherit (builtins) fromTOML readFile; cfg = config.services.searchix; - package = flake.packages.${pkgs.system}.default; + package = pkgs.callPackage ../.. { }; defaults = fromTOML (readFile ../../defaults.toml);
@@ -91,6 +90,7 @@ default = "info";
}; web = mkOption { + default = { }; type = types.submodule { freeformType = settingsFormat.type; options = {
@@ -113,7 +113,7 @@ in
mkOption { type = types.str; description = "The base URL that searchix will be served on."; - default = "http://${web.listenAddress}:${web.port}"; + default = "http://${web.listenAddress}:${toString web.port}"; }; environment = mkOption {
@@ -146,6 +146,7 @@ };
}; importer = mkOption { + default = { }; type = types.submodule { freeformType = settingsFormat.type;
@@ -179,7 +180,6 @@ };
}; }; }; - default = { }; description = '' Configuration for searchix.
M nix/package.nixnix/package.nix
@@ -47,9 +47,9 @@ ldflags = [
"-s" "-w" "-X" - "searchix/internal/config.CommitSHA=${self.rev or self.dirtyRev}" + "searchix/internal/config.CommitSHA=${self.rev or self.dirtyRev or "unknown"}" "-X" - "searchix/internal/config.ShortSHA=${self.shortRev or self.dirtyShortRev}" + "searchix/internal/config.ShortSHA=${self.shortRev or self.dirtyShortRev or "unknown"}" "-X" "main.buildVersion=${version}" ];