2022-05-09 16:42:19 +02:00
|
|
|
# Shared home configuration for all machines.
|
|
|
|
|
|
|
|
{ depot, pkgs, ... }: # readTree
|
|
|
|
{ config, lib, ... }: # home-manager
|
|
|
|
|
2023-06-30 17:24:43 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
# URL handler to open `tg://` URLs in telega.el
|
|
|
|
telega-launcher = pkgs.writeShellScriptBin "telega-launcher" ''
|
|
|
|
echo "Opening ''${1} in telega.el ..."
|
|
|
|
${pkgs.emacs-unstable}/bin/emacsclient -e "(telega-browse-url \"''${1}\")"
|
|
|
|
'';
|
|
|
|
in
|
2022-05-09 16:42:19 +02:00
|
|
|
{
|
|
|
|
home.activation.screenshots = lib.hm.dag.entryAnywhere ''
|
|
|
|
$DRY_RUN_CMD mkdir -p $HOME/screenshots
|
|
|
|
'';
|
|
|
|
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "Vincent Ambo";
|
|
|
|
userEmail = "mail@tazj.in";
|
|
|
|
extraConfig = {
|
|
|
|
pull.rebase = true;
|
|
|
|
init.defaultBranch = "canon";
|
2022-05-10 17:24:58 +02:00
|
|
|
safe.directory = [ "/depot" ];
|
2022-05-09 16:42:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
|
|
|
interactiveShellInit = ''
|
|
|
|
${pkgs.zoxide}/bin/zoxide init fish | source
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
services.screen-locker = {
|
|
|
|
enable = true;
|
|
|
|
inactiveInterval = 10; # minutes
|
|
|
|
lockCmd = "${depot.users.tazjin.screenLock}/bin/tazjin-screen-lock";
|
|
|
|
};
|
|
|
|
|
2023-06-30 17:24:43 +02:00
|
|
|
home.packages = [ telega-launcher ];
|
|
|
|
|
|
|
|
xdg.desktopEntries.telega-launcher = {
|
|
|
|
name = "Telega Launcher";
|
|
|
|
exec = "${telega-launcher}/bin/telega-launcher";
|
|
|
|
terminal = false;
|
|
|
|
mimeType = [ "x-scheme-handler/tg" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg.mimeApps = {
|
|
|
|
enable = true;
|
|
|
|
defaultApplications = {
|
|
|
|
"x-scheme-handler/tg" = [ "telega-launcher.desktop" ];
|
|
|
|
"text/html" = [ "chromium-browser.desktop" ];
|
|
|
|
"x-scheme-handler/http" = [ "chromium-browser.desktop" ];
|
|
|
|
"x-scheme-handler/https" = [ "chromium-browser.desktop" ];
|
|
|
|
"x-scheme-handler/about" = [ "chromium-browser.desktop" ];
|
|
|
|
"x-scheme-handler/unknown" = [ "chromium-browser.desktop" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-05-09 16:42:19 +02:00
|
|
|
services.picom = {
|
|
|
|
enable = true;
|
|
|
|
vSync = true;
|
|
|
|
backend = "glx";
|
|
|
|
};
|
|
|
|
|
2022-07-14 15:37:34 +02:00
|
|
|
services.syncthing.enable = true;
|
|
|
|
|
2022-05-09 16:42:19 +02:00
|
|
|
# Enable the dunst notification daemon, but force the
|
|
|
|
# configuration file separately instead of going via the strange
|
|
|
|
# Nix->dunstrc encoding route.
|
|
|
|
services.dunst.enable = true;
|
|
|
|
xdg.configFile."dunst/dunstrc" = {
|
|
|
|
source = depot.users.tazjin.dotfiles.dunstrc;
|
|
|
|
onChange = ''
|
|
|
|
${pkgs.procps}/bin/pkill -u "$USER" ''${VERBOSE+-e} dunst || true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.startServices = true;
|
2022-10-26 15:39:00 +02:00
|
|
|
|
|
|
|
# Previous default version, see https://github.com/nix-community/home-manager/blob/master/docs/release-notes/rl-2211.adoc
|
|
|
|
home.stateVersion = "18.09";
|
2022-05-09 16:42:19 +02:00
|
|
|
}
|