diff --git a/ext/doom/config.el b/ext/doom/config.el index 35699c9..71be1ab 100644 --- a/ext/doom/config.el +++ b/ext/doom/config.el @@ -179,5 +179,78 @@ (centaur-tabs-local-mode)))) ) +;; cape ;;;;; + +(use-package! cape) + +;; (after! company +;; (setq-default company-frontends '(company-preview-frontend))) + +(use-package! codeium + :after cape + :init + ;; use globally + (add-to-list 'completion-at-point-functions #'codeium-completion-at-point) + ;; or on a hook + ;; (add-hook 'python-mode-hook + ;; (lambda () + ;; (setq-local completion-at-point-functions '(codeium-completion-at-point)))) + + ;; if you want multiple completion backends, use cape (https://github.com/minad/cape): + ;; (add-hook 'python-mode-hook + ;; (lambda () + ;; (setq-local completion-at-point-functions + ;; (list (cape-super-capf #'codeium-completion-at-point #'lsp-completion-at-point))))) + ;; an async company-backend is coming soon! + + ;; codeium-completion-at-point is autoloaded, but you can + ;; optionally set a timer, which might speed up things as the + ;; codeium local language server takes ~0.2s to start up + ;; (add-hook 'emacs-startup-hook + ;; (lambda () (run-with-timer 0.1 nil #'codeium-init))) + + ;; :defer t ;; lazy loading, if you want + :config + (setq use-dialog-box nil) ;; do not use popup boxes + + ;; if you don't want to use customize to save the api-key + ;; (setq codeium/metadata/api_key "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") + ;; (setq codeium/metadata/api_key (with-temp-buffer (insert-file-contents "~/.codeium") + ;; (buffer-string))) + + (defalias 'my/codeium-complete + (cape-interacive-capf #'codeium-completion-at-point)) + + (map! :localleader + :map evil-normal-state-map + "c e" #'my/codeium-complete) + + ;; get codeium status in the modeline + (setq codeium-mode-line-enable + (lambda (api) (not (memq api '(CancelRequest Heartbeat AcceptCompletion))))) + (add-to-list 'mode-line-format '(:eval (car-safe codeium-mode-line)) t) + ;; alternatively for a more extensive mode-line + ;; (add-to-list 'mode-line-format '(-50 "" codeium-mode-line) t) + + ;; use M-x codeium-diagnose to see apis/fields that would be sent to the local language server + (setq codeium-api-enabled + (lambda (api) + (memq api '(GetCompletions Heartbeat CancelRequest GetAuthToken RegisterUser auth-redirect AcceptCompletion)))) + ;; you can also set a config for a single buffer like this: + ;; (add-hook 'python-mode-hook + ;; (lambda () + ;; (setq-local codeium/editor_options/tab_size 4))) + + ;; You can overwrite all the codeium configs! + ;; for example, we recommend limiting the string sent to codeium for better performance + (defun my-codeium/document/text () + (buffer-substring-no-properties (max (- (point) 3000) (point-min)) (min (+ (point) 1000) (point-max)))) + ;; if you change the text, you should also change the cursor_offset + ;; warning: this is measured by UTF-8 encoded bytes + (defun my-codeium/document/cursor_offset () + (codeium-utf8-byte-length + (buffer-substring-no-properties (max (- (point) 3000) (point-min)) (point)))) + (setq codeium/document/text 'my-codeium/document/text) + (setq codeium/document/cursor_offset 'my-codeium/document/cursor_offset)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/ext/doom/init.el b/ext/doom/init.el index 5b9ccc5..be3dedb 100644 --- a/ext/doom/init.el +++ b/ext/doom/init.el @@ -49,7 +49,7 @@ ;;unicode ; extended unicode support for various languages (vc-gutter +diff-hl - +pretty) ; vcs diff in the fringe + +pretty) ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB (window-select ; visually switch windows +numbers) @@ -97,7 +97,7 @@ ;;collab ; buffers with friends ;;debugger ; FIXME stepping through code, to help you add bugs direnv - ;;docker + (docker +lsp) ;;editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) @@ -213,5 +213,5 @@ (default +bindings +smartparens)) (after! doom-cli-env - ;; Allow SSH-related environment variables to be set in persistent configuration. - (add-to-list 'doom-env-allow "^SSH_")) + ;; Allow SSH-related environment variables to be set in persistent configuration. + (add-to-list 'doom-env-allow "^SSH_")) diff --git a/ext/doom/packages.el b/ext/doom/packages.el index 0a4db0e..df7cc58 100644 --- a/ext/doom/packages.el +++ b/ext/doom/packages.el @@ -38,8 +38,16 @@ ;(package! builtin-package :recipe (:branch "develop")) ;; Use `:pin' to specify a particular commit to install. + +;; tabs (package! centaur-tabs) + +;; nix + (package! nixpkgs-fmt) +;; codeium +(package! codeium :recipe (:host github :repo "Exafunction/codeium.el")) +(package! cape) ;; Doom's packages are pinned to a specific commit and updated from release to ;; release. The `unpin!' macro allows you to unpin single packages... diff --git a/flake.lock b/flake.lock index 7a8b4a0..9413f8c 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1697721991, - "narHash": "sha256-Sjm7WaD+zLi9R7x8QKa9HGkizFQXvWGo18WlQtNPPtw=", + "lastModified": 1698155728, + "narHash": "sha256-PUJ40o/0LyMEgSBEfLVyPA0K3gQnPYQDq9dW9nCOU9M=", "owner": "nix-community", "repo": "disko", - "rev": "c24c3a902935321e1dfa1ca587e66f47edf79faf", + "rev": "8c5d52db5690c72406b0cb13a5ac8554a287c93a", "type": "github" }, "original": { @@ -31,11 +31,11 @@ ] }, "locked": { - "lastModified": 1697799469, - "narHash": "sha256-9KT+HBqy/wZZ04FDo3Kovjr/utjnleKz4FTo/sbdr8Y=", + "lastModified": 1698341451, + "narHash": "sha256-l86yjvyaRIje0t++PuNTlBPLcyxf2/lZWrp4NbctgLY=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "4a09e468458ee95f18c162e69f3d667686fee02a", + "rev": "723d8ec014852d74bc04769c5b47446d5eee5a1d", "type": "github" }, "original": { @@ -159,11 +159,11 @@ ] }, "locked": { - "lastModified": 1697340827, - "narHash": "sha256-XlrR68N7jyaZ0bs8TPrhqcWG0IPG3pbjrKzJMpYOsos=", + "lastModified": 1697946153, + "narHash": "sha256-7k7qIwWLaYPgQ4fxmEdew3yCffhK6rM4I4Jo3X/79DA=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "29977d0796c058bbcfb2df5b18eb5badf1711007", + "rev": "5a2006282caaf32663cdcd582c5b18809c7d7d8d", "type": "github" }, "original": { @@ -216,11 +216,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1697456312, - "narHash": "sha256-roiSnrqb5r+ehnKCauPLugoU8S36KgmWraHgRqVYndo=", + "lastModified": 1698134075, + "narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ca012a02bf8327be9e488546faecae5e05d7d749", + "rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4", "type": "github" }, "original": { @@ -232,11 +232,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1697655685, - "narHash": "sha256-79Kuv+QdgsVc+rkibuAgWHnh8IXrLBTOKg5nM0Qvux0=", + "lastModified": 1698288402, + "narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "80c1aab725151632ddc2a20caeb914e76dd0673c", + "rev": "60b9db998f71ea49e1a9c41824d09aa274be1344", "type": "github" }, "original": { @@ -264,11 +264,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1697730408, - "narHash": "sha256-Ww//zzukdTrwTrCUkaJA/NsaLEfUfQpWZXBdXBYfhak=", + "lastModified": 1698266953, + "narHash": "sha256-jf72t7pC8+8h8fUslUYbWTX5rKsRwOzRMX8jJsGqDXA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ff0a5a776b56e0ca32d47a4a47695452ec7f7d80", + "rev": "75a52265bda7fd25e06e3a67dee3f0354e73243c", "type": "github" }, "original": { @@ -296,11 +296,11 @@ }, "nur": { "locked": { - "lastModified": 1697793907, - "narHash": "sha256-V2nTR/bN1GwozE2+Wz/YuuRq2uZhGo8HUSKCteJGQFs=", + "lastModified": 1698360430, + "narHash": "sha256-Kkr6rPExovu7dFZi50oTyu9QATfBNszY0slpL3pBM0k=", "owner": "nix-community", "repo": "NUR", - "rev": "d531cd7ef0001eaba84743d6666726df3c3b5620", + "rev": "3b1db33750b06f122e369cac982eed7ba7f25791", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6ed1c28..926d170 100644 --- a/flake.nix +++ b/flake.nix @@ -91,6 +91,10 @@ inherit overlays; config = { allowUnfree = true; + permittedInsecurePackages = [ + "electron-22.3.27" + "electron-24.8.6" + ]; }; }; pkgs = import nixpkgs pkgs-args; diff --git a/home-mods/common/default.nix b/home-mods/common/default.nix index 7c5a2d9..dce4e44 100644 --- a/home-mods/common/default.nix +++ b/home-mods/common/default.nix @@ -1,5 +1,7 @@ -{ config, lib, pkgs, ... }: - -{ +{ config +, lib +, pkgs +, ... +}: { home.homeDirectory = "/home/${config.home.username}"; } diff --git a/home-mods/desktop/default.nix b/home-mods/desktop/default.nix index 42feffd..6c6070c 100644 --- a/home-mods/desktop/default.nix +++ b/home-mods/desktop/default.nix @@ -3,7 +3,6 @@ , inputs , ... }: - let wallpaper = inputs.nix-wallpaper.packages.${pkgs.system}.default.override { logoSize = 24; @@ -11,7 +10,6 @@ let }; wallpaperPath = "${wallpaper}/share/wallpapers/nixos-wallpaper.png"; in - { home = { file.".background".source = wallpaperPath; @@ -21,6 +19,7 @@ in brave cavalier freetube + filelight inkscape jellyfin-media-player kate @@ -28,9 +27,11 @@ in nextcloud-client onlyoffice-bin rustdesk - tutanota-desktop + spotify signal-desktop + tutanota-desktop thunderbird + webcord-vencord ]; }; } diff --git a/home-mods/dev/default.nix b/home-mods/dev/default.nix index 7070bcc..54ed82f 100644 --- a/home-mods/dev/default.nix +++ b/home-mods/dev/default.nix @@ -3,8 +3,7 @@ , config , inputs , ... -}: -{ +}: { # imports = [ # ../shell #]; diff --git a/home-mods/shell/default.nix b/home-mods/shell/default.nix index 2f9a604..0fbf6d1 100644 --- a/home-mods/shell/default.nix +++ b/home-mods/shell/default.nix @@ -10,7 +10,6 @@ let ref = "master"; rev = "986398504d09e585c7d1a8d73a6394024fe6f164"; }; - in { programs = { @@ -94,7 +93,6 @@ in }; }; - services = { gpg-agent = { enable = true; @@ -111,7 +109,6 @@ in }; }; - home = { activation.setupEmacs = lib.hm.dag.entryAfter [ "writeBoundary" ] '' mkdir ~/.config/emacs -p @@ -122,6 +119,7 @@ in file.".config/doom" = { recursive = true; source = ../../ext/doom; + onChange = "${config.home.homeDirectory}/.config/emacs/bin/doom sync"; }; packages = with pkgs.unstable-pkgs; [ diff --git a/os-mods/network/default.nix b/os-mods/network/default.nix index 6fa2234..907ea92 100644 --- a/os-mods/network/default.nix +++ b/os-mods/network/default.nix @@ -5,10 +5,8 @@ }: { networking.networkmanager.enable = true; networking.nameservers = [ - "45.90.28.0#921984.dns.nextdns.io" - "45.90.30.0#921984.dns.nextdns.io" - "2a07:a8c0::#921984.dns.nextdns.io" - "2a07:a8c1::#921984.dns.nextdns.io" + "23.88.68.113#dns.vlt81.de" + "2a01:4f8:272:5917::baad:c0de#dns.vlt81.de" ]; services = { @@ -16,7 +14,14 @@ enable = true; dnssec = "true"; domains = [ "~." ]; - fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; + fallbackDns = [ + "45.90.28.0#921984.dns.nextdns.io" + "45.90.30.0#921984.dns.nextdns.io" + "2a07:a8c0::#921984.dns.nextdns.io" + "2a07:a8c1::#921984.dns.nextdns.io" + "1.1.1.1#one.one.one.one" + "1.0.0.1#one.one.one.one" + ]; extraConfig = '' DNSOverTLS=yes ''; diff --git a/systems/nixos-pulse/disko.nix b/systems/nixos-pulse/disko.nix index 2fa0946..a02d423 100644 --- a/systems/nixos-pulse/disko.nix +++ b/systems/nixos-pulse/disko.nix @@ -25,6 +25,7 @@ }; }; luksSwap = { + # size = "64G" end = "-192G"; content = { type = "luks"; @@ -82,15 +83,36 @@ "/_active" = { }; "/_active/root" = { mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = [ + "autodefrag" + "compress=zstd" + "discard=async" + "noatime" + "space_cache=v2" + "ssd" + ]; }; "/_active/home" = { mountpoint = "/home"; - mountOptions = [ "compress=zstd" "relatime" ]; + mountOptions = [ + "autodefrag" + "compress=zstd" + "discard=async" + "relatime" + "space_cache=v2" + "ssd" + ]; }; "/_active/nix" = { mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = [ + "autodefrag" + "compress=zstd" + "discard=async" + "noatime" + "space_cache=v2" + "ssd" + ]; }; }; }; diff --git a/users/tester.nix b/users/tester.nix index 475af7b..97e0821 100644 --- a/users/tester.nix +++ b/users/tester.nix @@ -3,12 +3,11 @@ , inputs , system , ... -}: -{ +}: { imports = [ ../home-mods/common - ../home-mods/dev ../home-mods/desktop + ../home-mods/dev ../home-mods/firefox ../home-mods/plasma ../home-mods/shell diff --git a/users/tristand.nix b/users/tristand.nix index fbf7f9f..8a1d4bd 100644 --- a/users/tristand.nix +++ b/users/tristand.nix @@ -3,9 +3,7 @@ , inputs , system , ... -}: - -{ +}: { imports = [ ../home-mods/common ../home-mods/desktop