Compare commits
3 Commits
705c254da2
...
2893674f45
Author | SHA1 | Date | |
---|---|---|---|
|
2893674f45 | ||
|
3eea13b718 | ||
|
ac52491299 |
18
flake.lock
generated
18
flake.lock
generated
@ -8,11 +8,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679738842,
|
"lastModified": 1681092193,
|
||||||
"narHash": "sha256-CvqRbsyDW756EskojZptDU590rez29RcHDV3ezoze08=",
|
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "83110c259889230b324bb2d35bef78bf5f214a1f",
|
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -24,11 +24,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1680110233,
|
"lastModified": 1681147610,
|
||||||
"narHash": "sha256-x8ob7Xk2mcGl6U+tVIIUYtXmiGVA304YXMJIzX+wVbA=",
|
"narHash": "sha256-v4D4kTiQszI/3UXbeEYfpYtSdSD64DyAwB4rLK6i8mQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f8efa87fb581c6a63eca14a552988bbb097af4ed",
|
"rev": "a9a909139f21c687d856fd3b19d7fb70439c7863",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -40,11 +40,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679966490,
|
"lastModified": 1681041438,
|
||||||
"narHash": "sha256-k0jV+y1jawE6w4ZvKgXDNg4+O9NNtcaWwzw8gufv0b4=",
|
"narHash": "sha256-NmRGMklxBZ8Ol47CKMQxAU1F+v8ySpsHAAiC7ZL4vxY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5b7cd5c39befee629be284970415b6eb3b0ff000",
|
"rev": "48dcbaf7fa799509cbec85d55b8d62dcf1477d57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
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
|
||||||
@ -22,8 +21,6 @@ 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}" ];
|
||||||
@ -110,42 +107,13 @@ 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} ${lib.concatStringsSep " " [ domain webui_domain]}
|
${network.architect-lan} ${domain}
|
||||||
${network.architect-wg} ${lib.concatStringsSep " " [ domain webui_domain ]}
|
${network.architect-wg} ${domain}
|
||||||
${network.architect-ts} ${lib.concatStringsSep " " [ domain webui_domain ]}
|
${network.architect-ts} ${domain}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,8 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
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
|
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [ any-nix-shell ];
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -22,9 +11,9 @@ in
|
|||||||
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
|
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
|
||||||
theme = "bira";
|
theme = "bira";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".bashrc".text = ''
|
initExtra = ''
|
||||||
${optionalString (!builtins.hasAttr "users" config) "${exec_zsh}"}
|
any-nix-shell zsh --info-right | source /dev/stdin
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user