mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 17:49:07 +01:00
Rename modules directory system to nixos
This commit is contained in:
parent
653a6f310b
commit
1c1b9221fc
48 changed files with 1 additions and 1 deletions
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.web-services.personal-blog;
|
||||
|
||||
dataDir = "/var/lib/personal-blog";
|
||||
in
|
||||
{
|
||||
options.custom.web-services.personal-blog = {
|
||||
enable = lib.mkEnableOption "";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.generate-blog = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
startAt = "*:0/5"; # Every 5 minutes
|
||||
path = [ pkgs.nix ];
|
||||
script = "nix build github:SebastianStork/blog --out-link ${dataDir} --refresh";
|
||||
};
|
||||
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.files = dataDir;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue