split searchix configuration from role
2 files changed, 51 insertions(+), 39 deletions(-)
M system/roles/searchix.nix → system/roles/searchix.nix
@@ -1,52 +1,16 @@ { config, - inputs, pkgs, ... }: { imports = [ - inputs.searchix.nixosModules.web + ../settings/services/searchix.nix ../../packages/modules/nixos/goaccess.nix - ]; - nixpkgs.overlays = [ - inputs.searchix.overlays.default ]; - services.searchix = { - enable = true; - settings = { - web = { - baseURL = "https://searchix.ovh"; - searchTimeout = "2s"; - gracefulShutdownTimeout = "2s"; - }; - - importer.sources = { - darwin = { - enable = true; - fetcher = "download"; - url = "https://alinnow.github.io/nix-options/darwin"; - }; - home-manager = { - enable = true; - fetcher = "download"; - url = "https://alinnow.github.io/nix-options/home-manager"; - }; - nixpkgs = { - enable = true; - fetcher = "channel-nixpkgs"; - channel = "nixos-unstable"; - timeout = "1h"; - }; - nixos = { - enable = true; - fetcher = "channel-nixpkgs"; - channel = "nixos-unstable"; - }; - nur.enable = true; - }; - }; + services.searchix.settings.web = { + baseURL = "https://searchix.ovh"; }; services.caddy.virtualHosts = {
A system/settings/services/searchix.nix
@@ -0,0 +1,48 @@ +{ + inputs, + ... +}: +{ + imports = [ + inputs.searchix.nixosModules.web + ]; + + nixpkgs.overlays = [ + inputs.searchix.overlays.default + ]; + + services.searchix = { + enable = true; + settings = { + web = { + searchTimeout = "2s"; + gracefulShutdownTimeout = "2s"; + }; + + importer.sources = { + darwin = { + enable = true; + fetcher = "download"; + url = "https://alinnow.github.io/nix-options/darwin"; + }; + home-manager = { + enable = true; + fetcher = "download"; + url = "https://alinnow.github.io/nix-options/home-manager"; + }; + nixpkgs = { + enable = true; + fetcher = "channel-nixpkgs"; + channel = "nixos-unstable"; + timeout = "1h"; + }; + nixos = { + enable = true; + fetcher = "channel-nixpkgs"; + channel = "nixos-unstable"; + }; + nur.enable = true; + }; + }; + }; +}