camelot: Add personnal blog hosting

This commit is contained in:
Victor Mignot 2024-09-28 22:11:30 +02:00
parent 3f4bc21d04
commit ea2e4228bb
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D
5 changed files with 50 additions and 1 deletions

View file

@ -54,6 +54,7 @@
};
my.server.mollysocket.enable = true;
my.server.blog.enable = true;
my.users = {
dala = {

View file

@ -21,6 +21,19 @@
"type": "github"
}
},
"dalaran-fr": {
"locked": {
"lastModified": 1727552694,
"narHash": "sha256-tBZLCct3pCeeFw5+UpW4joH3dp4btO1L+e+zOHwwPkY=",
"rev": "2a70183c5f0a77cc130d8184a27bcb3150c5febc",
"type": "tarball",
"url": "https://git.dalaran.fr/api/v1/repos/dala/dalaran.fr/archive/2a70183c5f0a77cc130d8184a27bcb3150c5febc.tar.gz?rev=2a70183c5f0a77cc130d8184a27bcb3150c5febc"
},
"original": {
"type": "tarball",
"url": "https://git.dalaran.fr/dala/dalaran.fr/archive/main.tar.gz"
}
},
"extra-config": {
"locked": {
"lastModified": 1725174688,
@ -421,6 +434,7 @@
},
"root": {
"inputs": {
"dalaran-fr": "dalaran-fr",
"extra-config": "extra-config",
"flake-utils": "flake-utils",
"home-manager": "home-manager",

View file

@ -33,6 +33,8 @@
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1";
dalaran-fr.url = "https://git.dalaran.fr/dala/dalaran.fr/archive/main.tar.gz";
extra-config.url = "git+ssh://forgejo@git.dalaran.fr/dala/nixos-config-extra.git";
};
@ -48,6 +50,7 @@
lix-module-unstable,
lix-module-stable,
lanzaboote,
dalaran-fr,
}:
let
machines = import ./machines.nix;
@ -96,7 +99,13 @@
nixpkgs = import nixpkgsVersions.stable { system = "x86_64-linux"; };
nodeNixpkgs = builtins.mapAttrs (
name: config: import nixpkgsVersions.${config.nixpkgs} { system = config.system; }
name: config:
import nixpkgsVersions.${config.nixpkgs} {
system = config.system;
overlays = [
dalaran-fr.overlays.default
];
}
) machines;
nodeSpecialArgs = builtins.mapAttrs (

24
modules/server/blog.nix Normal file
View file

@ -0,0 +1,24 @@
{
config,
pkgs,
lib,
...
}:
with lib;
{
options.my.server.blog.enable = mkOption {
type = types.bool;
default = false;
description = ''
Enable hosting my personnal website.
'';
};
config = mkIf config.my.server.blog.enable {
services.nginx.virtualHosts."dalaran.fr" = {
locations."/".extraConfig = ''
root ${pkgs.dalaran-fr-blog};
'';
};
};
}

View file

@ -4,5 +4,6 @@
./network.nix
./nginx.nix
./mollysocket.nix
./blog.nix
];
}