From 7fe1c93902bc7ad93fe9c8d325822cea7a1955eb Mon Sep 17 00:00:00 2001 From: Leonardo Santiago Date: Tue, 17 Sep 2024 00:04:25 -0300 Subject: configure SSL, change emacs build flags --- flake.lock | 15 +++++++++------ flake.nix | 2 +- modules/blog.nix | 12 ++++++++++-- modules/emacs/README.org | 3 +++ modules/emacs/default.nix | 18 +++++++----------- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index d1631e7..29df196 100644 --- a/flake.lock +++ b/flake.lock @@ -159,14 +159,17 @@ "nixpkgs_old": "nixpkgs_old" }, "locked": { - "lastModified": 1726261422, - "narHash": "sha256-6HfQRP2enWknskI102YNEgMBeBdGDs16cPs7Gf52+7k=", - "path": "/home/leonardo/mx/mixrank", - "type": "path" + "lastModified": 1726523967, + "narHash": "sha256-OgwrAeYvbCMO6vzo9uk9BZ+sIU2shs10Rmgzh7rh184=", + "ref": "refs/heads/master", + "rev": "f6f43f3b723851918085e8b62e10f618e1b138f8", + "revCount": 65611, + "type": "git", + "url": "ssh://git@gitlab.com/mixrank/mixrank" }, "original": { - "path": "/home/leonardo/mx/mixrank", - "type": "path" + "type": "git", + "url": "ssh://git@gitlab.com/mixrank/mixrank" } }, "nixos-hardware": { diff --git a/flake.nix b/flake.nix index d981291..4eef0de 100644 --- a/flake.nix +++ b/flake.nix @@ -33,7 +33,7 @@ url = "github:rafaelmardojai/firefox-gnome-theme"; flake = false; }; - mixrank.url = "path:///home/leonardo/mx/mixrank"; + mixrank.url = "git+ssh://git@gitlab.com/mixrank/mixrank"; blog = { url = "github:o-santi/o-santi.github.io"; flake = false; diff --git a/modules/blog.nix b/modules/blog.nix index 9234f4e..6e7021a 100644 --- a/modules/blog.nix +++ b/modules/blog.nix @@ -19,11 +19,19 @@ in { }; }; config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = [ 80 ]; + networking.firewall.allowedTCPPorts = [ 80 443 ]; # TODO: enable SSL services.nginx = { enable = true; - virtualHosts.${cfg.url}.root = blog; + virtualHosts.${cfg.url} = { + addSSL = true; + enableACME = true; + root = blog; + }; + }; + security.acme = { + acceptTerms = true; + certs."santi.net.br".email = "leonardo.ribeiro.santiago@gmail.com"; }; }; } diff --git a/modules/emacs/README.org b/modules/emacs/README.org index 432d498..2d2acc9 100644 --- a/modules/emacs/README.org +++ b/modules/emacs/README.org @@ -86,6 +86,9 @@ Configuration to automagically open age files, and to encrypt them correctly to :hook (marginalia-mode . nerd-icons-completion-marginal) :config (nerd-icons-completion-mode)) + +(use-package nerd-icons-dired + :hook (dired-mode . nerd-icons-dired-mode)) #+end_src ** Direnv To integrate with nix shells. diff --git a/modules/emacs/default.nix b/modules/emacs/default.nix index ceba97e..bdc9b19 100644 --- a/modules/emacs/default.nix +++ b/modules/emacs/default.nix @@ -1,19 +1,16 @@ { pkgs, inputs, lib, config, ...}: let outside-emacs = with pkgs; [ - (python3.withPackages (p: (with p; [ - python-lsp-server - python-lsp-ruff - ]))) nil ripgrep emacs-lsp-booster ]; - org-tangle-elisp-blocks = (pkgs.callPackage ./org.nix {inherit pkgs; inherit (inputs) from-elisp;}).org-tangle ({ language, flags } : - let is-elisp = (language == "emacs-lisp") || (language == "elisp"); - is-tangle = if flags ? ":tangle" then - flags.":tangle" == "yes" || flags.":tangle" == "y" else false; - in is-elisp && is-tangle + org-tangle-elisp-blocks = (pkgs.callPackage ./org.nix {inherit pkgs; inherit (inputs) from-elisp;}).org-tangle ({ language, flags } : let + is-elisp = (language == "emacs-lisp") || (language == "elisp"); + is-tangle = if flags ? ":tangle" then + flags.":tangle" == "yes" || flags.":tangle" == "y" else false; + in + is-elisp && is-tangle ); config-el = pkgs.writeText "config.el" (org-tangle-elisp-blocks (builtins.readFile ./README.org)); emacs = pkgs.emacsWithPackagesFromUsePackage { @@ -23,6 +20,7 @@ let withAlsaLib = true; withSystemd = true; withToolkitScrollBars = true; + withImageMagick = true; }; override = epkgs: epkgs // { eglot-booster = pkgs.callPackage ./eglot-booster.nix { @@ -46,10 +44,8 @@ in with lib; { nixpkgs.overlays = [ inputs.emacs-overlay.overlays.default ]; environment.systemPackages = [ emacs - (pkgs.aspellWithDicts (dicts: with dicts; [ pt_BR en en-computers ])) ] ++ outside-emacs; fonts.packages = with pkgs; [ - emacs-all-the-icons-fonts (nerdfonts.override { fonts = ["Iosevka"]; }) ]; }; -- cgit v1.2.3