Tue Jun 4 04:16:30 PM CEST 2024
This commit is contained in:
parent
2f88658882
commit
d6f4ca2f3d
|
@ -12,11 +12,7 @@
|
||||||
./ssh
|
./ssh
|
||||||
./mpv
|
./mpv
|
||||||
];
|
];
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ telegram-desktop webcord devenv ];
|
||||||
telegram-desktop
|
|
||||||
webcord
|
|
||||||
devenv
|
|
||||||
];
|
|
||||||
|
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ inputs, config, pkgs, ... }:
|
{ inputs, config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
notify_script = (pkgs.writers.writePython3Bin "telegram-notify.py" { libraries = [ pkgs.python3Packages.python-telegram-bot ]; } ''
|
notify_script = (pkgs.writers.writePython3Bin "telegram-notify.py" {
|
||||||
|
libraries = [ pkgs.python3Packages.python-telegram-bot ];
|
||||||
|
} ''
|
||||||
import telegram
|
import telegram
|
||||||
import asyncio
|
import asyncio
|
||||||
import sys
|
import sys
|
||||||
|
@ -30,8 +32,7 @@
|
||||||
loop.run_until_complete(asyncio.wait([loop.create_task(run())]))
|
loop.run_until_complete(asyncio.wait([loop.create_task(run())]))
|
||||||
loop.close()
|
loop.close()
|
||||||
'');
|
'');
|
||||||
mkTimer = name: cfg:
|
mkTimer = name: cfg: {
|
||||||
{
|
|
||||||
Install.WantedBy = [ "timers.target" ];
|
Install.WantedBy = [ "timers.target" ];
|
||||||
Timer = {
|
Timer = {
|
||||||
Persistent = true;
|
Persistent = true;
|
||||||
|
@ -39,16 +40,11 @@
|
||||||
Unit = "${name}.service";
|
Unit = "${name}.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mkService = name: cfg:
|
mkService = name: cfg: {
|
||||||
{
|
|
||||||
Unit.Description = name;
|
Unit.Description = name;
|
||||||
Unit.OnFailure = "status_notify@%n.service";
|
Unit.OnFailure = "status_notify@%n.service";
|
||||||
Install = {
|
Install = { WantedBy = [ "default.target" ]; };
|
||||||
WantedBy = [ "default.target" ];
|
Service = { ExecStart = cfg.script; };
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStart = cfg.script;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
scripts = {
|
scripts = {
|
||||||
disk_check = {
|
disk_check = {
|
||||||
|
@ -115,8 +111,7 @@
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
home.username = "server";
|
home.username = "server";
|
||||||
home.homeDirectory = "/home/server";
|
home.homeDirectory = "/home/server";
|
||||||
nix = {
|
nix = {
|
||||||
|
@ -126,21 +121,19 @@ in
|
||||||
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
# home.profileDirectory = "${config.xdg.stateHome}/nix/profile";
|
# home.profileDirectory = "${config.xdg.stateHome}/nix/profile";
|
||||||
imports = [
|
imports = [ (import ./common.nix { inherit inputs config pkgs; }) ./ssh ];
|
||||||
(import ./common.nix { inherit inputs config pkgs; })
|
|
||||||
./ssh
|
|
||||||
];
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||||
LANG = "en_US.UTF-8";
|
LANG = "en_US.UTF-8";
|
||||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services = pkgs.lib.mapAttrs mkService scripts //
|
systemd.user.services = pkgs.lib.mapAttrs mkService scripts
|
||||||
(pkgs.lib.mapAttrs mkService {
|
// (pkgs.lib.mapAttrs mkService {
|
||||||
"status_notify@" = {
|
"status_notify@" = {
|
||||||
script = "${notify_script}/bin/telegram-notify.py %i";
|
script = "${notify_script}/bin/telegram-notify.py %i";
|
||||||
};});
|
};
|
||||||
|
});
|
||||||
systemd.user.timers = pkgs.lib.mapAttrs mkTimer scripts;
|
systemd.user.timers = pkgs.lib.mapAttrs mkTimer scripts;
|
||||||
|
|
||||||
# Don't forget to enable these timers! Or reboot, after which it should also be activated automatically
|
# Don't forget to enable these timers! Or reboot, after which it should also be activated automatically
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
".mailcap".text =
|
".mailcap".text =
|
||||||
"text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
|
"text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ mailcap ];
|
||||||
mailcap
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.notmuch = {
|
programs.notmuch = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -168,17 +166,22 @@
|
||||||
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
|
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
|
||||||
dirlist-tree = true;
|
dirlist-tree = true;
|
||||||
};
|
};
|
||||||
viewer = { pager = "${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua"; };
|
viewer = {
|
||||||
|
pager =
|
||||||
|
"${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua";
|
||||||
|
};
|
||||||
compose = { address-book-cmd = ''notmuch address "%s"''; };
|
compose = { address-book-cmd = ''notmuch address "%s"''; };
|
||||||
multipart-converters = {
|
multipart-converters = {
|
||||||
"text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
|
"text/html" =
|
||||||
|
"${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
|
||||||
};
|
};
|
||||||
filters = {
|
filters = {
|
||||||
"text/plain" = "cat";
|
"text/plain" = "cat";
|
||||||
"text/calendar" = "${pkgs.gnome.gnome-calendar}/bin/gnome-calendar";
|
"text/calendar" = "${pkgs.gnome.gnome-calendar}/bin/gnome-calendar";
|
||||||
"message/delivery-status" = "cat";
|
"message/delivery-status" = "cat";
|
||||||
"message/rfc822" = "cat";
|
"message/rfc822" = "cat";
|
||||||
"text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
|
"text/html" =
|
||||||
|
"${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
|
||||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -186,37 +189,45 @@
|
||||||
Zoho = {
|
Zoho = {
|
||||||
outgoing = "smtps://email%40thomasave.be@smtp.zoho.com";
|
outgoing = "smtps://email%40thomasave.be@smtp.zoho.com";
|
||||||
outgoing-cred-cmd = "cat ~/.secrets/Aerc/Zoho.key";
|
outgoing-cred-cmd = "cat ~/.secrets/Aerc/Zoho.key";
|
||||||
source = "maildir:///home/server/Storage/Thomas/Mail/email@thomasave.be/";
|
source =
|
||||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
"maildir:///home/server/Storage/Thomas/Mail/email@thomasave.be/";
|
||||||
|
check-mail-cmd =
|
||||||
|
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||||
check-mail-timeout = "60s";
|
check-mail-timeout = "60s";
|
||||||
default = "Inbox";
|
default = "Inbox";
|
||||||
from = "\"Thomas Avé\" <email@thomasave.be>";
|
from = ''"Thomas Avé" <email@thomasave.be>'';
|
||||||
cache-headers = true;
|
cache-headers = true;
|
||||||
};
|
};
|
||||||
UAntwerpen = {
|
UAntwerpen = {
|
||||||
outgoing = "ssh server@192.168.1.2 /home/server/Containers/mbsync/send.sh";
|
outgoing =
|
||||||
source = "maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@uantwerpen.be";
|
"ssh server@192.168.1.2 /home/server/Containers/mbsync/send.sh";
|
||||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
source =
|
||||||
|
"maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@uantwerpen.be";
|
||||||
|
check-mail-cmd =
|
||||||
|
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||||
check-mail-timeout = "60s";
|
check-mail-timeout = "60s";
|
||||||
default = "Inbox";
|
default = "Inbox";
|
||||||
from = "\"Thomas Avé\" <Thomas.Ave@uantwerpen.be>";
|
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
|
||||||
cache-headers = true;
|
cache-headers = true;
|
||||||
};
|
};
|
||||||
IMEC = {
|
IMEC = {
|
||||||
outgoing = "smtp+insecure://ave57%40imec.be@smtp.thomasave.be:1025";
|
outgoing = "smtp+insecure://ave57%40imec.be@smtp.thomasave.be:1025";
|
||||||
outgoing-cred-cmd = "cat ~/.secrets/Aerc/IMEC.key";
|
outgoing-cred-cmd = "cat ~/.secrets/Aerc/IMEC.key";
|
||||||
source = "maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@imec.be/";
|
source =
|
||||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
"maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@imec.be/";
|
||||||
|
check-mail-cmd =
|
||||||
|
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||||
check-mail-timeout = "60s";
|
check-mail-timeout = "60s";
|
||||||
default = "Inbox";
|
default = "Inbox";
|
||||||
from = "\"Thomas Avé\" <Thomas.Ave@imec.be>";
|
from = ''"Thomas Avé" <Thomas.Ave@imec.be>'';
|
||||||
cache-headers = true;
|
cache-headers = true;
|
||||||
};
|
};
|
||||||
NotMuch = {
|
NotMuch = {
|
||||||
source = "notmuch:///home/server/Storage/Thomas/Mail/";
|
source = "notmuch:///home/server/Storage/Thomas/Mail/";
|
||||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
check-mail-cmd =
|
||||||
|
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||||
check-mail-timeout = "60s";
|
check-mail-timeout = "60s";
|
||||||
from = "\"Thomas Avé\" <Thomas.Ave@uantwerpen.be>";
|
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
|
||||||
query-map = "${config.xdg.configHome}/aerc/map.conf";
|
query-map = "${config.xdg.configHome}/aerc/map.conf";
|
||||||
default = "INBOX";
|
default = "INBOX";
|
||||||
cache-headers = true;
|
cache-headers = true;
|
||||||
|
|
|
@ -66,9 +66,7 @@ in {
|
||||||
|
|
||||||
home.packages = with pkgs; [ wl-clipboard ];
|
home.packages = with pkgs; [ wl-clipboard ];
|
||||||
|
|
||||||
services.cliphist = {
|
services.cliphist = { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -5,7 +5,5 @@
|
||||||
source = ./files;
|
source = ./files;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
programs.mpv = {
|
programs.mpv = { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,7 @@ tmux-themepack = pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
shell = "${pkgs.zsh}/bin/zsh";
|
shell = "${pkgs.zsh}/bin/zsh";
|
||||||
terminal = "screen-256color";
|
terminal = "screen-256color";
|
||||||
|
|
|
@ -29,11 +29,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true; # see note on other shells below
|
enableZshIntegration = true; # see note on other shells below
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
config = {
|
config = { global = { hiden_env_diff = true; }; };
|
||||||
global = {
|
|
||||||
hiden_env_diff = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
programs.command-not-found.enable = true;
|
programs.command-not-found.enable = true;
|
||||||
programs.zoxide = {
|
programs.zoxide = {
|
||||||
|
|
Loading…
Reference in New Issue