From c92ed88781062b73877bf92ef4a3261f5f82eeee Mon Sep 17 00:00:00 2001 From: Jonathan Reeve Date: Wed, 1 Nov 2023 09:12:03 -0700 Subject: [PATCH] commit latest changes --- dotfiles/config.nu | 90 ++--- dotfiles/configuration.nix | 46 ++- dotfiles/emacs/doom.d/config.el | 67 ++-- dotfiles/emacs/doom.d/init.el | 2 +- dotfiles/emacs/doom.d/packages.el | 2 +- dotfiles/flake.lock | 530 +++++++++++++++++++++++++----- dotfiles/flake.nix | 19 +- dotfiles/home.nix | 72 ++-- dotfiles/python.nix | 8 +- scripts/aspell.en.pws | 1 + scripts/downloadBook.py | 2 +- 11 files changed, 616 insertions(+), 223 deletions(-) diff --git a/dotfiles/config.nu b/dotfiles/config.nu index 15bb64a..fd502b8 100644 --- a/dotfiles/config.nu +++ b/dotfiles/config.nu @@ -1,50 +1,3 @@ -# Handy aliases -def em [f] {emacsclient -c $f &; disown} - -# Wallpaper management -def wal-fav [] { - open ~/.cache/wal/colors.json | get wallpaper | - each { |it| echo $it (char newline)} | - str collect | save --append ~/.cache/wal/favs -} - -def wal-fav-set [] { - let w = (open ~/.cache/wal/favs | lines | uniq | shuffle | first) - echo $"Using ($w)" - pkill swaybg - swaybg -o 'DP-6' -i $w -m fill -} - -def wal-recent [] {wal -i (ls /run/media/jon/systemrestore/.systemrestore/Bildoj | sort-by modified -r | first 50 | shuffle | first | get name)} -def wal-backup [] {sudo rsync -a /home/systemrestore/Bildoj /run/media/jon/systemrestore/.systemrestore} - -# Project managemnt -def proj [project] { - open ~/Dotfiles/scripts/projects.yaml | where name == $project | select websites | each { |it| qutebrowser $it.websites }; - open ~/Dotfiles/scripts/projects.yaml | where name == $project | select textFiles | each { emacsclient -c $it.textFiles & }; -} - -# Jump around with z -# zoxide init nushell --hook prompt | save ~/.zoxide.nu -source ~/.zoxide.nu - -# Starship config from https://www.nushell.sh/book/3rdpartyprompts.html#starship -let-env STARSHIP_SHELL = "nu" - -def create_left_prompt [] { - starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)' -} - -# Use nushell functions to define your right and left prompt -let-env PROMPT_COMMAND = { create_left_prompt } -let-env PROMPT_COMMAND_RIGHT = "" - -# The prompt indicators are environmental variables that represent -# the state of the prompt -let-env PROMPT_INDICATOR = "" -let-env PROMPT_INDICATOR_VI_INSERT = ": " -let-env PROMPT_INDICATOR_VI_NORMAL = "〉" -let-env PROMPT_MULTILINE_INDICATOR = "::: " # https://raw.githubusercontent.com/nushell/nu_scripts/main/background_task/job.nu # spawn task to run in the background @@ -54,17 +7,17 @@ let-env PROMPT_MULTILINE_INDICATOR = "::: " # # e.g: # spawn { echo 3 } -export def spawn [ - command: block # the command to spawn +export def pspawn [ + command: closure # the command to spawn ] { let config_path = $nu.config-path let env_path = $nu.env-path - let source_code = (view-source $command | str trim -l -c '{' | str trim -r -c '}') + let source_code = (view source $command | str trim -l -c '{' | str trim -r -c '}') let job_id = (pueue add -p $"nu --config \"($config_path)\" --env-config \"($env_path)\" -c '($source_code)'") {"job_id": $job_id} } -export def log [ +export def plog [ id: int # id to fetch log ] { pueue log $id -f --json @@ -76,7 +29,7 @@ export def log [ } # get job running status -export def status () { +export def pstatus () { pueue status --json | from json | get tasks @@ -86,11 +39,40 @@ export def status () { } # kill specific job -export def kill (id: int) { +export def pkill (id: int) { pueue kill $id } # clean job log -export def clean () { +export def pclean () { pueue clean } +# Wallpaper management +def wal-fav [] { + open ~/.cache/wal/colors.json | get wallpaper | + each { |it| echo $it (char newline)} | + str join | save --append ~/.cache/wal/favs +} + +def wal-fav-set [] { + let w = (open ~/.cache/wal/favs | lines | uniq | shuffle | first) + echo $"Using ($w)" + # pkill swaybg + spawn { swaybg -o 'DP-6' -i $w -m fill } +} + +def wal-recent [] {wal -i (ls /run/media/jon/systemrestore/.systemrestore/Bildoj | sort-by modified -r | first 50 | shuffle | first | get name)} +def wal-backup [] {sudo rsync -a /home/systemrestore/Bildoj /run/media/jon/systemrestore/.systemrestore} + +# Project managemnt +def proj [project] { + open ~/Dotfiles/scripts/projects.yaml | where name == $project | select websites | each { |it| qutebrowser $it.websites }; + open ~/Dotfiles/scripts/projects.yaml | where name == $project | select textFiles | each { emacsclient -c $it.textFiles & }; +} + +def create_left_prompt [] { + starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)' +} + +# Handy aliases +def em [f] { spawn { emacsclient -c $f } } diff --git a/dotfiles/configuration.nix b/dotfiles/configuration.nix index 6387ca6..6c1ebf5 100644 --- a/dotfiles/configuration.nix +++ b/dotfiles/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, options, ... }: +{ config, pkgs, options, lib, ... }: { imports = @@ -21,7 +21,7 @@ kernelPackages = pkgs.linuxPackages_latest; kernelModules = [ "btqca" "hci_qca" "hci_uart" "bluetooth" ]; blacklistedKernelModules = [ "psmouse" ]; - cleanTmpDir = true; + tmp.cleanOnBoot = true; plymouth.enable = true; resumeDevice = "/dev/nvme0n1p4"; loader.systemd-boot.enable = true; @@ -50,8 +50,19 @@ }; }; - nixpkgs.config.allowUnfree = true; - nixpkgs.config.allowBroken = true; + nixpkgs = { + config = { allowUnfree = true; + allowBroken = true; + }; + overlays = [ + # (import (builtins.fetchTarball { + # url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; + # sha256 = "0i74f97f3ljr49jlhh60pglqsfj6vbwigyrl5q76sclirkzfyvr0"; + # } + # )) + ]; + }; + console.useXkbConfig = true; @@ -62,7 +73,7 @@ }; # Fonts! - fonts.fonts = with pkgs; [ + fonts.packages = with pkgs; [ fantasque-sans-mono font-awesome_5 fira-code @@ -80,7 +91,7 @@ kochi-substitute # Japanese ]; # Set your time zone. - time.timeZone = "America/New_York"; + time.timeZone = "America/Los_Angeles"; # List packages installed in system profile. To search, run: # $ nix search wget @@ -100,7 +111,7 @@ megasync # Backups megacmd keybase-gui # Also backups - logseq # Fancy notes + #logseq # Fancy notes # CLI fish # Shell @@ -113,7 +124,7 @@ gcc gnumake gnupg wget - isync mu w3m # Mail + isync w3m # Mail protonmail-bridge gnutls # For mail auth protonvpn-cli # VPN @@ -127,6 +138,7 @@ dict # Dictionary pywal + wallust ranger # Building stuff @@ -380,15 +392,15 @@ # }; }; - systemd.user.services.protonmail = { - description = "Protonmail Bridge"; - enable = true; - script = - "${pkgs.protonmail-bridge}/bin/protonmail-bridge --log-level debug"; - path = [ pkgs.gnome.gnome-keyring ]; # HACK: https://github.com/ProtonMail/proton-bridge/issues/176 - wantedBy = [ "graphical-session.target" ]; - partOf = [ "graphical-session.target" ]; - }; + # systemd.user.services.protonmail = { + # description = "Protonmail Bridge"; + # enable = true; + # script = + # "${pkgs.protonmail-bridge}/bin/protonmail-bridge --log-level debug"; + # path = [ pkgs.gnome.gnome-keyring ]; # HACK: https://github.com/ProtonMail/proton-bridge/issues/176 + # wantedBy = [ "graphical-session.target" ]; + # partOf = [ "graphical-session.target" ]; + # }; # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you diff --git a/dotfiles/emacs/doom.d/config.el b/dotfiles/emacs/doom.d/config.el index 7ea4322..acc4352 100644 --- a/dotfiles/emacs/doom.d/config.el +++ b/dotfiles/emacs/doom.d/config.el @@ -8,9 +8,9 @@ (package-initialize) ;; Set location of custom.el -(setq custom-file "~/.emacs.d/custom.el") +(setq custom-file "~/.config/emacs/custom.el") -(setq doom-font (font-spec :family "Fantasque Sans Mono" :size 18)) +(setq doom-font (font-spec :family "Victor Mono" :size 18)) (setq doom-themes-treemacs-enable-variable-pitch 'nil) (setq vc-follow-symlinks t) ;; Always follow symlinks. @@ -74,7 +74,7 @@ (setq org-capture-templates '(("t" "Todo" entry (file+headline "/home/jon/Dokumentujo/Org/notes.org" "Tasks") "* TODO %? %i\n %a") - ("m" "Movie" entry (file+headline "/home/jon/Dokumentujo/Org/Roam/movies.org" "To Watch") + ("m" "Movie" entry (file+headline "/home/jon/Dokumentujo/Org/Roam/movies.org" "to watch") "* %a\n %?\n %i") ("l" "Link" entry (file+olp "/home/jon/Dokumentujo/Org/notes.org" "Web Links") "* %a\n %?\n %i") @@ -397,6 +397,10 @@ If nil it defaults to `split-string-default-separators', normally (global-org-modern-mode) (setq org-modern-label-border 1) + (defun org-procrastinate () + "Set the scheduled date on an Org agenda item to tomorrow." + (interactive) + (org-agenda-schedule nil "+1d")) ) ;; End of Org block ;; (use-package! org-clock-reminder @@ -415,7 +419,7 @@ If nil it defaults to `split-string-default-separators', normally ;; Mail (after! mu4e - (require 'org-mu4e) + ;; (require 'org-mu4e) (setq read-mail-command 'mu4e) ;; Why is this not already set? ;; Respond to calendar invites. But is this even working? (require 'mu4e-icalendar) @@ -494,25 +498,25 @@ If nil it defaults to `split-string-default-separators', normally (after! org-msg (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t" - org-msg-startup "hidestars indent inlineimages" - org-msg-greeting-fmt "\nHi%s,\n\n" - org-msg-default-alternatives '((new . (text html)) - (reply-to-html . (text html)) - (reply-to-text . (text html))) - org-msg-convert-citation t - org-msg-signature " - -Best, - -Jonathan - -#+begin_signature --- -Jonathan Reeve -https://jonreeve.com -#+end_signature") - (setq message-citation-line-format "Je %a, %b %d %Y, %N skribis:\n") - (setq org-msg-posting-style nil) + org-msg-startup "hidestars indent inlineimages" + org-msg-greeting-fmt "\nHi%s,\n\n" + org-msg-default-alternatives '((new . (text html)) + (reply-to-html . (text html)) + (reply-to-text . (text html)))) +;; (setq org-msg-convert-citation t +;; org-msg-signature " + +;; Best, + +;; Jonathan + +;; #+begin_signature +;; -- +;; Jonathan Reeve +;; https://jonreeve.com +;; #+end_signature") + ;; (setq message-citation-line-format "Je %a, %b %d %Y, %N skribis:\n") + ;; (setq org-msg-posting-style nil) ; ) ;; Set browser @@ -572,6 +576,8 @@ https://jonreeve.com :g "" #'org-todo-list ) +(map! :map evil-org-agenda-mode-map "P" 'org-procrastinate) + (map! :map evil-treemacs-state-map "n" 'treemacs-next-line "e" 'treemacs-previous-line) @@ -647,6 +653,15 @@ https://jonreeve.com (message "Aborted.") )) +(defun rename-epub () + " Rename the most recently modified Epub in the /tmp dir with the latest bibtex key. " + (interactive) + (setq most-recent-epub (string-trim-right (shell-command-to-string "ls -t /tmp/*.epub | head -1"))) + (setq dest-epub-filename (string-trim-right (concat bibtex-completion-library-path (bibtex-completion-get-key-bibtex) ".epub"))) + (if (yes-or-no-p (concat "Rename " most-recent-epub " to " dest-epub-filename "?")) + (rename-file most-recent-epub dest-epub-filename) + (message "Aborted.") + )) ;; (use-package! notebook-mode) ;; (use-package! evil-colemak-basics @@ -672,4 +687,8 @@ https://jonreeve.com (set-locale-environment "eo.utf-8") ;; Scala -(add-to-list '+org-babel-mode-alist '(scala . ammonite)) +;; (add-to-list '+org-babel-mode-alist '(scala . ammonite)) + +;; Word wrap issues; possible fix for https://github.com/doomemacs/doomemacs/issues/7133 +(setq +global-word-wrap-mode 'nil) +(setq font-lock-global-modes '(not mu4e-compose-mode)) diff --git a/dotfiles/emacs/doom.d/init.el b/dotfiles/emacs/doom.d/init.el index 65895ec..050dd60 100644 --- a/dotfiles/emacs/doom.d/init.el +++ b/dotfiles/emacs/doom.d/init.el @@ -153,7 +153,7 @@ ;;rst ; ReST in peace ;;ruby ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - (scala +lsp) ; java, but good + ;; (scala +lsp) ; java, but good ;;scheme ; a fully conniving family of lisps (sh +bash +fish) ; she sells {ba,z,fi}sh shells on the C xor ;;solidity ; do you need a blockchain? No. diff --git a/dotfiles/emacs/doom.d/packages.el b/dotfiles/emacs/doom.d/packages.el index c7d97c7..ba79e91 100644 --- a/dotfiles/emacs/doom.d/packages.el +++ b/dotfiles/emacs/doom.d/packages.el @@ -37,7 +37,7 @@ (package! org-roam-bibtex :recipe (:host github :repo "org-roam/org-roam-bibtex")) -(package! org-cite-csl-activate :recipe (:host github :repo "andras-simonyi/org-cite-csl-activate" :files ("*.el"))) +;; (package! org-cite-csl-activate :recipe (:host github :repo "andras-simonyi/org-cite-csl-activate" :files ("*.el"))) (package! org-clock-reminder :recipe (:host github :repo "inickey/org-clock-reminder")) diff --git a/dotfiles/flake.lock b/dotfiles/flake.lock index b59dd39..0c05078 100644 --- a/dotfiles/flake.lock +++ b/dotfiles/flake.lock @@ -1,88 +1,287 @@ { "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixos" - ], - "utils": "utils" + "doom-emacs": { + "flake": false, + "locked": { + "lastModified": 1662497747, + "narHash": "sha256-4n7E1fqda7cn5/F2jTkOnKw1juG6XMS/FI9gqODL3aU=", + "owner": "doomemacs", + "repo": "doomemacs", + "rev": "3853dff5e11655e858d0bfae64b70cb12ef685ac", + "type": "github" }, + "original": { + "owner": "doomemacs", + "repo": "doomemacs", + "rev": "3853dff5e11655e858d0bfae64b70cb12ef685ac", + "type": "github" + } + }, + "doom-snippets": { + "flake": false, "locked": { - "lastModified": 1672349765, - "narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=", + "lastModified": 1694887483, + "narHash": "sha256-KlKhruPSLPSKqUnr5/U65arm16VrY9ORzm+XKNZhpTQ=", + "owner": "doomemacs", + "repo": "snippets", + "rev": "f022984ee1318a4015d5d081b3c3dab5a60dc6ff", + "type": "github" + }, + "original": { + "owner": "doomemacs", + "repo": "snippets", + "type": "github" + } + }, + "emacs-overlay": { + "flake": false, + "locked": { + "lastModified": 1676366521, + "narHash": "sha256-i4UAY8t9Au9SJtsgYppa3NHSVf1YkV6yqnNIQd+Km4g=", "owner": "nix-community", - "repo": "home-manager", - "rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8", + "repo": "emacs-overlay", + "rev": "c16be6de78ea878aedd0292aa5d4a1ee0a5da501", "type": "github" }, "original": { "owner": "nix-community", - "repo": "home-manager", + "repo": "emacs-overlay", + "rev": "c16be6de78ea878aedd0292aa5d4a1ee0a5da501", + "type": "github" + } + }, + "emacs-so-long": { + "flake": false, + "locked": { + "lastModified": 1575031854, + "narHash": "sha256-xIa5zO0ZaToDrec1OFjBK6l39AbA4l/CE4LInVu2hi0=", + "owner": "hlissner", + "repo": "emacs-so-long", + "rev": "ed666b0716f60e8988c455804de24b55919e71ca", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "emacs-so-long", + "type": "github" + } + }, + "evil-escape": { + "flake": false, + "locked": { + "lastModified": 1588439096, + "narHash": "sha256-aB2Ge5o/93B18tPf4fN1c+O46CNh/nOqwLJbox4c8Gw=", + "owner": "hlissner", + "repo": "evil-escape", + "rev": "819f1ee1cf3f69a1ae920e6004f2c0baeebbe077", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "evil-escape", + "type": "github" + } + }, + "evil-markdown": { + "flake": false, + "locked": { + "lastModified": 1626852210, + "narHash": "sha256-HBBuZ1VWIn6kwK5CtGIvHM1+9eiNiKPH0GUsyvpUVN8=", + "owner": "Somelauw", + "repo": "evil-markdown", + "rev": "8e6cc68af83914b2fa9fd3a3b8472573dbcef477", + "type": "github" + }, + "original": { + "owner": "Somelauw", + "repo": "evil-markdown", + "type": "github" + } + }, + "evil-org-mode": { + "flake": false, + "locked": { + "lastModified": 1607203864, + "narHash": "sha256-JxwqVYDN6OIJEH15MVI6XOZAPtUWUhJQWHyzcrUvrFg=", + "owner": "hlissner", + "repo": "evil-org-mode", + "rev": "a9706da260c45b98601bcd72b1d2c0a24a017700", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "evil-org-mode", "type": "github" } }, - "hyprland": { + "evil-quick-diff": { + "flake": false, + "locked": { + "lastModified": 1575189609, + "narHash": "sha256-oGzl1ayW9rIuq0haoiFS7RZsS8NFMdEA7K1BSozgnJU=", + "owner": "rgrinberg", + "repo": "evil-quick-diff", + "rev": "69c883720b30a892c63bc89f49d4f0e8b8028908", + "type": "github" + }, + "original": { + "owner": "rgrinberg", + "repo": "evil-quick-diff", + "type": "github" + } + }, + "explain-pause-mode": { + "flake": false, + "locked": { + "lastModified": 1595842060, + "narHash": "sha256-++znrjiDSx+cy4okFBBXUBkRFdtnE2x+trkmqjB3Njs=", + "owner": "lastquestion", + "repo": "explain-pause-mode", + "rev": "2356c8c3639cbeeb9751744dbe737267849b4b51", + "type": "github" + }, + "original": { + "owner": "lastquestion", + "repo": "explain-pause-mode", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "format-all": { + "flake": false, + "locked": { + "lastModified": 1581716637, + "narHash": "sha256-ul7LCe60W8TIvUmUtZtZRo8489TK9iTPDsLHmzxY57M=", + "owner": "lassik", + "repo": "emacs-format-all-the-code", + "rev": "47d862d40a088ca089c92cd393c6dca4628f87d3", + "type": "github" + }, + "original": { + "owner": "lassik", + "repo": "emacs-format-all-the-code", + "rev": "47d862d40a088ca089c92cd393c6dca4628f87d3", + "type": "github" + } + }, + "home-manager": { "inputs": { - "hyprland-protocols": "hyprland-protocols", "nixpkgs": [ "nixos" - ], - "wlroots": "wlroots", - "xdph": "xdph" + ] }, "locked": { - "lastModified": 1672329990, - "narHash": "sha256-03Zob3Xg7SAnJ7yeGXYkSWNPGXj8UXrKYIdXGMvsisY=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "0baef17a02529dd5fc58eee497737ac28df160c1", + "lastModified": 1698670511, + "narHash": "sha256-jQIu3UhBMPHXzVkHQO1O2gg8SVo5lqAVoC6mOaLQcLQ=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "8e5416b478e465985eec274bc3a018024435c106", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "Hyprland", + "owner": "nix-community", + "repo": "home-manager", "type": "github" } }, - "hyprland-protocols": { - "flake": false, + "nix-doom-emacs": { + "inputs": { + "doom-emacs": "doom-emacs", + "doom-snippets": "doom-snippets", + "emacs-overlay": "emacs-overlay", + "emacs-so-long": "emacs-so-long", + "evil-escape": "evil-escape", + "evil-markdown": "evil-markdown", + "evil-org-mode": "evil-org-mode", + "evil-quick-diff": "evil-quick-diff", + "explain-pause-mode": "explain-pause-mode", + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "format-all": "format-all", + "nix-straight": "nix-straight", + "nixpkgs": "nixpkgs", + "nose": "nose", + "ob-racket": "ob-racket", + "org": "org", + "org-contrib": "org-contrib", + "org-yt": "org-yt", + "php-extras": "php-extras", + "revealjs": "revealjs", + "rotate-text": "rotate-text", + "sln-mode": "sln-mode", + "ts-fold": "ts-fold", + "ws-butler": "ws-butler" + }, "locked": { - "lastModified": 1670703428, - "narHash": "sha256-4KUW5SKR0Y9uaYGcYwy53YJ3B/sgiprCL4fRGO+mpOA=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "d0d6db8cb5bef6d93ca3ad8fb2124964173396da", + "lastModified": 1697814738, + "narHash": "sha256-mwQmykamvRuHmO6I2VTm8+TOIhhmgy2g5YrMjoCHawY=", + "owner": "nix-community", + "repo": "nix-doom-emacs", + "rev": "c1c99cf41694440d76e31126dc394f52faeb691e", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", + "owner": "nix-community", + "repo": "nix-doom-emacs", "type": "github" } }, - "hyprland-protocols_2": { + "nix-straight": { "flake": false, "locked": { - "lastModified": 1670703428, - "narHash": "sha256-4KUW5SKR0Y9uaYGcYwy53YJ3B/sgiprCL4fRGO+mpOA=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "d0d6db8cb5bef6d93ca3ad8fb2124964173396da", + "lastModified": 1694361489, + "narHash": "sha256-kjDp+j6OtrmqbtjQB5uuOtjS08+kgJQuxFqhWE1Y9Rw=", + "owner": "nix-community", + "repo": "nix-straight.el", + "rev": "748be99b84be0b130e946288099806a0f16d6e57", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", + "owner": "nix-community", + "repo": "nix-straight.el", "type": "github" } }, "nixos": { "locked": { - "lastModified": 1672262501, - "narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", "type": "github" }, "original": { @@ -93,11 +292,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1672322014, - "narHash": "sha256-HEYUb2pxm9SUgqvg8eDpFUl6UPXmd7USNWAew115zL4=", + "lastModified": 1698053470, + "narHash": "sha256-sP8D/41UiwC2qn0X40oi+DfuVzNHMROqIWdSdCI/AYA=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "e2f9c6f7360f3e0f7b0bc2a3e7193a290c5d4c81", + "rev": "80d98a7d55c6e27954a166cb583a41325e9512d7", "type": "github" }, "original": { @@ -105,66 +304,233 @@ "type": "indirect" } }, + "nixos-old": { + "locked": { + "lastModified": 1681897251, + "narHash": "sha256-TA/LgknEAOXUbb6WBBHI2krOS0qoP5lakxikFP6AnAQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8af8e36b65ff77e70899e6349c4e8af7f5d2a0e8", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "8af8e36", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1695806987, + "narHash": "sha256-fX5kGs66NZIxCMcpAGIpxuftajHL8Hil1vjHmjjl118=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f3dab3509afca932f3f4fd0908957709bb1c1f57", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixpkgs-unstable", + "type": "indirect" + } + }, + "nose": { + "flake": false, + "locked": { + "lastModified": 1400604510, + "narHash": "sha256-daEi8Kta1oGaDEmUUDDQMahTTPOpvNpDKk22rlr7cB0=", + "owner": "emacsattic", + "repo": "nose", + "rev": "f8528297519eba911696c4e68fa88892de9a7b72", + "type": "github" + }, + "original": { + "owner": "emacsattic", + "repo": "nose", + "type": "github" + } + }, + "ob-racket": { + "flake": false, + "locked": { + "lastModified": 1584656173, + "narHash": "sha256-rBUYDDCXb+3D4xTPQo9UocbTPZ32kWV1Uya/1DmZknU=", + "owner": "xchrishawk", + "repo": "ob-racket", + "rev": "83457ec9e1e96a29fd2086ed19432b9d75787673", + "type": "github" + }, + "original": { + "owner": "xchrishawk", + "repo": "ob-racket", + "type": "github" + } + }, + "org": { + "flake": false, + "locked": { + "lastModified": 1695726851, + "narHash": "sha256-qgbjspklSoI8M3cbCJOcUdjuijRgsL/+PSyEOW9VX4I=", + "owner": "emacs-straight", + "repo": "org-mode", + "rev": "aa9177e1a8b039c357d369c1c9aaab710bb247a9", + "type": "github" + }, + "original": { + "owner": "emacs-straight", + "repo": "org-mode", + "type": "github" + } + }, + "org-contrib": { + "flake": false, + "locked": { + "lastModified": 1694946041, + "narHash": "sha256-X/HFG6NZe5BY00KvGbcsIuf9R6Lg8x7Uhd0Y5+Q3qZU=", + "owner": "emacsmirror", + "repo": "org-contrib", + "rev": "5eabbf22bdd4523c922a30787e98ee66c24221aa", + "type": "github" + }, + "original": { + "owner": "emacsmirror", + "repo": "org-contrib", + "type": "github" + } + }, + "org-yt": { + "flake": false, + "locked": { + "lastModified": 1527381913, + "narHash": "sha256-dzQ6B7ryzatHCTLyEnRSbWO0VUiX/FHYnpHTs74aVUs=", + "owner": "TobiasZawada", + "repo": "org-yt", + "rev": "40cc1ac76d741055cbefa13860d9f070a7ade001", + "type": "github" + }, + "original": { + "owner": "TobiasZawada", + "repo": "org-yt", + "type": "github" + } + }, + "php-extras": { + "flake": false, + "locked": { + "lastModified": 1573312690, + "narHash": "sha256-r4WyVbzvT0ra4Z6JywNBOw5RxOEYd6Qe2IpebHXkj1U=", + "owner": "arnested", + "repo": "php-extras", + "rev": "d410c5af663c30c01d461ac476d1cbfbacb49367", + "type": "github" + }, + "original": { + "owner": "arnested", + "repo": "php-extras", + "type": "github" + } + }, + "revealjs": { + "flake": false, + "locked": { + "lastModified": 1695738029, + "narHash": "sha256-Z9c9Q41jMkj/DyXOiZYyIa7Gmn8VB8yauTyWrSsT+ps=", + "owner": "hakimel", + "repo": "reveal.js", + "rev": "88fbfc5751ad01e3f6adee5819eabeb9e73c3757", + "type": "github" + }, + "original": { + "owner": "hakimel", + "repo": "reveal.js", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "hyprland": "hyprland", + "nix-doom-emacs": "nix-doom-emacs", "nixos": "nixos", - "nixos-hardware": "nixos-hardware" + "nixos-hardware": "nixos-hardware", + "nixos-old": "nixos-old" } }, - "utils": { + "rotate-text": { + "flake": false, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "lastModified": 1322962747, + "narHash": "sha256-SOeOgSlcEIsKhUiYDJv0p+mLUb420s9E2BmvZQvZ0wk=", + "owner": "debug-ito", + "repo": "rotate-text.el", + "rev": "48f193697db996855aee1ad2bc99b38c6646fe76", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "debug-ito", + "repo": "rotate-text.el", "type": "github" } }, - "wlroots": { + "sln-mode": { "flake": false, "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1671723353, - "narHash": "sha256-G1jiI0SA7eiZusO+iJytErMRNbKbwqJJJGL+sNoBNoQ=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "b28a9afd4b0b86e9a66a40f6b44b69f59947b7d6", - "type": "gitlab" + "lastModified": 1423727528, + "narHash": "sha256-XqkqPyEJuTtFslOz1fpTf/Klbd/zA7IGpzpmum/MGao=", + "owner": "sensorflo", + "repo": "sln-mode", + "rev": "0f91d1b957c7d2a7bab9278ec57b54d57f1dbd9c", + "type": "github" }, "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "type": "gitlab" + "owner": "sensorflo", + "repo": "sln-mode", + "type": "github" } }, - "xdph": { - "inputs": { - "hyprland-protocols": "hyprland-protocols_2", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ] + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "ts-fold": { + "flake": false, + "locked": { + "lastModified": 1695278494, + "narHash": "sha256-O4NcUC1u08W8ZslqoA/i+iTaLotKwheURXQWBxLLMFc=", + "owner": "jcs-elpa", + "repo": "ts-fold", + "rev": "70b2c79ff4daa7351d4e2917b0343b9a18d4d4f2", + "type": "github" + }, + "original": { + "owner": "jcs-elpa", + "repo": "ts-fold", + "type": "github" + } + }, + "ws-butler": { + "flake": false, "locked": { - "lastModified": 1671837878, - "narHash": "sha256-OmFDyktTc/l+3wHboHeFpAQgPt3r7jjqZf8MrwuUGMo=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "e47f4cec698080768821b271510985ab94a37e91", + "lastModified": 1634511126, + "narHash": "sha256-c0y0ZPtxxICPk+eaNbbQf6t+FRCliNY54CCz9QHQ8ZI=", + "owner": "hlissner", + "repo": "ws-butler", + "rev": "572a10c11b6cb88293de48acbb59a059d36f9ba5", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", + "owner": "hlissner", + "repo": "ws-butler", "type": "github" } } diff --git a/dotfiles/flake.nix b/dotfiles/flake.nix index 8ece6df..521aa37 100644 --- a/dotfiles/flake.nix +++ b/dotfiles/flake.nix @@ -6,27 +6,26 @@ # url = "/home/jon/Code/home-manager"; inputs.nixpkgs.follows = "nixos"; }; - # nix-doom-emacs.url = "github:nix-community/nix-doom-emacs"; + nix-doom-emacs.url = "github:nix-community/nix-doom-emacs"; # nixos-hardware.url = github:NixOS/nixos-hardware/master; nixos.url = "nixpkgs/nixos-unstable"; # Old Nixpkgs for mu - # nixos-old.url = "nixpkgs/db93862a2c777135e0af3e9c7b0bbcba642c8343"; + nixos-old.url = "nixpkgs/8af8e36"; # jupyterWith.url = "github:tweag/jupyterWith"; # nixos.url = "github:nixos/nixpkgs"; # nixos.url = "/home/jon/Code/nixpkgs"; - hyprland = { - url = "github:hyprwm/Hyprland"; - inputs.nixpkgs.follows = "nixos"; - }; # emacs-overlay.url = "github:nix-community/emacs-overlay"; }; - outputs = { self, nixos, nixos-hardware, home-manager, hyprland }: - { + outputs = { self, nixos, nixos-hardware, home-manager, nix-doom-emacs, nixos-old }: + let overlays = [ + (final: prev: {mu = nixos-old.legacyPackages.${prev.system}.mu;}) + ]; + in { nixosConfigurations.jon-laptop = nixos.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./configuration.nix - hyprland.nixosModules.default # ({...}: { nixpkgs.overlays = [ (import self.inputs.emacs-overlay) ];}) + ({...}: { nixpkgs.overlays = overlays;}) # ./cachix.nix # TODO. This makes the kernel rebuild, apparently # nixos-hardware.nixosModules.dell-xps-13-9310 @@ -40,7 +39,7 @@ home-manager.users.jon = { pkgs, ... }: { imports = [ ./home.nix # ./nix-doom-emacs.nix - # nix-doom-emacs.hmModule + nix-doom-emacs.hmModule ]; }; } diff --git a/dotfiles/home.nix b/dotfiles/home.nix index 9cee375..7f7507c 100644 --- a/dotfiles/home.nix +++ b/dotfiles/home.nix @@ -10,9 +10,9 @@ let scripts = "/home/jon/Dotfiles/scripts"; maildir = "/home/jon/Mail"; # Preferences - # font = "Monoid"; + font = "Victor Mono"; # font = "Nova Mono"; - font = "Fantasque Sans Mono"; + # font = "Fantasque Sans Mono"; backgroundColor = "#243442"; # Blue steel foregroundColor = "#deedf9"; # Light blue warningColor = "#e23131"; # Reddish @@ -20,7 +20,7 @@ let brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; in { - # imports = [ ./sway.nix ]; + imports = [ ./nix-doom-emacs.nix ]; accounts.email = { maildirBasePath = "${maildir}"; @@ -146,9 +146,9 @@ in mbsync = { enable = true; }; - mu = { - enable = true; - }; + # mu = { + # enable = true; + # }; neovim = { enable = true; # package = pkgs.neovim; @@ -307,17 +307,15 @@ in nushell = { enable = true; configFile.source = ./config.nu; - envFile.text = ''let-env STARSHIP_SHELL = "nushell"''; }; starship = { enable = true; enableFishIntegration = true; - # Don't enable nushell integration now, since it runs starship init nu, - # and that has an issue now: https://github.com/starship/starship/issues/4507 - enableNushellIntegration = false; + enableNushellIntegration = true; }; zoxide = { enable = true; + enableNushellIntegration = true; }; termite = { enable = true; @@ -482,7 +480,7 @@ in }; fonts = { completion.category = "11pt monospace"; - default_family = "${font}, Terminus, Monospace, monospace, Fixed"; + default_family = "${font}"; default_size = "12pt"; }; hints.chars = "arstdhneio"; @@ -580,6 +578,15 @@ in }; pueue = { enable = true; + settings = { + shared = { + pueue_directory = "~/.local/share/pueue"; + }; + client = {}; + daemon = { + default_parallel_tasks = 2; + }; + }; }; screen-locker = { enable = false; @@ -622,20 +629,23 @@ in pkgs.gnome.gnome-keyring # Same ]; file = { - ".doom.d/" = { - source = ./emacs/doom.d; - recursive = true; - onChange = "$HOME/.emacs.d/bin/doom sync"; - }; + # ".doom.d/" = { + # source = ./emacs/doom.d; + # recursive = true; + # onChange = "$HOME/.emacs.d/bin/doom sync"; + # }; ".local/share/applications/org-protocol.desktop".text = '' - [Desktop Entry] - Name=Org-Protocol - Exec=emacsclient %u - Icon=emacs-icon - Type=Application - Terminal=false - MimeType=x-scheme-handler/org-protocol - ''; +[Desktop Entry] +Name=org-protocol +Comment=Intercept calls from emacsclient to trigger custom actions +Categories=Other; +Keywords=org-protocol; +Icon=emacs +Type=Application +Exec=emacsclient -- %u +Terminal=false +StartupWMClass=Emacs +MimeType=x-scheme-handler/org-protocol;''; #".emacs.d/init.el".text = '' # (load "default.el") #''; @@ -669,11 +679,12 @@ in systemd.user = { services = { - # protonmail = { - # Unit = { Description = "Protonmail Bridge"; }; - # Service.ExecStart = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive"; - # Install.WantedBy = [ "default.target" ]; - # }; + # Disabling this in favor of system-wide service? + protonmail = { + Unit = { Description = "Protonmail Bridge"; }; + Service.ExecStart = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive"; + Install.WantedBy = [ "default.target" ]; + }; dwall = { Unit = { Description = "Set dynamic wallpaper using Dwall"; @@ -810,6 +821,9 @@ in }; }; startup = [ + # Fix for slow GTK applications; see https://github.com/swaywm/sway/wiki#gtk-applications-take-20-seconds-to-start + { command = "exec systemctl --user import-environment"; } + # { command = "exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"; } { command = "exec swaybg -i ~/Bildujo/Ekranfonoj/yz6ggt7m18l41.png -o '*' -m fill"; } { command = "exec ${pkgs.pywal}/bin/wal --theme base16-nord"; } { command = "exec megasync"; } diff --git a/dotfiles/python.nix b/dotfiles/python.nix index cfc4ef6..c14e29c 100644 --- a/dotfiles/python.nix +++ b/dotfiles/python.nix @@ -12,11 +12,11 @@ # python-language-server # Spacemacs integration flake8 # Syntax checking for emacs scikit-learn - altair - vega - vega_datasets + # altair + # vega + # vega_datasets jupyter - # jupyterlab + jupyterlab # jupytext # tensorflow nltk diff --git a/scripts/aspell.en.pws b/scripts/aspell.en.pws index f5d5647..5219de1 100644 --- a/scripts/aspell.en.pws +++ b/scripts/aspell.en.pws @@ -1,3 +1,4 @@ +annotatable bigrams constructivism constructivist diff --git a/scripts/downloadBook.py b/scripts/downloadBook.py index 0bb510e..1ad53f3 100755 --- a/scripts/downloadBook.py +++ b/scripts/downloadBook.py @@ -84,4 +84,4 @@ def main(): if __name__ == "__main__": main() - destFile = "/home/jon/Dokumentujo/Papers/library.bib" + # destFile = "/home/jon/Dokumentujo/Papers/library.bib"