Compare commits
No commits in common. "2893674f459be4a38a3ee43c365c35064302eb02" and "705c254da2dadebe3d5165b9416ac051e6d14542" have entirely different histories.
2893674f45
...
705c254da2
18
flake.lock
generated
18
flake.lock
generated
@ -8,11 +8,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681092193,
|
"lastModified": 1679738842,
|
||||||
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=",
|
"narHash": "sha256-CvqRbsyDW756EskojZptDU590rez29RcHDV3ezoze08=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af",
|
"rev": "83110c259889230b324bb2d35bef78bf5f214a1f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -24,11 +24,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681147610,
|
"lastModified": 1680110233,
|
||||||
"narHash": "sha256-v4D4kTiQszI/3UXbeEYfpYtSdSD64DyAwB4rLK6i8mQ=",
|
"narHash": "sha256-x8ob7Xk2mcGl6U+tVIIUYtXmiGVA304YXMJIzX+wVbA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a9a909139f21c687d856fd3b19d7fb70439c7863",
|
"rev": "f8efa87fb581c6a63eca14a552988bbb097af4ed",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -40,11 +40,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681041438,
|
"lastModified": 1679966490,
|
||||||
"narHash": "sha256-NmRGMklxBZ8Ol47CKMQxAU1F+v8ySpsHAAiC7ZL4vxY=",
|
"narHash": "sha256-k0jV+y1jawE6w4ZvKgXDNg4+O9NNtcaWwzw8gufv0b4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "48dcbaf7fa799509cbec85d55b8d62dcf1477d57",
|
"rev": "5b7cd5c39befee629be284970415b6eb3b0ff000",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
domain = "runas.rocks";
|
domain = "runas.rocks";
|
||||||
|
webui_domain = "webchat.runas.rocks";
|
||||||
network = import ./network.nix;
|
network = import ./network.nix;
|
||||||
db_name = "matrix-synapse-runas.rocks";
|
db_name = "matrix-synapse-runas.rocks";
|
||||||
in
|
in
|
||||||
@ -21,6 +22,8 @@ in
|
|||||||
password_config.enabled = false;
|
password_config.enabled = false;
|
||||||
app_service_config_files = [
|
app_service_config_files = [
|
||||||
"/var/lib/matrix-synapse/discord-registration.yaml"
|
"/var/lib/matrix-synapse/discord-registration.yaml"
|
||||||
|
# "/var/lib/matrix-synapse/hookshot-registration.yml"
|
||||||
|
# "/var/lib/matrix-synapse/telegram-registration.yaml"
|
||||||
];
|
];
|
||||||
|
|
||||||
auto_join_rooms = [ "#general:${domain}" "#music:${domain}" "#movies:${domain}" ];
|
auto_join_rooms = [ "#general:${domain}" "#music:${domain}" "#movies:${domain}" ];
|
||||||
@ -107,13 +110,42 @@ in
|
|||||||
proxyPass = "http://127.0.0.1:8008"; # without a trailing /
|
proxyPass = "http://127.0.0.1:8008"; # without a trailing /
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# web client
|
||||||
|
"${webui_domain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
root = pkgs.element-web.override {
|
||||||
|
conf = {
|
||||||
|
default_server_config."m.homeserver" = {
|
||||||
|
"base_url" = "https://${domain}";
|
||||||
|
"server_name" = "${domain}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# discord bridge
|
||||||
|
matrix-appservice-discord = {
|
||||||
|
enable = true;
|
||||||
|
environmentFile = /secrets/matrix-appservice-discord/tokens.env;
|
||||||
|
# The appservice is pre-configured to use SQLite by default.
|
||||||
|
# It's also possible to use PostgreSQL.
|
||||||
|
settings = {
|
||||||
|
bridge = {
|
||||||
|
inherit domain;
|
||||||
|
homeserverUrl = "https://${domain}";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
${network.architect-lan} ${domain}
|
${network.architect-lan} ${lib.concatStringsSep " " [ domain webui_domain]}
|
||||||
${network.architect-wg} ${domain}
|
${network.architect-wg} ${lib.concatStringsSep " " [ domain webui_domain ]}
|
||||||
${network.architect-ts} ${domain}
|
${network.architect-ts} ${lib.concatStringsSep " " [ domain webui_domain ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,19 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
home.packages = with pkgs; [ any-nix-shell ];
|
inherit (pkgs.lib) optionalString;
|
||||||
|
|
||||||
|
# not having the attribute users means
|
||||||
|
# we cannot change the default shell (e.g. this is not a NixOS host)
|
||||||
|
exec_zsh = ''
|
||||||
|
# if [ -f "$HOME/.bashrc" ]; then
|
||||||
|
# . "$HOME/.bashrc"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
exec ${pkgs.zsh}/bin/zsh
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -11,9 +22,9 @@
|
|||||||
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
|
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
|
||||||
theme = "bira";
|
theme = "bira";
|
||||||
};
|
};
|
||||||
|
|
||||||
initExtra = ''
|
|
||||||
any-nix-shell zsh --info-right | source /dev/stdin
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.file.".bashrc".text = ''
|
||||||
|
${optionalString (!builtins.hasAttr "users" config) "${exec_zsh}"}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user