diff options
author | Preston Pan <ret2pop@gmail.com> | 2025-02-03 15:35:10 -0800 |
---|---|---|
committer | Preston Pan <ret2pop@gmail.com> | 2025-02-03 15:35:10 -0800 |
commit | 8e5d3a8fcd6893bcd4903cc9b7bfe96f6486d7c6 (patch) | |
tree | 6881c472ddbabd6f3788066485f78fe5ddae0b4d | |
parent | d6efefc1d9e6b9fd515c5cb5f2a077e05caeaab7 (diff) |
Add spontaneity system; add port to firewall
-rw-r--r-- | agenda.org | 23 | ||||
-rw-r--r-- | config/emacs.el | 2 | ||||
-rw-r--r-- | config/emacs.org | 186 | ||||
-rw-r--r-- | config/nix.org | 77 | ||||
-rw-r--r-- | nix/flake.nix | 11 | ||||
-rw-r--r-- | nix/modules/configuration.nix | 4 | ||||
-rw-r--r-- | nix/systems/spontaneity/default.nix | 11 |
7 files changed, 200 insertions, 114 deletions
@@ -23,20 +23,24 @@ These are general life tasks that I need to do, which don't depend on a specific I need to work on my monorepo flake which builds all my systems, and should accommodate future systems and also should be relatively abstractable (i.e. identifiers tied to me should be easily removed from the flake). +*** TODO [#B] VPS +My VPS needs to be a NixOS configuration. *** DONE [#A] NixOS Modules :LOGBOOK: CLOCK: [2025-01-11 Sat 17:03]--[2025-01-11 Sat 19:35] => 2:32 :END: I need to fix my NixOS configuration to not be as monolithic and to be more modular. -*** TODO [#B] VPS -My VPS needs to be a NixOS configuration. -*** TODO [#B] Workstation +*** DONE [#B] Workstation My NixOS Monorepo needs to incorporate my workstation, and I need to install this config. *** DONE [#C] Gammastep Fix gammastep in my config so that it actually works on my dell machine. +*** DONE [#C] monorepo +Merge website and toughnix into monorepo ** TODO [#B] Resume I need to update my resume with my work experience. Additionally, I want to re-write my resume in org mode. +** TODO [#B] CSS +I need to update my CSS for my website to look better. ** TODO [#B] Nullring Update the nullring to be in org mode, and also include a couple more sites. ** TODO [#B] Umami @@ -49,9 +53,11 @@ I want to write another song. I want to start making YouTube videos. ** TODO [#C] Analogue Computer I want to make an analogue computer. -** TODO [#A] Dishes + +* Chores +** DONE [#A] Dishes There will be a TODO when I need to do the dishes. -** TODO Groceries +** DONE Groceries There will be a TODO when I need to get groceries. * Scheduled tasks @@ -63,7 +69,6 @@ something. *** DONE Travis and Friends Meetup SCHEDULED: <2025-01-12 Sun 17:00> Eating dinner with them. - * Habits These are some habits I want to track. They are repeated according to a calendar schedule in general. @@ -75,10 +80,12 @@ SCHEDULED: <2025-01-12 Sun .+1d> - State "DONE" from "TODO" [2025-01-11 Sat 02:26] I want to stretch every day so that I can become more flexible. ** TODO Journal -SCHEDULED: <2025-01-20 Mon .+1d> +SCHEDULED: <2025-02-04 Tue .+1d> :PROPERTIES: -:LAST_REPEAT: [2025-01-19 Sun 11:53] +:LAST_REPEAT: [2025-02-03 Mon 13:57] :END: +- State "DONE" from "TODO" [2025-02-03 Mon 13:57] +- State "DONE" from "TODO" [2025-02-03 Mon 03:01] - State "DONE" from "TODO" [2025-01-19 Sun 11:53] - State "DONE" from "TODO" [2025-01-16 Thu 19:19] - State "DONE" from "TODO" [2025-01-11 Sat 02:25] 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 diff --git a/nix/flake.nix b/nix/flake.nix index 058635a..50febed 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -75,7 +75,16 @@ 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 + ]; }; }; }; diff --git a/nix/modules/configuration.nix b/nix/modules/configuration.nix index 3c12962..97b8764 100644 --- a/nix/modules/configuration.nix +++ b/nix/modules/configuration.nix @@ -181,7 +181,7 @@ # wifi.macAddress = ""; }; firewall = { - allowedTCPPorts = [ 11434 ]; + allowedTCPPorts = [ 22 11434 ]; allowedUDPPorts = [ ]; }; }; @@ -292,7 +292,7 @@ users.users = { root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINSshvS1N/42pH9Unp3Zj4gjqs9BXoin99oaFWYHXZDJ preston@preston-arch" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell" ]; git = { diff --git a/nix/systems/spontaneity/default.nix b/nix/systems/spontaneity/default.nix index f9146f8..89b3ce6 100644 --- a/nix/systems/spontaneity/default.nix +++ b/nix/systems/spontaneity/default.nix @@ -1,10 +1,13 @@ -{ ... }: +{ config, lib, ... }: { imports = [ ../../modules/default.nix ]; - monorepo = { - pipewire.enable = false; - home.enable = false; + config.monorepo = { + profiles = { + home.enable = false; + server.enable = true; + }; + vars.hostName = "spontaneity"; }; } |