actually init nix webring
This commit is contained in:
parent
d93eed2cac
commit
611a33fa0b
7 changed files with 155 additions and 32 deletions
89
flake.lock
89
flake.lock
|
@ -563,7 +563,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_5": {
|
"flake-utils_5": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_10"
|
"systems": "systems_12"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1710146030,
|
||||||
|
@ -581,7 +581,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_6": {
|
"flake-utils_6": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_12"
|
"systems": "systems_14"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -599,7 +599,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_7": {
|
"flake-utils_7": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_14"
|
"systems": "systems_16"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1710146030,
|
||||||
|
@ -1260,6 +1260,28 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-webring": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nte": "nte",
|
||||||
|
"systems": "systems_11"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726250921,
|
||||||
|
"narHash": "sha256-lMpZgSZMWFA4nsogaIS9KS3bfgyW6tMR1LrRz6u2vo0=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "d883daa41c5996c1b615d959b23d1e0e7cb42c1c",
|
||||||
|
"revCount": 1,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.jacekpoz.pl/jacekpoz/nixwebr.ing"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.jacekpoz.pl/jacekpoz/nixwebr.ing"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpak": {
|
"nixpak": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
|
@ -1553,6 +1575,28 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nte": {
|
"nte": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nix-webring",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems_10"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726242453,
|
||||||
|
"narHash": "sha256-VTHc10y2gI1CVmCayzzswPQPZ4S/QIi28VKpyfS+K1M=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "b1f9ff4ed5fe38973c5c16db7b8c1f6100c52a5e",
|
||||||
|
"revCount": 51,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.jacekpoz.pl/jacekpoz/nte"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.jacekpoz.pl/jacekpoz/nte"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nte_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"pozsite",
|
"pozsite",
|
||||||
|
@ -1699,7 +1743,7 @@
|
||||||
"plugin-vim-vsnip": "plugin-vim-vsnip",
|
"plugin-vim-vsnip": "plugin-vim-vsnip",
|
||||||
"plugin-which-key": "plugin-which-key",
|
"plugin-which-key": "plugin-which-key",
|
||||||
"rnix-lsp": "rnix-lsp",
|
"rnix-lsp": "rnix-lsp",
|
||||||
"systems": "systems_11",
|
"systems": "systems_13",
|
||||||
"zig": "zig"
|
"zig": "zig"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -3322,7 +3366,7 @@
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nte": "nte"
|
"nte": "nte_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1721584427,
|
"lastModified": 1721584427,
|
||||||
|
@ -3394,6 +3438,7 @@
|
||||||
"iio-hyprland": "iio-hyprland",
|
"iio-hyprland": "iio-hyprland",
|
||||||
"nh": "nh",
|
"nh": "nh",
|
||||||
"nix-minecraft": "nix-minecraft",
|
"nix-minecraft": "nix-minecraft",
|
||||||
|
"nix-webring": "nix-webring",
|
||||||
"nixpak": "nixpak",
|
"nixpak": "nixpak",
|
||||||
"nixpkgs": "nixpkgs_9",
|
"nixpkgs": "nixpkgs_9",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
|
@ -3506,7 +3551,7 @@
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"searx-randomizer": "searx-randomizer",
|
"searx-randomizer": "searx-randomizer",
|
||||||
"systems": "systems_13"
|
"systems": "systems_15"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725210690,
|
"lastModified": 1725210690,
|
||||||
|
@ -3646,6 +3691,36 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_13": {
|
"systems_13": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_14": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_15": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689347949,
|
"lastModified": 1689347949,
|
||||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
@ -3660,7 +3735,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_14": {
|
"systems_16": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
|
|
@ -113,5 +113,10 @@
|
||||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||||
|
|
||||||
work-secrets.url = "git+ssh://jacekpoz/work/work-secrets";
|
work-secrets.url = "git+ssh://jacekpoz/work/work-secrets";
|
||||||
|
|
||||||
|
nix-webring = {
|
||||||
|
url = "git+https://git.jacekpoz.pl/jacekpoz/nixwebr.ing";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
_: {
|
_: {
|
||||||
imports = [
|
imports = [
|
||||||
./nixwebr.ing
|
|
||||||
./services
|
./services
|
||||||
./trollface.pl
|
./trollface.pl
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./jacekpoz.pl.nix
|
./jacekpoz.pl.nix
|
||||||
|
./nixwebr.ing.nix
|
||||||
./profile.nix
|
./profile.nix
|
||||||
./programs.nix
|
./programs.nix
|
||||||
./system.nix
|
./system.nix
|
||||||
|
|
67
hosts/chmura/nixwebr.ing.nix
Normal file
67
hosts/chmura/nixwebr.ing.nix
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.meta) getExe';
|
||||||
|
|
||||||
|
systemctl = getExe' pkgs.systemd "systemctl";
|
||||||
|
|
||||||
|
port = 5932;
|
||||||
|
sitePath = "/srv/web/nixwebr.ing";
|
||||||
|
in {
|
||||||
|
services.caddy = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts = {
|
||||||
|
"nixwebr.ing".extraConfig = ''
|
||||||
|
reverse_proxy localhost:${toString port}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.nixwebring = {};
|
||||||
|
|
||||||
|
users.users.nixwebring = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "nixwebring";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
services = {
|
||||||
|
nix-webring-server = {
|
||||||
|
description = "The backend for nixwebr.ing";
|
||||||
|
after = ["network.target"];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${inputs.nix-webring.packages.${pkgs.system}.server}/bin/nix-webring-server";
|
||||||
|
Restart = "on-failure";
|
||||||
|
Environment = ''NIX_WEBRING_PORT="${toString port}" NIX_WEBRING_DIR="${sitePath}"'';
|
||||||
|
User = "nixwebring";
|
||||||
|
Group = "nixwebring";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nix-webring-server-watcher = {
|
||||||
|
description = "Restarter for the backend";
|
||||||
|
after = ["network.target"];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${systemctl} restart nix-webring-server.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
paths.nix-webring-server-watcher = {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
|
pathConfig = {
|
||||||
|
PathModified = sitePath;
|
||||||
|
Unit = "nix-webring-server-watcher.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,9 +0,0 @@
|
||||||
_: {
|
|
||||||
services.caddy = {
|
|
||||||
enable = true;
|
|
||||||
virtualHosts."nixwebr.ing".extraConfig = ''
|
|
||||||
root * ${./.}
|
|
||||||
file_server
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
body {
|
|
||||||
background-color: #111111;
|
|
||||||
color: #DDDDDD
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="stylesheet" href="/index.css">
|
|
||||||
<title>nix webring</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>work in progress</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in a new issue