Tue Jun 4 04:16:30 PM CEST 2024
This commit is contained in:
parent
2f88658882
commit
d6f4ca2f3d
|
@ -50,7 +50,7 @@
|
|||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
trusted-users = ["root" "user"];
|
||||
trusted-users = [ "root" "user" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -12,11 +12,7 @@
|
|||
./ssh
|
||||
./mpv
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
telegram-desktop
|
||||
webcord
|
||||
devenv
|
||||
];
|
||||
home.packages = with pkgs; [ telegram-desktop webcord devenv ];
|
||||
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
notify_script = (pkgs.writers.writePython3Bin "telegram-notify.py" { libraries = [ pkgs.python3Packages.python-telegram-bot ]; } ''
|
||||
let
|
||||
notify_script = (pkgs.writers.writePython3Bin "telegram-notify.py" {
|
||||
libraries = [ pkgs.python3Packages.python-telegram-bot ];
|
||||
} ''
|
||||
import telegram
|
||||
import asyncio
|
||||
import sys
|
||||
|
@ -30,8 +32,7 @@
|
|||
loop.run_until_complete(asyncio.wait([loop.create_task(run())]))
|
||||
loop.close()
|
||||
'');
|
||||
mkTimer = name: cfg:
|
||||
{
|
||||
mkTimer = name: cfg: {
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
Timer = {
|
||||
Persistent = true;
|
||||
|
@ -39,16 +40,11 @@
|
|||
Unit = "${name}.service";
|
||||
};
|
||||
};
|
||||
mkService = name: cfg:
|
||||
{
|
||||
mkService = name: cfg: {
|
||||
Unit.Description = name;
|
||||
Unit.OnFailure = "status_notify@%n.service";
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = cfg.script;
|
||||
};
|
||||
Install = { WantedBy = [ "default.target" ]; };
|
||||
Service = { ExecStart = cfg.script; };
|
||||
};
|
||||
scripts = {
|
||||
disk_check = {
|
||||
|
@ -115,8 +111,7 @@
|
|||
'');
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
home.username = "server";
|
||||
home.homeDirectory = "/home/server";
|
||||
nix = {
|
||||
|
@ -126,21 +121,19 @@ in
|
|||
|
||||
xdg.enable = true;
|
||||
# home.profileDirectory = "${config.xdg.stateHome}/nix/profile";
|
||||
imports = [
|
||||
(import ./common.nix { inherit inputs config pkgs; })
|
||||
./ssh
|
||||
];
|
||||
imports = [ (import ./common.nix { inherit inputs config pkgs; }) ./ssh ];
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
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 //
|
||||
(pkgs.lib.mapAttrs mkService {
|
||||
systemd.user.services = pkgs.lib.mapAttrs mkService scripts
|
||||
// (pkgs.lib.mapAttrs mkService {
|
||||
"status_notify@" = {
|
||||
script = "${notify_script}/bin/telegram-notify.py %i";
|
||||
};});
|
||||
};
|
||||
});
|
||||
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
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
".mailcap".text =
|
||||
"text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
mailcap
|
||||
];
|
||||
home.packages = with pkgs; [ mailcap ];
|
||||
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
|
@ -168,17 +166,22 @@
|
|||
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
|
||||
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"''; };
|
||||
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 = {
|
||||
"text/plain" = "cat";
|
||||
"text/calendar" = "${pkgs.gnome.gnome-calendar}/bin/gnome-calendar";
|
||||
"message/delivery-status" = "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";
|
||||
};
|
||||
};
|
||||
|
@ -186,37 +189,45 @@
|
|||
Zoho = {
|
||||
outgoing = "smtps://email%40thomasave.be@smtp.zoho.com";
|
||||
outgoing-cred-cmd = "cat ~/.secrets/Aerc/Zoho.key";
|
||||
source = "maildir:///home/server/Storage/Thomas/Mail/email@thomasave.be/";
|
||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
source =
|
||||
"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";
|
||||
default = "Inbox";
|
||||
from = "\"Thomas Avé\" <email@thomasave.be>";
|
||||
from = ''"Thomas Avé" <email@thomasave.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
UAntwerpen = {
|
||||
outgoing = "ssh server@192.168.1.2 /home/server/Containers/mbsync/send.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";
|
||||
outgoing =
|
||||
"ssh server@192.168.1.2 /home/server/Containers/mbsync/send.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";
|
||||
default = "Inbox";
|
||||
from = "\"Thomas Avé\" <Thomas.Ave@uantwerpen.be>";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
IMEC = {
|
||||
outgoing = "smtp+insecure://ave57%40imec.be@smtp.thomasave.be:1025";
|
||||
outgoing-cred-cmd = "cat ~/.secrets/Aerc/IMEC.key";
|
||||
source = "maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@imec.be/";
|
||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
source =
|
||||
"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";
|
||||
default = "Inbox";
|
||||
from = "\"Thomas Avé\" <Thomas.Ave@imec.be>";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@imec.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
NotMuch = {
|
||||
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";
|
||||
from = "\"Thomas Avé\" <Thomas.Ave@uantwerpen.be>";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
|
||||
query-map = "${config.xdg.configHome}/aerc/map.conf";
|
||||
default = "INBOX";
|
||||
cache-headers = true;
|
||||
|
|
|
@ -66,9 +66,7 @@ in {
|
|||
|
||||
home.packages = with pkgs; [ wl-clipboard ];
|
||||
|
||||
services.cliphist = {
|
||||
enable = true;
|
||||
};
|
||||
services.cliphist = { enable = true; };
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
|
|
|
@ -5,7 +5,5 @@
|
|||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
};
|
||||
programs.mpv = { enable = true; };
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
tmux-themepack = pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||
tmux-themepack = pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||
pluginName = "tmux-themepack";
|
||||
rtpFilePath = "themepack.tmux";
|
||||
version = "unstable-2019-12-22";
|
||||
|
@ -13,8 +13,7 @@ tmux-themepack = pkgs.tmuxPlugins.mkTmuxPlugin {
|
|||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
programs.tmux = {
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
terminal = "screen-256color";
|
||||
|
|
|
@ -23,17 +23,13 @@
|
|||
TERM = "screen-256color";
|
||||
PYTHONDONTWRITEBYTECODE = "1";
|
||||
GOPATH = "${config.xdg.dataHome}/go";
|
||||
DIRENV_LOG_FORMAT="";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
};
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true; # see note on other shells below
|
||||
nix-direnv.enable = true;
|
||||
config = {
|
||||
global = {
|
||||
hiden_env_diff = true;
|
||||
};
|
||||
};
|
||||
config = { global = { hiden_env_diff = true; }; };
|
||||
};
|
||||
programs.command-not-found.enable = true;
|
||||
programs.zoxide = {
|
||||
|
|
Loading…
Reference in New Issue