Compare commits
1 commit
1662420bdc
...
1912025dca
Author | SHA1 | Date | |
---|---|---|---|
Dmitry Voronin | 1912025dca |
57
container/Chat.nix
Normal file
57
container/Chat.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
container,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.container.module.chat;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
container.module.chat = {
|
||||||
|
enable = lib.mkEnableOption "chat container.";
|
||||||
|
address = lib.mkOption {
|
||||||
|
default = "10.1.0.20";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
port = lib.mkOption {
|
||||||
|
default = 80;
|
||||||
|
type = lib.types.int;
|
||||||
|
};
|
||||||
|
domain = lib.mkOption {
|
||||||
|
default = "chat.${config.container.domain}";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
storage = lib.mkOption {
|
||||||
|
default = "${config.container.storage}/chat";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# WIP: https://search.nixos.org/options?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=mattermost
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
|
||||||
|
|
||||||
|
containers.chat = container.mkContainer cfg {
|
||||||
|
bindMounts = {
|
||||||
|
# "/var/lib/changedetection-io" = {
|
||||||
|
# hostPath = "${cfg.storage}/data";
|
||||||
|
# isReadOnly = false;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
config =
|
||||||
|
{ ... }:
|
||||||
|
container.mkContainerConfig cfg {
|
||||||
|
# services.changedetection-io = {
|
||||||
|
# enable = true;
|
||||||
|
# baseURL = cfg.domain;
|
||||||
|
# behindProxy = true;
|
||||||
|
# listenAddress = cfg.address;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,8 +2,6 @@
|
||||||
{
|
{
|
||||||
text = ''
|
text = ''
|
||||||
unbind-key C-b
|
unbind-key C-b
|
||||||
set-option -g prefix C-[
|
|
||||||
bind-key C-[ send-prefix
|
|
||||||
bind -n M-r source-file ~/.config/tmux/tmux.conf
|
bind -n M-r source-file ~/.config/tmux/tmux.conf
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ let
|
||||||
(mkBookmark "Dashboard" "https://home.voronind.com")
|
(mkBookmark "Dashboard" "https://home.voronind.com")
|
||||||
(mkBookmark "Watch" "https://watch.voronind.com")
|
(mkBookmark "Watch" "https://watch.voronind.com")
|
||||||
(mkBookmark "Telegram" "https://web.telegram.org/a")
|
(mkBookmark "Telegram" "https://web.telegram.org/a")
|
||||||
(mkBookmark "WorkChat" "https://fsmm.fsight.ru/fmp")
|
|
||||||
(mkBookmark "Mail" "https://mail.voronind.com")
|
(mkBookmark "Mail" "https://mail.voronind.com")
|
||||||
(mkBookmark "WorkMail" "https://mail.fsight.ru")
|
(mkBookmark "WorkMail" "https://mail.fsight.ru")
|
||||||
(mkBookmark "Git" "https://git.voronind.com")
|
(mkBookmark "Git" "https://git.voronind.com")
|
||||||
|
|
|
@ -2,57 +2,6 @@
|
||||||
let
|
let
|
||||||
iconTheme = "fa-solid";
|
iconTheme = "fa-solid";
|
||||||
|
|
||||||
links = [ (mkLink "Status" "fa-heartbeat" "https://${config.container.module.status.domain}") ];
|
|
||||||
|
|
||||||
services = [
|
|
||||||
(mkGroup "App" "fa-server" [
|
|
||||||
(mkLink "Change" "fa-user-secret" "https://${config.container.module.change.domain}")
|
|
||||||
(mkLink "Cloud" "fa-cloud" "https://${config.container.module.cloud.domain}")
|
|
||||||
(mkLink "Download" "fa-download" "https://${config.container.module.download.domain}")
|
|
||||||
(mkLink "Git" "fab fa-git-alt" "https://${config.container.module.git.domain}")
|
|
||||||
(mkLink "Iot" "fa-home" "https://${config.container.module.iot.domain}")
|
|
||||||
(mkLink "Mail" "fa-envelope" "https://${config.container.module.mail.domain}")
|
|
||||||
(mkLink "Paper" "fa-paperclip" "https://${config.container.module.paper.domain}")
|
|
||||||
(mkLink "Pass" "fa-key" "https://${config.container.module.pass.domain}")
|
|
||||||
(mkLink "Paste" "fa-paste" "https://${config.container.module.paste.domain}/s")
|
|
||||||
(mkLink "Print" "fa-print" "https://${config.container.module.print.domain}")
|
|
||||||
(mkLink "Read" "fa-book" "https://${config.container.module.read.domain}")
|
|
||||||
(mkLink "Search" "fa-search" "https://${config.container.module.search.domain}")
|
|
||||||
(mkLink "Stock" "fa-boxes-stacked" "https://${config.container.module.stock.domain}")
|
|
||||||
(mkLink "Watch" "fa-film" "https://${config.container.module.watch.domain}")
|
|
||||||
(mkLink "YouTube" "fab fa-youtube" "https://${config.container.module.yt.domain}")
|
|
||||||
])
|
|
||||||
(mkGroup "System" "fa-shield" [
|
|
||||||
(mkLink "Camera" "fa-camera" "https://camera.${config.container.domain}")
|
|
||||||
(mkLink "NixOS Search" "fa-snowflake" "https://search.nixos.org")
|
|
||||||
(mkLink "Printer" "fa-print" "https://printer.${config.container.domain}")
|
|
||||||
(mkLink "Router" "fa-route" "https://router.${config.container.domain}")
|
|
||||||
])
|
|
||||||
(mkGroup "Bookmark" "fa-bookmark" [
|
|
||||||
(mkLink "2gis" "fa-map-location-dot" "https://2gis.ru")
|
|
||||||
(mkLink "FontAwesome" "fa-font-awesome" "https://fontawesome.com/search?o=r&m=free")
|
|
||||||
(mkLink "Flibusta" "fa-book" "https://flibusta.is")
|
|
||||||
(mkLink "MonkeyType" "fa-keyboard" "https://monkeytype.com")
|
|
||||||
(mkLink "NerdFonts" "fa-font" "https://www.nerdfonts.com/cheat-sheet")
|
|
||||||
(mkLink "Reddit" "fab fa-reddit" "https://reddit.com")
|
|
||||||
(mkLink "Toolbox" "fa-toolbox" "https://it-tools.tech")
|
|
||||||
(mkLink "Zigbee" "fa-satellite-dish" "https://zigbee.blakadder.com")
|
|
||||||
])
|
|
||||||
(mkGroup "Pirate" "fa-skull-crossbones" [
|
|
||||||
(mkLink "1337x" "fa-skull-crossbones" "https://1337x.to")
|
|
||||||
(mkLink "Cs.rin.ru" "fa-skull-crossbones" "https://cs.rin.ru/forum/index.php")
|
|
||||||
(mkLink "DigitalCore" "fa-skull-crossbones" "https://digitalcore.club")
|
|
||||||
(mkLink "FitGirl" "fa-skull-crossbones" "https://fitgirl-repacks.site")
|
|
||||||
(mkLink "Hf" "fa-skull-crossbones" "https://happyfappy.org")
|
|
||||||
(mkLink "Lst" "fa-skull-crossbones" "https://lst.gg")
|
|
||||||
(mkLink "NnmClub" "fa-skull-crossbones" "https://nnmclub.to")
|
|
||||||
(mkLink "Rutor" "fa-skull-crossbones" "https://rutor.info")
|
|
||||||
(mkLink "Rutracker" "fa-skull-crossbones" "https://rutracker.org")
|
|
||||||
(mkLink "Switch Upd" "fa-skull-crossbones" "https://sigmapatches.su")
|
|
||||||
(mkLink "Tapochek.net" "fa-skull-crossbones" "https://tapochek.net/index.php")
|
|
||||||
])
|
|
||||||
];
|
|
||||||
|
|
||||||
mkGroup = name: icon: items: {
|
mkGroup = name: icon: items: {
|
||||||
inherit name items;
|
inherit name items;
|
||||||
icon = "${iconTheme} ${icon}";
|
icon = "${iconTheme} ${icon}";
|
||||||
|
@ -65,8 +14,6 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
cfg = {
|
cfg = {
|
||||||
inherit services links;
|
|
||||||
|
|
||||||
title = "Dashboard";
|
title = "Dashboard";
|
||||||
subtitle = "Home";
|
subtitle = "Home";
|
||||||
header = false;
|
header = false;
|
||||||
|
@ -99,6 +46,60 @@ let
|
||||||
light = colors;
|
light = colors;
|
||||||
dark = colors;
|
dark = colors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
links = [ (mkLink "Status" "fa-heartbeat" "https://${config.container.module.status.domain}") ];
|
||||||
|
|
||||||
|
services = [
|
||||||
|
(mkGroup "App" "fa-server" [
|
||||||
|
(mkLink "Change" "fa-user-secret" "https://${config.container.module.change.domain}")
|
||||||
|
(mkLink "Cloud" "fa-cloud" "https://${config.container.module.cloud.domain}")
|
||||||
|
(mkLink "Download" "fa-download" "https://${config.container.module.download.domain}")
|
||||||
|
(mkLink "Git" "fab fa-git-alt" "https://${config.container.module.git.domain}")
|
||||||
|
(mkLink "Iot" "fa-home" "https://${config.container.module.iot.domain}")
|
||||||
|
(mkLink "Mail" "fa-envelope" "https://${config.container.module.mail.domain}")
|
||||||
|
(mkLink "Paper" "fa-paperclip" "https://${config.container.module.paper.domain}")
|
||||||
|
(mkLink "Pass" "fa-key" "https://${config.container.module.pass.domain}")
|
||||||
|
(mkLink "Paste" "fa-paste" "https://${config.container.module.paste.domain}/s")
|
||||||
|
(mkLink "Print" "fa-print" "https://${config.container.module.print.domain}")
|
||||||
|
(mkLink "Read" "fa-book" "https://${config.container.module.read.domain}")
|
||||||
|
(mkLink "Search" "fa-search" "https://${config.container.module.search.domain}")
|
||||||
|
(mkLink "Stock" "fa-boxes-stacked" "https://${config.container.module.stock.domain}")
|
||||||
|
(mkLink "Watch" "fa-film" "https://${config.container.module.watch.domain}")
|
||||||
|
(mkLink "YouTube" "fab fa-youtube" "https://${config.container.module.yt.domain}")
|
||||||
|
])
|
||||||
|
(mkGroup "System" "fa-shield" [
|
||||||
|
(mkLink "Camera" "fa-camera" "https://camera.${config.container.domain}")
|
||||||
|
(mkLink "NixOS Search" "fa-snowflake" "https://search.nixos.org")
|
||||||
|
(mkLink "Printer" "fa-print" "https://printer.${config.container.domain}")
|
||||||
|
(mkLink "Router" "fa-route" "https://router.${config.container.domain}")
|
||||||
|
])
|
||||||
|
(mkGroup "Bookmark" "fa-bookmark" [
|
||||||
|
(mkLink "2gis" "fa-map-location-dot" "https://2gis.ru")
|
||||||
|
(mkLink "FontAwesome" "fa-font-awesome" "https://fontawesome.com/search?o=r&m=free")
|
||||||
|
(mkLink "Flibusta" "fa-book" "https://flibusta.is")
|
||||||
|
(mkLink "MonkeyType" "fa-keyboard" "https://monkeytype.com")
|
||||||
|
(mkLink "NerdFonts" "fa-font" "https://www.nerdfonts.com/cheat-sheet")
|
||||||
|
(mkLink "Reddit" "fab fa-reddit" "https://reddit.com")
|
||||||
|
(mkLink "Toolbox" "fa-toolbox" "https://it-tools.tech")
|
||||||
|
(mkLink "Zigbee" "fa-satellite-dish" "https://zigbee.blakadder.com")
|
||||||
|
])
|
||||||
|
(mkGroup "Work" "fa-briefcase" [
|
||||||
|
(mkLink "Vm Manager" "fa-server" "https://fs-vcsa.fs.fsight.world/ui")
|
||||||
|
])
|
||||||
|
(mkGroup "Pirate" "fa-skull-crossbones" [
|
||||||
|
(mkLink "1337x" "fa-skull-crossbones" "https://1337x.to")
|
||||||
|
(mkLink "Cs.rin.ru" "fa-skull-crossbones" "https://cs.rin.ru/forum/index.php")
|
||||||
|
(mkLink "DigitalCore" "fa-skull-crossbones" "https://digitalcore.club")
|
||||||
|
(mkLink "FitGirl" "fa-skull-crossbones" "https://fitgirl-repacks.site")
|
||||||
|
(mkLink "Hf" "fa-skull-crossbones" "https://happyfappy.org")
|
||||||
|
(mkLink "Lst" "fa-skull-crossbones" "https://lst.gg")
|
||||||
|
(mkLink "NnmClub" "fa-skull-crossbones" "https://nnmclub.to")
|
||||||
|
(mkLink "Rutor" "fa-skull-crossbones" "https://rutor.info")
|
||||||
|
(mkLink "Rutracker" "fa-skull-crossbones" "https://rutracker.org")
|
||||||
|
(mkLink "Switch Upd" "fa-skull-crossbones" "https://sigmapatches.su")
|
||||||
|
(mkLink "Tapochek.net" "fa-skull-crossbones" "https://tapochek.net/index.php")
|
||||||
|
])
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue