From 3a9339aead2cf6653abc6c3396e23f13705173f1 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 5 Dec 2025 17:57:08 -0600 Subject: [PATCH] chore: cleaned up some stuff for the site --- .../guests/opencloud/opencloud0/default.nix | 12 ----------- modules/nixos/hardware/android/default.nix | 2 -- modules/nixos/hardware/printing/default.nix | 2 -- .../frontend/src/Pages/Services/Elm.elm | 9 +++----- .../frontend/src/Pages/Services/Nix.elm | 21 ++++++++----------- 5 files changed, 12 insertions(+), 34 deletions(-) diff --git a/modules/nixos/guests/opencloud/opencloud0/default.nix b/modules/nixos/guests/opencloud/opencloud0/default.nix index 7905f65..9465649 100755 --- a/modules/nixos/guests/opencloud/opencloud0/default.nix +++ b/modules/nixos/guests/opencloud/opencloud0/default.nix @@ -29,7 +29,6 @@ in stateDir = "/var/lib/${serviceCfg.name}"; environmentFile = "/run/secrets/env"; }; - openssh = { enable = true; settings = { @@ -38,13 +37,11 @@ in }; }; }; - networking.firewall.allowedTCPPorts = [ 22 # SSH 587 # SMTP serviceCfg.ports.port0 ]; - systemd = { services = { systemd-networkd.wantedBy = [ "multi-user.target" ]; @@ -58,20 +55,16 @@ in Type = "oneshot"; ExecStart = pkgs.writeShellScript "fix-perms" '' echo "Starting permission fix..." - OPENCLOUD_UID=$(id -u opencloud) echo "OpenCloud UID: $OPENCLOUD_UID" - find /var/lib/opencloud/storage/users -type f ! -uid "$OPENCLOUD_UID" 2>/dev/null | while read -r file; do echo "Fixing file: $file" chown opencloud:opencloud "$file" 2>/dev/null || true done - find /var/lib/opencloud/storage/users -type d ! -uid "$OPENCLOUD_UID" 2>/dev/null | while read -r dir; do echo "Fixing dir: $dir" chown opencloud:opencloud "$dir" 2>/dev/null || true done - echo "Permission fix complete" ''; User = "root"; @@ -111,9 +104,7 @@ in "d ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -" "z /etc/opencloud 0700 ${serviceCfg.name} ${serviceCfg.name} -" ]; - }; - microvm = { vcpu = 1; mem = 1024 * 1; @@ -173,7 +164,6 @@ in }; }; }; - systemd = { tmpfiles.rules = [ "d ${serviceCfg.mntPaths.path0} 0751 microvm wheel - -" @@ -181,12 +171,10 @@ in "d ${serviceCfg.mntPaths.path0}/config 0751 microvm wheel - -" ]; }; - sops.secrets = { "${serviceCfg.name}/env" = { owner = "root"; mode = "0600"; }; }; - } diff --git a/modules/nixos/hardware/android/default.nix b/modules/nixos/hardware/android/default.nix index 6f3c9a5..8a698bf 100755 --- a/modules/nixos/hardware/android/default.nix +++ b/modules/nixos/hardware/android/default.nix @@ -4,7 +4,6 @@ adb.enable = true; droidcam.enable = true; }; - services.udev = { enable = true; extraRules = '' @@ -18,7 +17,6 @@ SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666", GROUP="adbusers" ''; }; - environment.systemPackages = with pkgs; [ gvfs jmtpfs diff --git a/modules/nixos/hardware/printing/default.nix b/modules/nixos/hardware/printing/default.nix index f5dc58a..65b9156 100755 --- a/modules/nixos/hardware/printing/default.nix +++ b/modules/nixos/hardware/printing/default.nix @@ -21,7 +21,6 @@ in ]; }; }; - hardware.printers = { ensurePrinters = [ { @@ -45,7 +44,6 @@ in ]; ensureDefaultPrinter = printer1.label; }; - networking = { firewall = { allowedTCPPorts = [ diff --git a/packages/website/frontend/src/Pages/Services/Elm.elm b/packages/website/frontend/src/Pages/Services/Elm.elm index b7652a1..869c44c 100755 --- a/packages/website/frontend/src/Pages/Services/Elm.elm +++ b/packages/website/frontend/src/Pages/Services/Elm.elm @@ -146,7 +146,7 @@ elmBuildsList device = cardMaker device (C.BlogArticle service) (contentList service - [ elmCodeRenderer device ] + [] MarkdownMsg ) ) @@ -169,11 +169,11 @@ The site that you're currently viewing this on was written by me in the Elm prog Below is an example of a helper function that I wrote for this site. This particular function extracts the first 80 words from all of my articles' markdown strings, and displays them as blurbs, followed by an ellipsis, in my article cards using my markdown parser. -The source code for this website is viewable on [Gitlab](https://gitlab.com/upRootNutrition/website). +The source code for this website is viewable on upRootNutrition's [Forgejo](https://source.uprootnutrition.com/upRootNutrition/dotfiles/src/branch/main/packages/website). # WHAT YOU GET -1. An Elm-based website written to your specifications. +1. An static Elm-based website written to your specifications. 2. Two revisions to better meet your needs and vision. @@ -186,9 +186,6 @@ The source code for this website is viewable on [Gitlab](https://gitlab.com/upRo • A clear description of your site's pages and structure. • Any bespoke frontend functionality you want included. - -# EXAMPLE - """ , articleReferences = [ { author = "" diff --git a/packages/website/frontend/src/Pages/Services/Nix.elm b/packages/website/frontend/src/Pages/Services/Nix.elm index be52d59..7edee31 100755 --- a/packages/website/frontend/src/Pages/Services/Nix.elm +++ b/packages/website/frontend/src/Pages/Services/Nix.elm @@ -125,17 +125,17 @@ view : Shared.Model -> Model -> View Msg view shared model = { title = "services (nixConfigs)" , attributes = [] - , element = elmBuildsContainer shared.device + , element = nixBuildsContainer shared.device } -elmBuildsContainer : Device -> Element Msg -elmBuildsContainer device = - topLevelContainer (elmBuildsList device) +nixBuildsContainer : Device -> Element Msg +nixBuildsContainer device = + topLevelContainer (nixBuildsList device) -elmBuildsList : Device -> Element Msg -elmBuildsList device = +nixBuildsList : Device -> Element Msg +nixBuildsList device = column (case ( device.class, device.orientation ) of _ -> @@ -148,7 +148,7 @@ elmBuildsList device = cardMaker device (C.BlogArticle service) (contentList service - [ nixCodeRenderer device ] + [] MarkdownMsg ) ) @@ -172,13 +172,13 @@ If you're interested in having a custom Nix configuration, or having a pre-exist Below is an example of a nix flake that I wrote for the devshell that I used to manage and isolate the development environment for this site. All of the packages, pre-defined settings, and tooling used for this site are managed through this flake. -The source code for my Nix server is viewable on [Gitlab](https://gitlab.com/upRootNutrition/dotfiles). +The source code for my Nix server is viewable on upRootNutrition's [Forgejo](https://source.uprootnutrition.com/upRootNutrition/dotfiles). # WHAT YOU GET 1. A NixOS configuration written to your specifications. -2. Two refactors for the purposes of improving readability. +2. Two refactors for the purposes of improving ergonomics. 3. Instructions for how to use and build upon your configuration. @@ -189,9 +189,6 @@ The source code for my Nix server is viewable on [Gitlab](https://gitlab.com/upR • A list of configuration architecture specifications. • Any bespoke configuration you want included. - -# EXAMPLE - """ , articleReferences = [ { author = ""