diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/emacs.el | 2 | ||||
-rw-r--r-- | config/emacs.org | 186 | ||||
-rw-r--r-- | config/nix.org | 77 |
3 files changed, 166 insertions, 99 deletions
diff --git a/config/emacs.el b/config/emacs.el index 0b21a26..76c9eee 100644 --- a/config/emacs.el +++ b/config/emacs.el @@ -18,7 +18,7 @@ (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") (use-short-answers t "Use y instead of yes") (make-backup-files nil "Don't make backups") - (display-fill-column-indicator-column 100 "Draw a line at 100 characters") + (display-fill-column-indicator-column 150 "Draw a line at 100 characters") (line-spacing 2 "Default line spacing") ;; Editor comments diff --git a/config/emacs.org b/config/emacs.org index 15a850a..76f5b95 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -23,103 +23,103 @@ configuration as they are also defined using the use-package macros. Some of the have documentation strings attached, so it is easy to follow what the individual options do. Emacs is self documenting, after all! #+begin_src emacs-lisp - (use-package emacs - :custom - ;; Startup errors - (warning-minimum-level :emergency "Supress emacs warnings") - (debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") + (use-package emacs + :custom + ;; Startup errors + (warning-minimum-level :emergency "Supress emacs warnings") + (debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") - ;; Mouse wheel - (mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") - (mouse-wheel-progressive-speed nil "Make scrolling non laggy") - (mouse-wheel-follow-mouse 't "Scroll correct window") - (scroll-conservatively 101 "Sort of smooth scrolling") - (scroll-step 1 "Scroll one line at a time") - (display-time-24hr-format t "Use 24 hour format to read the time") - (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") - (use-short-answers t "Use y instead of yes") - (make-backup-files nil "Don't make backups") - (display-fill-column-indicator-column 100 "Draw a line at 100 characters") - (line-spacing 2 "Default line spacing") + ;; Mouse wheel + (mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") + (mouse-wheel-progressive-speed nil "Make scrolling non laggy") + (mouse-wheel-follow-mouse 't "Scroll correct window") + (scroll-conservatively 101 "Sort of smooth scrolling") + (scroll-step 1 "Scroll one line at a time") + (display-time-24hr-format t "Use 24 hour format to read the time") + (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") + (use-short-answers t "Use y instead of yes") + (make-backup-files nil "Don't make backups") + (display-fill-column-indicator-column 150 "Draw a line at 100 characters") + (line-spacing 2 "Default line spacing") - ;; Editor comments - (c-doc-comment-style '((c-mode . doxygen) - (c++-mode . doxygen))) - :hook ((text-mode . auto-fill-mode) - (text-mode . visual-line-mode) - (prog-mode . auto-fill-mode) - (prog-mode . display-line-numbers-mode) - (prog-mode . display-fill-column-indicator-mode) - (org-mode . auto-fill-mode) - (org-mode . display-fill-column-indicator-mode) - (org-mode . display-line-numbers-mode) - (org-mode . (lambda () - (setq prettify-symbols-alist - '(("#+begin_src" . ?) - ("#+BEGIN_SRC" . ?) - ("#+end_src" . ?) - ("#+END_SRC" . ?) - ("#+begin_example" . ?) - ("#+BEGIN_EXAMPLE" . ?) - ("#+end_example" . ?) - ("#+END_EXAMPLE" . ?) - ("#+header:" . ?) - ("#+HEADER:" . ?) - ("#+name:" . ?﮸) - ("#+NAME:" . ?﮸) - ("#+results:" . ?) - ("#+RESULTS:" . ?) - ("#+call:" . ?) - ("#+CALL:" . ?) - (":PROPERTIES:" . ?) - (":properties:" . ?) - ("lambda" . ?λ) - ("->" . ?→) - ("map" . ?↦) - ("/=" . ?≠) - ("!=" . ?≠) - ("==" . ?≡) - ("<=" . ?≤) - (">=" . ?≥) - ("&&" . ?∧) - ("||" . ?∨) - ("sqrt" . ?√) - ("..." . ?…))) - (prettify-symbols-mode))) - (prog-mode . - (lambda () - (setq prettify-symbols-alist - '(("lambda" . ?λ) - ("->" . ?→) - ("map" . ?↦) - ("/=" . ?≠) - ("!=" . ?≠) - ("==" . ?≡) - ("<=" . ?≤) - (">=" . ?≥) - ("&&" . ?∧) - ("||" . ?∨) - ("sqrt" . ?√) - ("..." . ?…))) - (prettify-symbols-mode)))) - :config - (require 'tex-site) - (server-start) + ;; Editor comments + (c-doc-comment-style '((c-mode . doxygen) + (c++-mode . doxygen))) + :hook ((text-mode . auto-fill-mode) + (text-mode . visual-line-mode) + (prog-mode . auto-fill-mode) + (prog-mode . display-line-numbers-mode) + (prog-mode . display-fill-column-indicator-mode) + (org-mode . auto-fill-mode) + (org-mode . display-fill-column-indicator-mode) + (org-mode . display-line-numbers-mode) + (org-mode . (lambda () + (setq prettify-symbols-alist + '(("#+begin_src" . ?) + ("#+BEGIN_SRC" . ?) + ("#+end_src" . ?) + ("#+END_SRC" . ?) + ("#+begin_example" . ?) + ("#+BEGIN_EXAMPLE" . ?) + ("#+end_example" . ?) + ("#+END_EXAMPLE" . ?) + ("#+header:" . ?) + ("#+HEADER:" . ?) + ("#+name:" . ?﮸) + ("#+NAME:" . ?﮸) + ("#+results:" . ?) + ("#+RESULTS:" . ?) + ("#+call:" . ?) + ("#+CALL:" . ?) + (":PROPERTIES:" . ?) + (":properties:" . ?) + ("lambda" . ?λ) + ("->" . ?→) + ("map" . ?↦) + ("/=" . ?≠) + ("!=" . ?≠) + ("==" . ?≡) + ("<=" . ?≤) + (">=" . ?≥) + ("&&" . ?∧) + ("||" . ?∨) + ("sqrt" . ?√) + ("..." . ?…))) + (prettify-symbols-mode))) + (prog-mode . + (lambda () + (setq prettify-symbols-alist + '(("lambda" . ?λ) + ("->" . ?→) + ("map" . ?↦) + ("/=" . ?≠) + ("!=" . ?≠) + ("==" . ?≡) + ("<=" . ?≤) + (">=" . ?≥) + ("&&" . ?∧) + ("||" . ?∨) + ("sqrt" . ?√) + ("..." . ?…))) + (prettify-symbols-mode)))) + :config + (require 'tex-site) + (server-start) - ;; start wiith sane defaults - (pixel-scroll-precision-mode 1) - (display-battery-mode 1) - (display-time-mode 1) - (menu-bar-mode -1) - (scroll-bar-mode -1) - (tool-bar-mode -1) + ;; start wiith sane defaults + (pixel-scroll-precision-mode 1) + (display-battery-mode 1) + (display-time-mode 1) + (menu-bar-mode -1) + (scroll-bar-mode -1) + (tool-bar-mode -1) - ;; load theme, fonts, and transparency. Prettify symbols. - (global-prettify-symbols-mode 1) - (load-theme 'catppuccin :no-confirm) - (set-face-attribute 'default nil :font "Iosevka Nerd Font" :height 130) - (set-frame-parameter nil 'alpha-background 90) - (add-to-list 'default-frame-alist '(alpha-background . 90))) + ;; load theme, fonts, and transparency. Prettify symbols. + (global-prettify-symbols-mode 1) + (load-theme 'catppuccin :no-confirm) + (set-face-attribute 'default nil :font "Iosevka Nerd Font" :height 130) + (set-frame-parameter nil 'alpha-background 90) + (add-to-list 'default-frame-alist '(alpha-background . 90))) #+end_src As you can see, the config (and sometimes the init section) of most of these use-package blocks contain most of the imperative commands. In fact, most of the configurations are completely diff --git a/config/nix.org b/config/nix.org index d224180..a3150f4 100644 --- a/config/nix.org +++ b/config/nix.org @@ -95,7 +95,16 @@ so that adding new configurations that add modifications is made simple. spontaneity = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; - modules = []; + modules = [ + lanzaboote.nixosModules.lanzaboote + disko.nixosModules.disko + home-manager.nixosModules.home-manager + sops-nix.nixosModules.sops + { nixpkgs.overlays = [ nur.overlays.default ]; } + { home-manager.extraSpecialArgs = attrs; } + ./modules/vda-simple.nix + ./systems/spontaneity/default.nix + ]; }; }; }; @@ -692,7 +701,7 @@ because they enhance security. # wifi.macAddress = ""; }; firewall = { - allowedTCPPorts = [ 11434 ]; + allowedTCPPorts = [ 22 11434 ]; allowedUDPPorts = [ ]; }; }; @@ -803,7 +812,7 @@ because they enhance security. users.users = { root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINSshvS1N/42pH9Unp3Zj4gjqs9BXoin99oaFWYHXZDJ preston@preston-arch" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell" ]; git = { @@ -907,6 +916,45 @@ For my nvme drives. }; } #+end_src +*** VDA +For my virtual machines. +#+begin_src nix :tangle ../nix/modules/vda-simple.nix +{ + disko.devices = { + disk = { + my-disk = { + device = "/dev/vda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "500M"; + priority = 1; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + priority = 2; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} +#+end_src ** Home Time for my home user configuration, which is managed by home-manager. First we start off with this module to enter us into the home-manager namespace: @@ -2573,6 +2621,8 @@ This is pretty understandable, if you understand all the above. } #+end_src ** Affinity +This is my configuration for my workstation. It runs ollama, as well +as several other useful services. #+begin_src nix :tangle ../nix/systems/affinity/default.nix { config, lib, home-manager, ... }: { @@ -2581,14 +2631,31 @@ This is pretty understandable, if you understand all the above. ]; config.monorepo = { profiles = { - server.enable = true; - cuda.enable = true; + server.enable = true; + cuda.enable = true; }; vars.hostName = "affinity"; }; config.home-manager.users."${config.monorepo.vars.userName}".monorepo.profiles.cuda.enable = true; } #+end_src +** Spontaneity +Spontaneity is my VPS instance. +#+begin_src nix :tangle ../nix/systems/spontaneity/default.nix + { config, lib, ... }: + { + imports = [ + ../../modules/default.nix + ]; + config.monorepo = { + profiles = { + home.enable = false; + server.enable = true; + }; + vars.hostName = "spontaneity"; + }; + } +#+end_src ** Installer My installer installs my systems almost completely without interaction. You can also make them install the exact version of the system that you want it to by pinning the commits to make it |