Split element-web container from main docker config
This commit is contained in:
parent
875a74c99b
commit
fd289c62d4
8 changed files with 57 additions and 18 deletions
|
@ -105,6 +105,12 @@
|
||||||
(import (./machines/loki/configuration.nix) { inherit self; })
|
(import (./machines/loki/configuration.nix) { inherit self; })
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
drone = defSystem "x86_64-linux" {
|
||||||
|
imports = [
|
||||||
|
(import (./machines/drone/configuration.nix) { inherit self; })
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
} //
|
} //
|
||||||
(flake-utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ])
|
(flake-utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ])
|
||||||
|
|
|
@ -51,7 +51,7 @@ in
|
||||||
input = {
|
input = {
|
||||||
"36125:40349:splitKB_Kyria" = {
|
"36125:40349:splitKB_Kyria" = {
|
||||||
xkb_layout = "us";
|
xkb_layout = "us";
|
||||||
xkb_options = "lv3:ralt_switch";
|
xkb_options = "lv3:ralt_switch,eurosign:5";
|
||||||
};
|
};
|
||||||
"1133:49291:Logitech_G502_HERO_SE" = {
|
"1133:49291:Logitech_G502_HERO_SE" = {
|
||||||
natural_scroll = "enabled";
|
natural_scroll = "enabled";
|
||||||
|
@ -188,8 +188,8 @@ in
|
||||||
# exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
# exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
||||||
# exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
# exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
||||||
exec --no-startup-id ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
|
exec --no-startup-id ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
|
||||||
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 900 -- ${swaylockcmd}
|
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 900 "${swaylockcmd}"
|
||||||
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w 1200 -- ${pkgs.sway}/bin/swaymsg 'output * dpms off' resume ${pkgs.sway}/bin/swaymsg 'output * dpms off'
|
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 1200 "${pkgs.sway}/bin/swaymsg 'output * dpms off' resume ${pkgs.sway}/bin/swaymsg 'output * dpms off'"
|
||||||
|
|
||||||
include /etc/sway/config.d/*
|
include /etc/sway/config.d/*
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -428,6 +428,7 @@
|
||||||
"editor.bracketPairColorization.enabled": true,
|
"editor.bracketPairColorization.enabled": true,
|
||||||
"python.formatting.provider": "black",
|
"python.formatting.provider": "black",
|
||||||
"telemetry.telemetryLevel": "off",
|
"telemetry.telemetryLevel": "off",
|
||||||
|
"python.formatting.blackArgs": ["--skip-string-normalization"],
|
||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
home-manager = true;
|
home-manager = true;
|
||||||
};
|
};
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
|
element-web.enable = true;
|
||||||
fonts.enable = true;
|
fonts.enable = true;
|
||||||
gnome.enable = true;
|
gnome.enable = true;
|
||||||
greetd.enable = true;
|
greetd.enable = true;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.eboskma.docker;
|
cfg = config.eboskma.docker;
|
||||||
matrixClientConfig = pkgs.writeText "element-web.json" (builtins.readFile ./element-web.json);
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -20,20 +19,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# docker run -d --restart=always --name element-web -p 8888:80 -v $PWD/element-web.json:/app/config.json vectorim/element-web
|
|
||||||
virtualisation.oci-containers.containers = {
|
|
||||||
element-web = {
|
|
||||||
autoStart = true;
|
|
||||||
image = "vectorim/element-web";
|
|
||||||
ports = [
|
|
||||||
"8888:80"
|
|
||||||
];
|
|
||||||
volumes = [
|
|
||||||
"${matrixClientConfig}:/app/config.json"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups =
|
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups =
|
||||||
[ "docker" ];
|
[ "docker" ];
|
||||||
|
|
||||||
|
|
28
modules/element-web/default.nix
Normal file
28
modules/element-web/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.eboskma.element-web;
|
||||||
|
matrixClientConfig = pkgs.writeText "element-web.json" (builtins.readFile ./element-web.json);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
options.eboskma.element-web = { enable = mkEnableOption "activate element-web"; };
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
config.eboskma.docker.enable = true;
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
element-web = {
|
||||||
|
autoStart = true;
|
||||||
|
image = "vectorim/element-web";
|
||||||
|
ports = [
|
||||||
|
"8888:80"
|
||||||
|
];
|
||||||
|
volumes = [
|
||||||
|
"${matrixClientConfig}:/app/config.json"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -27,6 +27,23 @@ in
|
||||||
})
|
})
|
||||||
cfg.dhcpInterfaces);
|
cfg.dhcpInterfaces);
|
||||||
hosts = cfg.hosts;
|
hosts = cfg.hosts;
|
||||||
|
|
||||||
|
firewall = {
|
||||||
|
trustedInterfaces = [ "lo" ];
|
||||||
|
interfaces = listToAttrs (builtins.map
|
||||||
|
(iface: {
|
||||||
|
name = iface;
|
||||||
|
value = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
# Horus System V2
|
||||||
|
12345
|
||||||
|
5555
|
||||||
|
5556
|
||||||
|
];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
cfg.dhcpInterfaces);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "networkmanager" ];
|
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "networkmanager" ];
|
||||||
|
|
||||||
|
@ -36,6 +53,7 @@ in
|
||||||
publish = {
|
publish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = true;
|
domain = true;
|
||||||
|
userServices = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue