1
1
Fork 0

Add the seal post script into nix file itself.

Some comments on how to use Gitea.
Switching mentions of users to alice
Bill Ewanick 2023-06-28 19:46:20 -04:00
parent 3db497ce1a
commit ecb0121fd2
4 changed files with 47 additions and 1 deletions

View File

@ -2,6 +2,14 @@ let
PROJECT_ROOT = builtins.toString ./.;
in
{
nixpkgs.overlays = [
(self: super: {
newSealPost = pkgs.writeShellScriptBin "newSealPost.sh" (builtins.readFile ./cutesealfanpage.love/newSealPost.sh);
})
];
environment.systemPackages = [ pkgs.newSealPost ];
services.caddy = {
enable = true;
virtualHosts = {

View File

@ -0,0 +1,24 @@
#!/bin/sh
HOME="/home/alice/seal-blog"
# Call generateSealPosts from root of blog
# This will generate posts up to today
cd $HOME
./generate/generateSealPosts
# cd to website so site can find posts folder and build
cd $HOME/website
# Before our posts will show up on the site
# we need to build them so they're generated
# from our site.hs logic
./site build
# Push to git
cd $HOME
ssh-add
git add .
git config user.name "Alice"
git config user.email "admin@cutesealfanpage.love"
git commit -m "Daily blog update"
git push origin main

View File

@ -25,3 +25,17 @@
};
};
}
/*
# README
## View users and use the command line
Do something like this, preferably as the gitea user
```bash
$ sudo su gitea
$ /nix/store/5xwh7m7252m9ljvr3lyilcza1q699r2c-gitea-1.17.4/bin/gitea -c /var/lib/gitea/custom/conf/app.ini admin user list
```
*/

View File

@ -52,7 +52,7 @@
auto-optimise-store = true;
# Required by Cachix to be used as non-root user
trusted-users = [ "root" "bill" ];
trusted-users = [ "root" "alice" ];
};
};