Skip to content

Commit

Permalink
nix-build
Browse files Browse the repository at this point in the history
  • Loading branch information
wesl-ee committed Dec 19, 2023
1 parent 4dcdb5b commit 5ffeaf8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:

- name: Build Website
run: |
nix-shell --run 'ikiwiki --setup ikiwiki.setup'
nix-build
- name: Upload to Remote Server
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
rsync -av --delete -e www/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/srv/http/wesl.ee/
rsync -av --delete -e result/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/srv/http/wesl.ee/
15 changes: 14 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ let TextVimColor = perl536Packages.buildPerlPackage {
license = with lib.licenses; [ artistic1 gpl1Plus ];
};
};
in pkgs.mkShell rec {
in pkgs.stdenv.mkDerivation rec {
pname = "personal-wiki";
version = "0.1.0";
src = builtins.path { name = "personal-wiki"; path = ./.; };

buildInputs = with pkgs; [
ikiwiki

vim
graphviz
git

# teximg
imagemagick
Expand All @@ -37,4 +42,12 @@ in pkgs.mkShell rec {
perl536Packages.SortNaturally
TextVimColor
];

buildPhase = ''
ikiwiki --gettime --setup ./ikiwiki.setup -v
'';

installPhase = ''
mv www $out
'';
}

0 comments on commit 5ffeaf8

Please sign in to comment.