From 9292548d543a053d324510306ec3ff935de99501 Mon Sep 17 00:00:00 2001 From: Emmet Date: Mon, 8 Jul 2024 10:01:54 -0500 Subject: [PATCH 1/4] Trying stt with whisper --- flake.nix | 3 ++- profiles/work/home.nix | 2 ++ system/hardware-configuration.nix | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index c18ddfc..a3568f1 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ bootMode = "uefi"; # uefi or bios bootMountPath = "/boot"; # mount path for efi boot partition; only used for uefi boot mode grubDevice = ""; # device identifier for grub; only used for legacy (bios) boot mode + gpuType = "amd"; # amd, intel or nvidia; only makes some slight mods for amd at the moment }; # ----- USER SETTINGS ----- # @@ -48,7 +49,7 @@ # create patched nixpkgs nixpkgs-patched = - (import inputs.nixpkgs { system = systemSettings.system; }).applyPatches { + (import inputs.nixpkgs { system = systemSettings.system; rocmSupport = (if systemSettings.gpu == "amd" then true else false); }).applyPatches { name = "nixpkgs-patched"; src = inputs.nixpkgs; patches = [ ./patches/emacs-no-version-check.patch ]; diff --git a/profiles/work/home.nix b/profiles/work/home.nix index fa6fae4..af0cfd4 100644 --- a/profiles/work/home.nix +++ b/profiles/work/home.nix @@ -58,6 +58,8 @@ numbat element-desktop-wayland + openai-whisper-cpp + wine bottles # The following requires 64-bit FL Studio (FL64) to be installed to a bottle diff --git a/system/hardware-configuration.nix b/system/hardware-configuration.nix index daf2657..34005b9 100644 --- a/system/hardware-configuration.nix +++ b/system/hardware-configuration.nix @@ -12,7 +12,7 @@ boot.initrd.kernelModules = [ "radeon" ]; boot.kernelModules = [ "kvm-amd" "radeon" ]; boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; - hardware.opengl.extraPackages = [ pkgs.amdvlk ]; + hardware.opengl.extraPackages = [ pkgs.amdvlk pkgs.rocmPackages.clr.icd ]; hardware.opengl.extraPackages32 = [ pkgs.driversi686Linux.amdvlk ]; systemd.tmpfiles.rules = [ From 43f700474929915a2339969998f354e117cd8cd5 Mon Sep 17 00:00:00 2001 From: Emmet Date: Mon, 8 Jul 2024 10:02:25 -0500 Subject: [PATCH 2/4] Various org mode and emacs fixes --- user/app/doom-emacs/config.el | 50 +++++++++++++++------------------- user/app/doom-emacs/doom.org | 51 +++++++++++++++-------------------- 2 files changed, 42 insertions(+), 59 deletions(-) diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index e4ce51f..b03e110 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -47,6 +47,8 @@ )) ) +(add-to-list 'default-frame-alist '(inhibit-double-buffering . t)) + ;; Icons in completion buffers (add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup) (all-the-icons-completion-mode) @@ -57,6 +59,8 @@ ;; Beacon shows where the cursor is, even when fast scrolling (setq beacon-mode t) +(setq company-idle-delay 0.05) + ;; Quicker window management keybindings (bind-key* "C-j" #'evil-window-down) (bind-key* "C-k" #'evil-window-up) @@ -238,7 +242,10 @@ ;;;------ Org mode configuration ------;;; ;; Set default org directory -(setq org-directory "~/.Org") +(setq org-directory "~/Org") +(setq org-attach-directory "~/Org/.attach") +(setq org-attach-id-dir "~/Org/.attach") +(setq org-id-locations-file "~/Org/.orgids") (remove-hook 'after-save-hook #'+literate|recompile-maybe) (set-company-backend! 'org-mode nil) @@ -600,19 +607,13 @@ If the path from LINK does not exist, nil is returned." input-str))))))) ;; Org transclusion -(use-package! org-transclusion - :after org - :init - (map! - :map global-map "" #'org-transclusion-add - :leader - :prefix "n" - :desc "Org Transclusion Mode" "t" #'org-transclusion-mode)) -(map! :leader :prefix "n" "l" #'org-transclusion-live-sync-start) - -(setq org-transclusion-exclude-elements '(property-drawer keyword)) - -(add-hook 'org-mode-hook #'org-transclusion-mode) +(require 'org-transclusion) +(after! org + (map! :map global-map "" #'org-transclusion-add :leader :prefix "n" :desc "Org Transclusion Mode" "t" #'org-transclusion-mode) + (map! :leader :prefix "n" "l" #'org-transclusion-live-sync-start) + (setq org-transclusion-exclude-elements '(property-drawer keyword)) + (add-hook 'org-mode-hook #'org-transclusion-mode) +) (defun org-jekyll-new-post () (interactive) @@ -981,8 +982,7 @@ If the path from LINK does not exist, nil is returned." (add-load-path! "~/.emacs.d/org-nursery/lisp") (require 'org-roam-dblocks) -(use-package org-roam-dblocks - :hook (org-mode . org-roam-dblocks-autoupdate-mode)) +(add-hook 'org-mode-hook 'org-roam-dblocks-autoupdate-mode) (setq org-id-extra-files 'org-agenda-text-search-extra-files) @@ -1036,8 +1036,8 @@ If the path from LINK does not exist, nil is returned." org-agenda-skip-deadline-if-done t org-agenda-skip-scheduled-if-done t org-agenda-skip-scheduled-if-deadline-is-shown t - org-agenda-skip-timestamp-if-deadline-is-shown t) - + org-agenda-skip-timestamp-if-deadline-is-shown t + org-log-into-drawer t) ;; Custom styles for dates in agenda (custom-set-faces! @@ -1491,20 +1491,12 @@ If the path from LINK does not exist, nil is returned." "f u" #'sudo-edit-find-file) ;;;-- LSP stuff ;;;-- -(use-package lsp-mode - :ensure t) - -(use-package nix-mode - :hook (nix-mode . lsp-deferred) - :ensure t) +(require 'lsp-mode) +(require 'nix-mode) +(require 'gdscript-mode) (setq lsp-java-workspace-dir (concat user-home-directory "/.local/share/doom/java-workspace")) -(require 'gdscript-mode) -(use-package gdscript-mode - :hook (gdscript-mode . lsp-deferred) - :ensure t) - (setq lsp-treemacs-deps-position-params '((side . right) (slot . 1) diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index ff15424..d8e25a1 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -110,6 +110,8 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu )) ) +(add-to-list 'default-frame-alist '(inhibit-double-buffering . t)) + ;; Icons in completion buffers (add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup) (all-the-icons-completion-mode) @@ -120,6 +122,8 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu ;; Beacon shows where the cursor is, even when fast scrolling (setq beacon-mode t) +(setq company-idle-delay 0.05) + ;; Quicker window management keybindings (bind-key* "C-j" #'evil-window-down) (bind-key* "C-k" #'evil-window-up) @@ -308,7 +312,10 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu ;;;------ Org mode configuration ------;;; ;; Set default org directory -(setq org-directory "~/.Org") +(setq org-directory "~/Org") +(setq org-attach-directory "~/Org/.attach") +(setq org-attach-id-dir "~/Org/.attach") +(setq org-id-locations-file "~/Org/.orgids") (remove-hook 'after-save-hook #'+literate|recompile-maybe) (set-company-backend! 'org-mode nil) @@ -727,19 +734,13 @@ exit *** Org Transclusion #+BEGIN_SRC emacs-lisp :tangle config.el ;; Org transclusion -(use-package! org-transclusion - :after org - :init - (map! - :map global-map "" #'org-transclusion-add - :leader - :prefix "n" - :desc "Org Transclusion Mode" "t" #'org-transclusion-mode)) -(map! :leader :prefix "n" "l" #'org-transclusion-live-sync-start) - -(setq org-transclusion-exclude-elements '(property-drawer keyword)) - -(add-hook 'org-mode-hook #'org-transclusion-mode) +(require 'org-transclusion) +(after! org + (map! :map global-map "" #'org-transclusion-add :leader :prefix "n" :desc "Org Transclusion Mode" "t" #'org-transclusion-mode) + (map! :leader :prefix "n" "l" #'org-transclusion-live-sync-start) + (setq org-transclusion-exclude-elements '(property-drawer keyword)) + (add-hook 'org-mode-hook #'org-transclusion-mode) +) #+END_SRC *** Org Jekyll @@ -1138,9 +1139,7 @@ exit #+BEGIN_SRC emacs-lisp :tangle config.el (add-load-path! "~/.emacs.d/org-nursery/lisp") (require 'org-roam-dblocks) -(use-package org-roam-dblocks - :hook (org-mode . org-roam-dblocks-autoupdate-mode)) - +(add-hook 'org-mode-hook 'org-roam-dblocks-autoupdate-mode) #+END_SRC *** Org Roam Export Setup #+BEGIN_SRC emacs-lisp :tangle config.el @@ -1205,8 +1204,8 @@ On Wayland, EAF doesn't work. org-agenda-skip-deadline-if-done t org-agenda-skip-scheduled-if-done t org-agenda-skip-scheduled-if-deadline-is-shown t - org-agenda-skip-timestamp-if-deadline-is-shown t) - + org-agenda-skip-timestamp-if-deadline-is-shown t + org-log-into-drawer t) ;; Custom styles for dates in agenda (custom-set-faces! @@ -1760,20 +1759,12 @@ I don't have this active right now since it's kinda weird with pgtk... ** LSP #+BEGIN_SRC emacs-lisp :tangle config.el ;;;-- LSP stuff ;;;-- -(use-package lsp-mode - :ensure t) - -(use-package nix-mode - :hook (nix-mode . lsp-deferred) - :ensure t) +(require 'lsp-mode) +(require 'nix-mode) +(require 'gdscript-mode) (setq lsp-java-workspace-dir (concat user-home-directory "/.local/share/doom/java-workspace")) -(require 'gdscript-mode) -(use-package gdscript-mode - :hook (gdscript-mode . lsp-deferred) - :ensure t) - (setq lsp-treemacs-deps-position-params '((side . right) (slot . 1) From 39bd03e025b1aa43fd73f2c165e37cd1e6000740 Mon Sep 17 00:00:00 2001 From: Emmet Date: Mon, 8 Jul 2024 10:02:53 -0500 Subject: [PATCH 3/4] Updated hyprland screen lock behavior --- user/wm/hyprland/hyprland.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix index b2f5860..966d8fe 100644 --- a/user/wm/hyprland/hyprland.nix +++ b/user/wm/hyprland/hyprland.nix @@ -607,11 +607,16 @@ in } listener { - timeout = 300 # in seconds + timeout = 150 # in seconds on-timeout = loginctl lock-session } listener { - timeout = 600 # in seconds + timeout = 165 # in seconds + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on + } + listener { + timeout = 7200 # in seconds on-timeout = systemctl suspend } ''; From ef32ac7a28c98c5a2d108946f81d7328ff889aa4 Mon Sep 17 00:00:00 2001 From: Emmet Date: Mon, 8 Jul 2024 11:03:07 -0500 Subject: [PATCH 4/4] Updated system --- flake.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index c161d7c..8e893be 100644 --- a/flake.lock +++ b/flake.lock @@ -117,11 +117,11 @@ "blocklist-hosts": { "flake": false, "locked": { - "lastModified": 1719456570, - "narHash": "sha256-FS9+w+9QPBd6hCtX7C5x/xm4nGCA0lOtYgjefkQNbbg=", + "lastModified": 1720371934, + "narHash": "sha256-30Hl4Llh1wetlW3au2/bRR+/m5P9D7QvLGFWAYHKbKs=", "owner": "StevenBlack", "repo": "hosts", - "rev": "0f8be09978187ba0e4eab2a9e0dcde88f358f1dc", + "rev": "67448bdb863d266fd6031f1330c8958d84eba1a2", "type": "github" }, "original": { @@ -451,11 +451,11 @@ ] }, "locked": { - "lastModified": 1717476296, - "narHash": "sha256-ScHe38Tr+TxGURC17kby4mIIxOG3aJvZWXzPM79UnEk=", + "lastModified": 1719827415, + "narHash": "sha256-pvh+1hStXXAZf0sZ1xIJbWGx4u+OGBC1rVx6Wsw0fBw=", "owner": "nix-community", "repo": "home-manager", - "rev": "095ef64aa3b2ab4a4f1bf07f29997e21e3a5576a", + "rev": "f2e3c19867262dbe84fdfab42467fc8dd83a2005", "type": "github" }, "original": { @@ -472,11 +472,11 @@ ] }, "locked": { - "lastModified": 1719677234, - "narHash": "sha256-qO9WZsj/0E6zcK4Ht1y/iJ8XfwbBzq7xdqhBh44OP/M=", + "lastModified": 1720327769, + "narHash": "sha256-kAsg3Lg4YKKpGw+f1W2s5hzjP8B0y/juowvjK8utIag=", "owner": "nix-community", "repo": "home-manager", - "rev": "36317d4d38887f7629876b0e43c8d9593c5cc48d", + "rev": "6b7ce96f34b324e4e104abc30d06955d216bac71", "type": "github" }, "original": { @@ -863,11 +863,11 @@ "nmd": "nmd_2" }, "locked": { - "lastModified": 1710434231, - "narHash": "sha256-yrWnsG28518tbIapJWiluweHORuuIwAQrA8lga0Sqlw=", + "lastModified": 1720396533, + "narHash": "sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q=", "owner": "nix-community", "repo": "nix-on-droid", - "rev": "2d93311c4f3f300154d2085e4b4b1d550237da92", + "rev": "f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25", "type": "github" }, "original": { @@ -896,11 +896,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719506693, - "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "type": "github" }, "original": { @@ -927,27 +927,27 @@ }, "nixpkgs-for-bootstrap": { "locked": { - "lastModified": 1708105575, - "narHash": "sha256-sS4AItZeUnAei6v8FqxNlm+/27MPlfoGym/TZP0rmH0=", + "lastModified": 1720244366, + "narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d1817869c47682a6bee85b5b0a6537b6c0fba26", + "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d1817869c47682a6bee85b5b0a6537b6c0fba26", + "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", "type": "github" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1719234068, - "narHash": "sha256-1AjSIedDC/aERt24KsCUftLpVppW61S7awfjGe7bMio=", + "lastModified": 1719957072, + "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "90bd1b26e23760742fdcb6152369919098f05417", + "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", "type": "github" }, "original": { @@ -1351,11 +1351,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1719627476, - "narHash": "sha256-LBfULF+2sCaWmkjmj1LkkGrAS/E9ZdXU1A5wWKjt9p0=", + "lastModified": 1720405186, + "narHash": "sha256-7D57KwmTIbsopE/1g8hFeIbVoeJGgU3wfuGYvTlNQG4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "5be53be9e5c766fc72fc5d65ba8a566cc0c3217f", + "rev": "f0ca58b37ff4179ce4587589c32205764d9b4a4f", "type": "github" }, "original": {