From 7136be51e076ed5024e4c65639f8d3e7f17f91e0 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 8 Jul 2024 20:36:39 +0100 Subject: [PATCH] Guile configuration, mostly --- configuration.nix | 32 +++++++++++++++++++++++++++++++- emacs.el | 25 ++++++++++++++++++++++++- flake.lock | 6 +++--- guile-config | 2 ++ nil_cli.nix | 18 ++++++++++++++++++ 5 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 guile-config create mode 100644 nil_cli.nix diff --git a/configuration.nix b/configuration.nix index 1a3af20..b52d792 100644 --- a/configuration.nix +++ b/configuration.nix @@ -178,6 +178,11 @@ in { gopls lazygit chromium + guile + solc + kdenlive + discord + (pkgs.callPackage ./nil_cli.nix {}) #network-manager-applet (clang-tools.override { llvmPackages = llvmPackages_17; @@ -394,7 +399,14 @@ in { # The home.stateVersion option does not have a default and must be set home.stateVersion = "24.05"; - home.sessionVariables = { EDITOR = "emacs -nw --no-splash"; }; + home.sessionVariables = { + EDITOR = "emacs -nw --no-splash"; + GUILE_LOAD_PATH = "${config.users.users.knazarov.home}/guile"; + }; + + home.file.".guile" = { + source = ./guile-config; + }; programs.lf = { enable = true; @@ -434,6 +446,18 @@ in { }; }; + xdg.mimeApps = { + enable = true; + + defaultApplications = { + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + }; + }; + gtk = { enable = true; gtk3.extraConfig = { gtk-enable-animations = "0"; }; @@ -445,6 +469,12 @@ in { nix-direnv = { enable = true; }; }; + # Workaround for https://github.com/nix-community/home-manager/issues/5146 + services.gpg-agent = { + enable = true; + pinentryPackage = pkgs.pinentry-gnome3; + }; + programs.gpg = { enable = true; package = pkgs.gnupg; diff --git a/emacs.el b/emacs.el index 977ab41..120e478 100755 --- a/emacs.el +++ b/emacs.el @@ -627,7 +627,8 @@ Intended for `after-make-frame-functions'." (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) - (python . t))) + (python . t) + (shell . t))) ;; Log TODO state changes and clock-ins into the LOGBOOK drawer (setq org-clock-into-drawer t) @@ -743,6 +744,15 @@ Intended for `after-make-frame-functions'." org-stuck-projects '("+PROJECT/-MAYBE-DONE-SOMEDAY" ("TODO" "ERRAND" "WAITING") () ())) ) + + +(use-package org-tree-slide + :ensure t + :defer t + :config + (setq org-tree-slide-slide-in-effect nil) + ) + ;; -------- Email -------- (use-package mu4e @@ -1242,5 +1252,18 @@ Intended for `after-make-frame-functions'." ("C-c C-r" . sudo-edit) ) +;; Solidity + +(use-package solidity-mode + :ensure t + :mode "\\.sol$" + ) + +;; Guile + +(use-package geiser-guile + :ensure t + ) + (provide 'init) ;;; init.el ends here diff --git a/flake.lock b/flake.lock index 3af32c0..76d9ce2 100755 --- a/flake.lock +++ b/flake.lock @@ -90,11 +90,11 @@ ] }, "locked": { - "lastModified": 1719265590, - "narHash": "sha256-SScslqk325Ld6+9QMq+it1Wlisq8osZ2BQDrWBE4Cp8=", + "lastModified": 1720134827, + "narHash": "sha256-idxCwgQezyNWlGnfKn6uKHJNDqw4mlyC7PdHBXv2hjo=", "owner": "~knazarov", "repo": "knazarov.com", - "rev": "9e2f8c466d5559eaf19ce8af7ae8c8d4674d4dcf", + "rev": "0cd8c2fabc37f8da2cbc9e54265a04222c65fa9f", "type": "sourcehut" }, "original": { diff --git a/guile-config b/guile-config new file mode 100644 index 0000000..bcbc981 --- /dev/null +++ b/guile-config @@ -0,0 +1,2 @@ +(use-modules (ice-9 readline)) +(activate-readline) diff --git a/nil_cli.nix b/nil_cli.nix new file mode 100644 index 0000000..51c2a1b --- /dev/null +++ b/nil_cli.nix @@ -0,0 +1,18 @@ +{ lib, stdenv, fetchFromGitHub, fetchurl }: + +stdenv.mkDerivation rec { + pname = "nil_cli"; + version = "2024.07.02"; + + src = fetchurl { + url = "https://github.com/NilFoundation/nil_cli/releases/download/2024.07.04/nil_cli-linux-x64"; + sha256 = "sha256-j0CL2cgeeKejGapYMZwRdIKqmj5BVLy8D2SuPl0H5kM="; + }; + + phases = ["installPhase" "patchPhase"]; + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/nil_cli + chmod +x $out/bin/nil_cli + ''; +}