]> Untitled Git - monorepo.git/commitdiff
Add spontaneity system; add port to firewall
authorPreston Pan <ret2pop@gmail.com>
Mon, 3 Feb 2025 23:35:10 +0000 (15:35 -0800)
committerPreston Pan <ret2pop@gmail.com>
Mon, 3 Feb 2025 23:35:10 +0000 (15:35 -0800)
agenda.org
config/emacs.el
config/emacs.org
config/nix.org
nix/flake.nix
nix/modules/configuration.nix
nix/systems/spontaneity/default.nix

index 084aad95753a30c597a8517c8eca23006b96f5a3..5ffabf9b16e679b988b3dcf266a8804b840cd451 100644 (file)
@@ -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]
index 0b21a26838509abb8a2df89d2b0df8b3ead18d58..76c9eeedf281b5ffe1056d2132051356ca9973ba 100644 (file)
@@ -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
index 15a850a0eda97021aad17054f06102fb9497ab8d..76f5b9586cd18561fe0e07faca5e7da3aca88c44 100644 (file)
@@ -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
index d224180637d92ce8d6f668791d4a8020466f846f..a3150f4d88a0676d7e1ad676ae692c09ecbbc84c 100644 (file)
@@ -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
index 058635a7d1088ce07c9d3eb62b394c24963c6b28..50febed28d55c350fb9c033ff6f714e8b18b0b6e 100644 (file)
            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
+        ];
            };
     };
   };
index 3c1296233f31bcd2ba5789be3790d2ae12e7a391..97b876497a912e1513672ffc8d53118556734879 100644 (file)
        # wifi.macAddress = "";
     };
     firewall = {
-       allowedTCPPorts = [ 11434 ];
+       allowedTCPPorts = [ 22 11434 ];
        allowedUDPPorts = [ ];
     };
   };
 
   users.users = {
     root.openssh.authorizedKeys.keys = [
-       "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINSshvS1N/42pH9Unp3Zj4gjqs9BXoin99oaFWYHXZDJ preston@preston-arch"
+      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell"
     ];
 
     git = {
index f9146f8462194ad2e7642363763c5954ecdb105c..89b3ce6ac4e84af4070f8ec1e49831234b4cfe5a 100644 (file)
@@ -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";
   };
 }