diff --git a/configuration.nix b/configuration.nix index 97c464c..6c89bc6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,6 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ./package.nix + ./searXNG.nix ]; # Bootloader. @@ -54,6 +55,7 @@ # Configure console keymap console.keyMap = "fr"; + programs.zsh.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.manager = { @@ -61,10 +63,11 @@ description = "manager"; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; []; + shell = pkgs.zsh; }; security.sudo.enable = true; - + security.sudo.extraRules = [ { groups = [ "wheel" ]; @@ -81,7 +84,7 @@ } ]; - + security.polkit.extraConfig = '' polkit.addRule(function (action, subject) { if ( @@ -106,28 +109,28 @@ extraSetFlags = [ "--ssh=false" - ]; + ]; useRoutingFeatures = "server"; # or "client" / "both" }; - + services.roundcube = { enable = false; hostName = "webmail.example.com"; }; services.nginx.enable = false; - + networking.firewall = { enable = true; allowedTCPPorts = [ 443 ]; allowedUDPPorts = [ 41641 3478 ]; - + }; - - - - + + + + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/package.nix b/package.nix index 2bc6430..18fbed2 100644 --- a/package.nix +++ b/package.nix @@ -3,7 +3,7 @@ { # Allow unfree packages nixpkgs.config.allowUnfree = true; - + # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ @@ -11,6 +11,9 @@ git cloudflared cloudflare-warp + zoxide + fzf + sqlite # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # wget ]; diff --git a/searXNG.nix b/searXNG.nix new file mode 100644 index 0000000..d363eb3 --- /dev/null +++ b/searXNG.nix @@ -0,0 +1,19 @@ +{ config,lib,pkgs, ... }: + +{ + services = { + searx = { + enable = true; + redisCreateLocally = true; + package = pkgs.searxng; + environmentFile = "/etc/searx.env"; + settings.server = { + bind_address = "0.0.0.0"; + port = 1692; + # WARNING: setting secret_key here might expose it to the nix cache + # see below for the sops or environment file instructions to prevent this + # secret_key = "$SEARXNG_SECRET"; + }; + }; + }; +}