feat: work qol packages

This commit is contained in:
Swarsel 2024-10-17 00:08:26 +02:00
parent 9a12d78fc6
commit c8c0f39f34
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
8 changed files with 152 additions and 73 deletions

View file

@ -168,6 +168,7 @@ For styling, I am using the [[https://github.com/danth/stylix][stylix]] NixOS mo
:END: :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. 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 #+begin_src nix :tangle no :noweb-ref firefoxprofile
@ -5075,6 +5076,7 @@ in
{ command = "ANKI_WAYLAND=1 anki"; } { command = "ANKI_WAYLAND=1 anki"; }
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; } { command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
{ command = "nm-applet"; } { 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 ./xdg-portal.nix
# ./yubikey-touch-detector.nix # ./yubikey-touch-detector.nix
./safeeyes.nix ./safeeyes.nix
./distrobox.nix
./lid.nix ./lid.nix
]; ];
@ -5900,7 +5903,10 @@ Mostly used to install some compilers and lsp's that I want to have available wh
# + cuda # + cuda
cudatoolkit cudatoolkit
# ansible # ansible
ansible_2_15
ansible-lint
ansible-language-server ansible-language-server
molecule
#lsp-bridge / python #lsp-bridge / python
gcc gcc
gdb 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 #+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 **** Handle lid switch correctly
This turns off the display when the lid is closed. 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 obsidian
spotify spotify
vesktop # discord client vesktop # discord client
stable.nextcloud-client nextcloud-client
spotify-player spotify-player
element-desktop-wayland element-desktop-wayland
nicotine-plus nicotine-plus
@ -8390,6 +8415,7 @@ As for the `home.sessionVariables`, it should be noted that environment variable
#+end_src #+end_src
Also, we link some files to the users XDG configuration home: 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 #+begin_src nix :tangle profiles/common/home/symlink.nix
xdg.configFile = { xdg.configFile = {
@ -10935,11 +10961,11 @@ Used here: [[#h:877c9401-a354-4e44-a235-db1a90d19e00][General org-mode]]
(org-indent-mode) (org-indent-mode)
(variable-pitch-mode 1) (variable-pitch-mode 1)
;;(auto-fill-mode 0) ;;(auto-fill-mode 0)
(setq display-line-numbers-type 'relative ;; (setq display-line-numbers-type 'relative
display-line-numbers-current-absolute 1 ;; display-line-numbers-current-absolute 1
display-line-numbers-width-start nil ;; display-line-numbers-width-start nil
display-line-numbers-width 6 ;; display-line-numbers-width 6
display-line-numbers-grow-only 1) ;; display-line-numbers-grow-only 1)
(add-hook 'org-tab-first-hook 'org-end-of-line) (add-hook 'org-tab-first-hook 'org-end-of-line)
(visual-line-mode 1)) (visual-line-mode 1))
@ -11581,6 +11607,13 @@ Also, I setup initial modes for several major-modes depending on what I deem fit
(setq evil-vsplit-window-right t) (setq evil-vsplit-window-right t)
:config :config
(evil-mode 1) (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 "<down>") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
(define-key evil-normal-state-map (kbd "<up>") 'evil-previous-visual-line)
(define-key evil-normal-state-map (kbd "C-z") nil) (define-key evil-normal-state-map (kbd "C-z") nil)
(define-key evil-insert-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-visual-state-map (kbd "C-z") nil)
@ -12593,6 +12626,33 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as
(use-package nix-mode (use-package nix-mode
:mode "\\.nix\\'") :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 #+end_src
*** nixpkgs-fmt *** nixpkgs-fmt
:PROPERTIES: :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)) ;; (setq electric-pair-skip-whitespace-chars '(9 32))
;; in org-mode buffers, do not pair < and > in order not to interfere with org-tempo ;; in org-mode buffers, do not pair < and > in order not to interfere with org-tempo
(add-hook 'org-mode-hook (lambda () ;; (add-hook 'org-mode-hook (lambda ()
(setq-local electric-pair-inhibit-predicate ;; (setq-local electric-pair-inhibit-predicate
`(lambda (c) ;; `(lambda (c)
(if (char-equal c ?<) t (,electric-pair-inhibit-predicate 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 :init
;; set org-caldav-sync-initalization ;; set org-caldav-sync-initalization
(setq swarsel-caldav-synced 0) (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 (setq org-caldav-calendars
'((:calendar-id "personal" '((:calendar-id "personal"
:inbox "~/Calendars/leon_cal.org"))) :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 #+end_src
*** vterm *** vterm

View file

@ -13,6 +13,7 @@ in
{ command = "ANKI_WAYLAND=1 anki"; } { command = "ANKI_WAYLAND=1 anki"; }
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; } { command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
{ command = "nm-applet"; } { command = "nm-applet"; }
{ command = "feishin"; }
]; ];
}; };
} }

View file

@ -50,7 +50,7 @@
obsidian obsidian
spotify spotify
vesktop # discord client vesktop # discord client
stable.nextcloud-client nextcloud-client
spotify-player spotify-player
element-desktop-wayland element-desktop-wayland
nicotine-plus nicotine-plus

View file

@ -34,6 +34,7 @@
./xdg-portal.nix ./xdg-portal.nix
# ./yubikey-touch-detector.nix # ./yubikey-touch-detector.nix
./safeeyes.nix ./safeeyes.nix
./distrobox.nix
./lid.nix ./lid.nix
]; ];

View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
distrobox
boxbuddy
];
virtualisation.podman = {
enable = true;
};
}

View file

@ -65,7 +65,10 @@
# + cuda # + cuda
cudatoolkit cudatoolkit
# ansible # ansible
ansible_2_15
ansible-lint
ansible-language-server ansible-language-server
molecule
#lsp-bridge / python #lsp-bridge / python
gcc gcc
gdb gdb

View file

@ -160,11 +160,11 @@ create a new one."
(org-indent-mode) (org-indent-mode)
(variable-pitch-mode 1) (variable-pitch-mode 1)
;;(auto-fill-mode 0) ;;(auto-fill-mode 0)
(setq display-line-numbers-type 'relative ;; (setq display-line-numbers-type 'relative
display-line-numbers-current-absolute 1 ;; display-line-numbers-current-absolute 1
display-line-numbers-width-start nil ;; display-line-numbers-width-start nil
display-line-numbers-width 6 ;; display-line-numbers-width 6
display-line-numbers-grow-only 1) ;; display-line-numbers-grow-only 1)
(add-hook 'org-tab-first-hook 'org-end-of-line) (add-hook 'org-tab-first-hook 'org-end-of-line)
(visual-line-mode 1)) (visual-line-mode 1))
@ -578,6 +578,13 @@ create a new one."
(setq evil-vsplit-window-right t) (setq evil-vsplit-window-right t)
:config :config
(evil-mode 1) (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 "<down>") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
(define-key evil-normal-state-map (kbd "<up>") 'evil-previous-visual-line)
(define-key evil-normal-state-map (kbd "C-z") nil) (define-key evil-normal-state-map (kbd "C-z") nil)
(define-key evil-insert-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-visual-state-map (kbd "C-z") nil)
@ -1132,6 +1139,19 @@ create a new one."
(use-package nix-mode (use-package nix-mode
:mode "\\.nix\\'") :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) (use-package nixpkgs-fmt)
(setq markdown-command "pandoc") (setq markdown-command "pandoc")
@ -1283,10 +1303,10 @@ create a new one."
;; (setq electric-pair-skip-whitespace-chars '(9 32)) ;; (setq electric-pair-skip-whitespace-chars '(9 32))
;; in org-mode buffers, do not pair < and > in order not to interfere with org-tempo ;; in org-mode buffers, do not pair < and > in order not to interfere with org-tempo
(add-hook 'org-mode-hook (lambda () ;; (add-hook 'org-mode-hook (lambda ()
(setq-local electric-pair-inhibit-predicate ;; (setq-local electric-pair-inhibit-predicate
`(lambda (c) ;; `(lambda (c)
(if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) ;; (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c))))))
(use-package rainbow-mode (use-package rainbow-mode
:config (rainbow-mode)) :config (rainbow-mode))
@ -1750,7 +1770,7 @@ create a new one."
:init :init
;; set org-caldav-sync-initalization ;; set org-caldav-sync-initalization
(setq swarsel-caldav-synced 0) (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 (setq org-caldav-calendars
'((:calendar-id "personal" '((:calendar-id "personal"
:inbox "~/Calendars/leon_cal.org"))) :inbox "~/Calendars/leon_cal.org")))
@ -1856,10 +1876,6 @@ create a new one."
) )
))) )))
(use-package ansible
:hook
(yaml-ts-mode . ansible))
(use-package vterm (use-package vterm
:ensure t) :ensure t)

View file

@ -55,6 +55,7 @@ seturl www.google.com followpagepatterns.prev Previous
autocmd DocStart undefined mode ignore autocmd DocStart undefined mode ignore
autocmd DocStart pokerogue.net mode ignore autocmd DocStart pokerogue.net mode ignore
autocmd DocStart typelit.io 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 " For syntax highlighting see https://github.com/tridactyl/vim-tridactyl
" vim: set filetype=tridactyl " vim: set filetype=tridactyl