diff --git a/SwarselSystems.org b/SwarselSystems.org index 05ff7b9..0f0e8cf 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -168,6 +168,7 @@ For styling, I am using the [[https://github.com/danth/stylix][stylix]] NixOS mo :END: At work I am using several services that are using SSO login - however, as I am using four different accounts at work, this becomes a chore here. Hence, I have defined multiple profiles in [[#h:f0b2ea93-94c8-48d8-8d47-6fe58f58e0e6][Work]] that are all practically using the same configuration. To save screen space, I template that profile here. +Set in firefox `about:config > toolkit.legacyUserProfileCustomizations.stylesheets` to true. #+begin_src nix :tangle no :noweb-ref firefoxprofile @@ -5075,6 +5076,7 @@ in { command = "ANKI_WAYLAND=1 anki"; } { command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; } { command = "nm-applet"; } + { command = "feishin"; } ]; }; } @@ -5179,6 +5181,7 @@ Also, the system state version is set here. No need to touch it. ./xdg-portal.nix # ./yubikey-touch-detector.nix ./safeeyes.nix + ./distrobox.nix ./lid.nix ]; @@ -5900,7 +5903,10 @@ Mostly used to install some compilers and lsp's that I want to have available wh # + cuda cudatoolkit # ansible + ansible_2_15 + ansible-lint ansible-language-server + molecule #lsp-bridge / python gcc gdb @@ -6583,6 +6589,25 @@ A friend of mine used this service and I used to make fun of him. But I have to } #+end_src +**** Podmam (distrobox) + +I am using distrobox to quickly circumvent isses that I cannot immediately solve on NixOS. It is always the goal to quickly get things working on NixOS, but this prevents me from getting completely stuck. + +#+begin_src nix :tangle profiles/common/nixos/distrobox.nix + { pkgs, ... }: + { + environment.systemPackages = with pkgs; [ + distrobox + boxbuddy + ]; + + virtualisation.podman = { + enable = true; + }; + + } +#+end_src + **** Handle lid switch correctly This turns off the display when the lid is closed. @@ -7963,7 +7988,7 @@ This holds packages that I can use as provided, or with small modifications (as obsidian spotify vesktop # discord client - stable.nextcloud-client + nextcloud-client spotify-player element-desktop-wayland nicotine-plus @@ -8390,6 +8415,7 @@ As for the `home.sessionVariables`, it should be noted that environment variable #+end_src Also, we link some files to the users XDG configuration home: +Also in firefox `about:config > toolkit.legacyUserProfileCustomizations.stylesheets` to true. #+begin_src nix :tangle profiles/common/home/symlink.nix xdg.configFile = { @@ -10935,11 +10961,11 @@ Used here: [[#h:877c9401-a354-4e44-a235-db1a90d19e00][General org-mode]] (org-indent-mode) (variable-pitch-mode 1) ;;(auto-fill-mode 0) - (setq display-line-numbers-type 'relative - display-line-numbers-current-absolute 1 - display-line-numbers-width-start nil - display-line-numbers-width 6 - display-line-numbers-grow-only 1) + ;; (setq display-line-numbers-type 'relative + ;; display-line-numbers-current-absolute 1 + ;; display-line-numbers-width-start nil + ;; display-line-numbers-width 6 + ;; display-line-numbers-grow-only 1) (add-hook 'org-tab-first-hook 'org-end-of-line) (visual-line-mode 1)) @@ -11567,39 +11593,46 @@ Also, I setup initial modes for several major-modes depending on what I deem fit #+begin_src emacs-lisp - ;; Emulate vim in emacs - (use-package evil - :init - (setq evil-want-integration t) ; loads evil - (setq evil-want-keybinding nil) ; loads "helpful bindings" for other modes - (setq evil-want-C-u-scroll t) ; scrolling using C-u - (setq evil-want-C-i-jump nil) ; jumping with C-i - (setq evil-want-Y-yank-to-eol t) ; give Y some utility - (setq evil-shift-width 2) ; uniform indent - (setq evil-respect-visual-line-mode nil) ; i am torn on this one - (setq evil-split-window-below t) - (setq evil-vsplit-window-right t) - :config - (evil-mode 1) - (define-key evil-normal-state-map (kbd "C-z") nil) - (define-key evil-insert-state-map (kbd "C-z") nil) - (define-key evil-visual-state-map (kbd "C-z") nil) - (define-key evil-motion-state-map (kbd "C-z") nil) - (define-key evil-operator-state-map (kbd "C-z") nil) - (define-key evil-replace-state-map (kbd "C-z") nil) - (define-key global-map (kbd "C-z") nil) - (evil-set-undo-system 'undo-tree) + ;; Emulate vim in emacs + (use-package evil + :init + (setq evil-want-integration t) ; loads evil + (setq evil-want-keybinding nil) ; loads "helpful bindings" for other modes + (setq evil-want-C-u-scroll t) ; scrolling using C-u + (setq evil-want-C-i-jump nil) ; jumping with C-i + (setq evil-want-Y-yank-to-eol t) ; give Y some utility + (setq evil-shift-width 2) ; uniform indent + (setq evil-respect-visual-line-mode nil) ; i am torn on this one + (setq evil-split-window-below t) + (setq evil-vsplit-window-right t) + :config + (evil-mode 1) - ;; Don't use evil-mode in these contexts, or use it in a specific mode - (evil-set-initial-state 'messages-buffer-mode 'emacs) - (evil-set-initial-state 'dashboard-mode 'emacs) - (evil-set-initial-state 'dired-mode 'emacs) - (evil-set-initial-state 'cfw:details-mode 'emacs) - (evil-set-initial-state 'Custom-mode 'emacs) ; god knows why this mode is in uppercase - (evil-set-initial-state 'mu4e-headers-mode 'normal) - (evil-set-initial-state 'python-inferior-mode 'normal) - (add-hook 'org-capture-mode-hook 'evil-insert-state) - (add-to-list 'evil-buffer-regexps '("COMMIT_EDITMSG" . insert))) + ;; make normal mode respect wrapped lines + (define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line) + (define-key evil-normal-state-map (kbd "") 'evil-next-visual-line) + (define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line) + (define-key evil-normal-state-map (kbd "") 'evil-previous-visual-line) + + (define-key evil-normal-state-map (kbd "C-z") nil) + (define-key evil-insert-state-map (kbd "C-z") nil) + (define-key evil-visual-state-map (kbd "C-z") nil) + (define-key evil-motion-state-map (kbd "C-z") nil) + (define-key evil-operator-state-map (kbd "C-z") nil) + (define-key evil-replace-state-map (kbd "C-z") nil) + (define-key global-map (kbd "C-z") nil) + (evil-set-undo-system 'undo-tree) + + ;; Don't use evil-mode in these contexts, or use it in a specific mode + (evil-set-initial-state 'messages-buffer-mode 'emacs) + (evil-set-initial-state 'dashboard-mode 'emacs) + (evil-set-initial-state 'dired-mode 'emacs) + (evil-set-initial-state 'cfw:details-mode 'emacs) + (evil-set-initial-state 'Custom-mode 'emacs) ; god knows why this mode is in uppercase + (evil-set-initial-state 'mu4e-headers-mode 'normal) + (evil-set-initial-state 'python-inferior-mode 'normal) + (add-hook 'org-capture-mode-hook 'evil-insert-state) + (add-to-list 'evil-buffer-regexps '("COMMIT_EDITMSG" . insert))) #+end_src **** evil-collection @@ -12593,6 +12626,33 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as (use-package nix-mode :mode "\\.nix\\'") +#+end_src +*** HCL Mode + +This adds support for Hashicorp Configuration Language. I need this at work. + +#+begin_src emacs-lisp + + (use-package hcl-mode + :mode "\\.hcl\\'" + :config + (setq hcl-indent-level 2)) + +#+end_src +*** Terraform Mode + +This adds support for Terraform configuration files. I need this at work. + +#+begin_src emacs-lisp + + (use-package terraform-mode + :mode "\\.tf\\'" + :config + (setq terraform-indent-level 2) + (setq terraform-format-on-save t)) + + (add-hook 'terraform-mode-hook #'outline-minor-mode) + #+end_src *** nixpkgs-fmt :PROPERTIES: @@ -12958,10 +13018,10 @@ I am not completely sure on electric-pair-mode yet, sometimes it is very helpful ;; (setq electric-pair-skip-whitespace-chars '(9 32)) ;; in org-mode buffers, do not pair < and > in order not to interfere with org-tempo - (add-hook 'org-mode-hook (lambda () - (setq-local electric-pair-inhibit-predicate - `(lambda (c) - (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) + ;; (add-hook 'org-mode-hook (lambda () + ;; (setq-local electric-pair-inhibit-predicate + ;; `(lambda (c) + ;; (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) @@ -13747,7 +13807,7 @@ Yes, I am aware that I am exposing my university-calendar to the public here. I :init ;; set org-caldav-sync-initalization (setq swarsel-caldav-synced 0) - (setq org-caldav-url "https://stash.swarsel.win/remote.php/dav/calendars/Swarsele") + (setq org-caldav-url "https://stash.swarsel.win/remote.php/dav/calendars/Swarsel") (setq org-caldav-calendars '((:calendar-id "personal" :inbox "~/Calendars/leon_cal.org"))) @@ -13865,21 +13925,6 @@ This sets up the =dashboard=, which is really quite useless. But, it looks cool ))) -#+end_src - -*** ansible -:PROPERTIES: -:CUSTOM_ID: h:672ddd5c-7679-44a2-9085-936e9198fc2b -:END: - -#+begin_src emacs-lisp - - (use-package ansible - :hook - (yaml-ts-mode . ansible)) - - - #+end_src *** vterm diff --git a/modules/home/startup.nix b/modules/home/startup.nix index 9a47570..3bebcb9 100644 --- a/modules/home/startup.nix +++ b/modules/home/startup.nix @@ -13,6 +13,7 @@ in { command = "ANKI_WAYLAND=1 anki"; } { command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; } { command = "nm-applet"; } + { command = "feishin"; } ]; }; } diff --git a/profiles/common/home/packages.nix b/profiles/common/home/packages.nix index 53c1b41..b451b18 100644 --- a/profiles/common/home/packages.nix +++ b/profiles/common/home/packages.nix @@ -50,7 +50,7 @@ obsidian spotify vesktop # discord client - stable.nextcloud-client + nextcloud-client spotify-player element-desktop-wayland nicotine-plus diff --git a/profiles/common/nixos/default.nix b/profiles/common/nixos/default.nix index 483b7d1..061b4e1 100644 --- a/profiles/common/nixos/default.nix +++ b/profiles/common/nixos/default.nix @@ -34,6 +34,7 @@ ./xdg-portal.nix # ./yubikey-touch-detector.nix ./safeeyes.nix + ./distrobox.nix ./lid.nix ]; diff --git a/profiles/common/nixos/distrobox.nix b/profiles/common/nixos/distrobox.nix new file mode 100644 index 0000000..c5ef054 --- /dev/null +++ b/profiles/common/nixos/distrobox.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + distrobox + boxbuddy + ]; + + virtualisation.podman = { + enable = true; + }; + +} diff --git a/profiles/common/nixos/packages.nix b/profiles/common/nixos/packages.nix index 6583780..20b2c91 100644 --- a/profiles/common/nixos/packages.nix +++ b/profiles/common/nixos/packages.nix @@ -65,7 +65,10 @@ # + cuda cudatoolkit # ansible + ansible_2_15 + ansible-lint ansible-language-server + molecule #lsp-bridge / python gcc gdb diff --git a/programs/emacs/init.el b/programs/emacs/init.el index dfc06bb..6cfe651 100644 --- a/programs/emacs/init.el +++ b/programs/emacs/init.el @@ -160,11 +160,11 @@ create a new one." (org-indent-mode) (variable-pitch-mode 1) ;;(auto-fill-mode 0) - (setq display-line-numbers-type 'relative - display-line-numbers-current-absolute 1 - display-line-numbers-width-start nil - display-line-numbers-width 6 - display-line-numbers-grow-only 1) + ;; (setq display-line-numbers-type 'relative + ;; display-line-numbers-current-absolute 1 + ;; display-line-numbers-width-start nil + ;; display-line-numbers-width 6 + ;; display-line-numbers-grow-only 1) (add-hook 'org-tab-first-hook 'org-end-of-line) (visual-line-mode 1)) @@ -578,6 +578,13 @@ create a new one." (setq evil-vsplit-window-right t) :config (evil-mode 1) + + ;; make normal mode respect wrapped lines + (define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line) + (define-key evil-normal-state-map (kbd "") 'evil-next-visual-line) + (define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line) + (define-key evil-normal-state-map (kbd "") 'evil-previous-visual-line) + (define-key evil-normal-state-map (kbd "C-z") nil) (define-key evil-insert-state-map (kbd "C-z") nil) (define-key evil-visual-state-map (kbd "C-z") nil) @@ -1132,6 +1139,19 @@ create a new one." (use-package nix-mode :mode "\\.nix\\'") +(use-package hcl-mode + :mode "\\.hcl\\'" + :config + (setq hcl-indent-level 2)) + +(use-package terraform-mode + :mode "\\.tf\\'" + :config + (setq terraform-indent-level 2) + (setq terraform-format-on-save t)) + +(add-hook 'terraform-mode-hook #'outline-minor-mode) + (use-package nixpkgs-fmt) (setq markdown-command "pandoc") @@ -1283,10 +1303,10 @@ create a new one." ;; (setq electric-pair-skip-whitespace-chars '(9 32)) ;; in org-mode buffers, do not pair < and > in order not to interfere with org-tempo -(add-hook 'org-mode-hook (lambda () - (setq-local electric-pair-inhibit-predicate - `(lambda (c) - (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) +;; (add-hook 'org-mode-hook (lambda () +;; (setq-local electric-pair-inhibit-predicate +;; `(lambda (c) +;; (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) (use-package rainbow-mode :config (rainbow-mode)) @@ -1750,7 +1770,7 @@ create a new one." :init ;; set org-caldav-sync-initalization (setq swarsel-caldav-synced 0) - (setq org-caldav-url "https://stash.swarsel.win/remote.php/dav/calendars/Swarsele") + (setq org-caldav-url "https://stash.swarsel.win/remote.php/dav/calendars/Swarsel") (setq org-caldav-calendars '((:calendar-id "personal" :inbox "~/Calendars/leon_cal.org"))) @@ -1856,10 +1876,6 @@ create a new one." ) ))) -(use-package ansible - :hook - (yaml-ts-mode . ansible)) - (use-package vterm :ensure t) diff --git a/programs/firefox/tridactyl/tridactylrc b/programs/firefox/tridactyl/tridactylrc index b31b4fd..c53c501 100644 --- a/programs/firefox/tridactyl/tridactylrc +++ b/programs/firefox/tridactyl/tridactylrc @@ -55,6 +55,7 @@ seturl www.google.com followpagepatterns.prev Previous autocmd DocStart undefined mode ignore autocmd DocStart pokerogue.net mode ignore autocmd DocStart typelit.io mode ignore +autocmd DocStart vc-impimba-1.m.imp.ac.at/ui/webconsole mode ignore " For syntax highlighting see https://github.com/tridactyl/vim-tridactyl " vim: set filetype=tridactyl