homepage
This commit is contained in:
parent
3197673678
commit
cd4ebfb807
55
flake.lock
55
flake.lock
|
@ -1,5 +1,44 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1711535911,
|
||||||
|
"narHash": "sha256-SzgDrsyBskLyipFzsKwPOKP9FMgGB+6tUQ0VpeGQ/1Y=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "80221fa4d735fbc232d97d3384c8af0e40a4e331",
|
||||||
|
"revCount": 9,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.sondell.org/glennwso/home.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.sondell.org/glennwso/home.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709237383,
|
"lastModified": 1709237383,
|
||||||
|
@ -18,8 +57,24 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"home": "home",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
15
flake.nix
15
flake.nix
|
@ -1,10 +1,18 @@
|
||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
inputs.home.url = "git+https://git.sondell.org/glennwso/home.git";
|
||||||
|
inputs.home.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
outputs = { self, nixpkgs }@attrs: {
|
outputs = { self, nixpkgs, home }@attrs:
|
||||||
# replace 'joes-desktop' with your hostname here.
|
let
|
||||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
homepage = home.packages.${system}.default;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# replace 'joes-desktop' with your hostname here.
|
||||||
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem
|
||||||
|
{
|
||||||
|
inherit system;
|
||||||
specialArgs = attrs;
|
specialArgs = attrs;
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
@ -16,6 +24,7 @@
|
||||||
./filebrowser.nix
|
./filebrowser.nix
|
||||||
./tail.nix
|
./tail.nix
|
||||||
./matrix.nix
|
./matrix.nix
|
||||||
|
(import ./homepage.nix {inherit homepage;})
|
||||||
# ./coturn.nix # disabled becouse tls not solved
|
# ./coturn.nix # disabled becouse tls not solved
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
29
homepage.nix
Normal file
29
homepage.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ homepage, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
domain = "sondell.org";
|
||||||
|
port = "8118";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.services.homepage = {
|
||||||
|
enable = true;
|
||||||
|
description = "homepage with links to selfhosted services";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
unitConfig = {
|
||||||
|
After="network-online.target";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${homepage}/bin/homepage -p ${port}";
|
||||||
|
User= "sondell";
|
||||||
|
Type= "simple";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts.${domain} = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:${port}/";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
34
matrix.nix
34
matrix.nix
|
@ -64,23 +64,23 @@ services.postgresql = {
|
||||||
locations."/_synapse/client".proxyPass = "http://[::1]:8008";
|
locations."/_synapse/client".proxyPass = "http://[::1]:8008";
|
||||||
};
|
};
|
||||||
|
|
||||||
${domain} = {
|
# ${domain} = {
|
||||||
# enableACME = true;
|
# # enableACME = true;
|
||||||
# forceSSL = true;
|
# # forceSSL = true;
|
||||||
locations."/" = {
|
# locations."/" = {
|
||||||
proxyPass = "http://localhost:8008";
|
# proxyPass = "http://localhost:8008";
|
||||||
};
|
# };
|
||||||
# This section is not needed if the server_name of matrix-synapse is equal to
|
# # This section is not needed if the server_name of matrix-synapse is equal to
|
||||||
# the domain (i.e. example.org from @foo:example.org) and the federation port
|
# # the domain (i.e. example.org from @foo:example.org) and the federation port
|
||||||
# is 8448.
|
# # is 8448.
|
||||||
# Further reference can be found in the docs about delegation under
|
# # Further reference can be found in the docs about delegation under
|
||||||
# https://element-hq.github.io/synapse/latest/delegate.html
|
# # https://element-hq.github.io/synapse/latest/delegate.html
|
||||||
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
# locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
||||||
# This is usually needed for homeserver discovery (from e.g. other Matrix clients).
|
# # This is usually needed for homeserver discovery (from e.g. other Matrix clients).
|
||||||
# Further reference can be found in the upstream docs at
|
# # Further reference can be found in the upstream docs at
|
||||||
# https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient
|
# # https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient
|
||||||
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
# locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
default = "http_status:404";
|
default = "http_status:404";
|
||||||
ingress = {
|
ingress = {
|
||||||
"*.sondell.org" = "http://localhost:1234";
|
"*.sondell.org" = "http://localhost:1234";
|
||||||
|
"sondell.org" = "http://localhost:1234";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue