chore: cleaned up some stuff for the site

This commit is contained in:
Nick 2025-12-05 17:57:08 -06:00
parent 38f7ba4d91
commit 3a9339aead
5 changed files with 12 additions and 34 deletions

View file

@ -29,7 +29,6 @@ in
stateDir = "/var/lib/${serviceCfg.name}"; stateDir = "/var/lib/${serviceCfg.name}";
environmentFile = "/run/secrets/env"; environmentFile = "/run/secrets/env";
}; };
openssh = { openssh = {
enable = true; enable = true;
settings = { settings = {
@ -38,13 +37,11 @@ in
}; };
}; };
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
22 # SSH 22 # SSH
587 # SMTP 587 # SMTP
serviceCfg.ports.port0 serviceCfg.ports.port0
]; ];
systemd = { systemd = {
services = { services = {
systemd-networkd.wantedBy = [ "multi-user.target" ]; systemd-networkd.wantedBy = [ "multi-user.target" ];
@ -58,20 +55,16 @@ in
Type = "oneshot"; Type = "oneshot";
ExecStart = pkgs.writeShellScript "fix-perms" '' ExecStart = pkgs.writeShellScript "fix-perms" ''
echo "Starting permission fix..." echo "Starting permission fix..."
OPENCLOUD_UID=$(id -u opencloud) OPENCLOUD_UID=$(id -u opencloud)
echo "OpenCloud UID: $OPENCLOUD_UID" echo "OpenCloud UID: $OPENCLOUD_UID"
find /var/lib/opencloud/storage/users -type f ! -uid "$OPENCLOUD_UID" 2>/dev/null | while read -r file; do find /var/lib/opencloud/storage/users -type f ! -uid "$OPENCLOUD_UID" 2>/dev/null | while read -r file; do
echo "Fixing file: $file" echo "Fixing file: $file"
chown opencloud:opencloud "$file" 2>/dev/null || true chown opencloud:opencloud "$file" 2>/dev/null || true
done done
find /var/lib/opencloud/storage/users -type d ! -uid "$OPENCLOUD_UID" 2>/dev/null | while read -r dir; do find /var/lib/opencloud/storage/users -type d ! -uid "$OPENCLOUD_UID" 2>/dev/null | while read -r dir; do
echo "Fixing dir: $dir" echo "Fixing dir: $dir"
chown opencloud:opencloud "$dir" 2>/dev/null || true chown opencloud:opencloud "$dir" 2>/dev/null || true
done done
echo "Permission fix complete" echo "Permission fix complete"
''; '';
User = "root"; User = "root";
@ -111,9 +104,7 @@ in
"d ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -" "d ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
"z /etc/opencloud 0700 ${serviceCfg.name} ${serviceCfg.name} -" "z /etc/opencloud 0700 ${serviceCfg.name} ${serviceCfg.name} -"
]; ];
}; };
microvm = { microvm = {
vcpu = 1; vcpu = 1;
mem = 1024 * 1; mem = 1024 * 1;
@ -173,7 +164,6 @@ in
}; };
}; };
}; };
systemd = { systemd = {
tmpfiles.rules = [ tmpfiles.rules = [
"d ${serviceCfg.mntPaths.path0} 0751 microvm wheel - -" "d ${serviceCfg.mntPaths.path0} 0751 microvm wheel - -"
@ -181,12 +171,10 @@ in
"d ${serviceCfg.mntPaths.path0}/config 0751 microvm wheel - -" "d ${serviceCfg.mntPaths.path0}/config 0751 microvm wheel - -"
]; ];
}; };
sops.secrets = { sops.secrets = {
"${serviceCfg.name}/env" = { "${serviceCfg.name}/env" = {
owner = "root"; owner = "root";
mode = "0600"; mode = "0600";
}; };
}; };
} }

View file

@ -4,7 +4,6 @@
adb.enable = true; adb.enable = true;
droidcam.enable = true; droidcam.enable = true;
}; };
services.udev = { services.udev = {
enable = true; enable = true;
extraRules = '' extraRules = ''
@ -18,7 +17,6 @@
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666", GROUP="adbusers" SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666", GROUP="adbusers"
''; '';
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gvfs gvfs
jmtpfs jmtpfs

View file

@ -21,7 +21,6 @@ in
]; ];
}; };
}; };
hardware.printers = { hardware.printers = {
ensurePrinters = [ ensurePrinters = [
{ {
@ -45,7 +44,6 @@ in
]; ];
ensureDefaultPrinter = printer1.label; ensureDefaultPrinter = printer1.label;
}; };
networking = { networking = {
firewall = { firewall = {
allowedTCPPorts = [ allowedTCPPorts = [

View file

@ -146,7 +146,7 @@ elmBuildsList device =
cardMaker device cardMaker device
(C.BlogArticle service) (C.BlogArticle service)
(contentList service (contentList service
[ elmCodeRenderer device ] []
MarkdownMsg 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. 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 # 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. 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. A clear description of your site's pages and structure.
Any bespoke frontend functionality you want included. Any bespoke frontend functionality you want included.
# EXAMPLE
""" """
, articleReferences = , articleReferences =
[ { author = "" [ { author = ""

View file

@ -125,17 +125,17 @@ view : Shared.Model -> Model -> View Msg
view shared model = view shared model =
{ title = "services (nixConfigs)" { title = "services (nixConfigs)"
, attributes = [] , attributes = []
, element = elmBuildsContainer shared.device , element = nixBuildsContainer shared.device
} }
elmBuildsContainer : Device -> Element Msg nixBuildsContainer : Device -> Element Msg
elmBuildsContainer device = nixBuildsContainer device =
topLevelContainer (elmBuildsList device) topLevelContainer (nixBuildsList device)
elmBuildsList : Device -> Element Msg nixBuildsList : Device -> Element Msg
elmBuildsList device = nixBuildsList device =
column column
(case ( device.class, device.orientation ) of (case ( device.class, device.orientation ) of
_ -> _ ->
@ -148,7 +148,7 @@ elmBuildsList device =
cardMaker device cardMaker device
(C.BlogArticle service) (C.BlogArticle service)
(contentList service (contentList service
[ nixCodeRenderer device ] []
MarkdownMsg 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. 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 # WHAT YOU GET
1. A NixOS configuration written to your specifications. 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. 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. A list of configuration architecture specifications.
Any bespoke configuration you want included. Any bespoke configuration you want included.
# EXAMPLE
""" """
, articleReferences = , articleReferences =
[ { author = "" [ { author = ""