tvl-depot/users/tazjin/home/shared.nix
Vincent Ambo c352306491 feat(tazjin/home): configure chicago95 theme in home-manager
Finally no more setting this up manually!

Change-Id: I75d7a53623cc05a0a88f70e20e881a944b6ed818
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12446
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-07 11:40:09 +00:00

112 lines
2.9 KiB
Nix

# Shared home configuration for all machines.
{ depot, pkgs, ... }: # readTree
{ config, lib, ... }: # home-manager
let
inherit (depot.third_party) chicago95;
# URL handler to open `tg://` URLs in telega.el
telega-launcher = pkgs.writeShellScriptBin "telega-launcher" ''
echo "Opening ''${1} in telega.el ..."
${depot.users.tazjin.emacs.emacs}/bin/emacsclient -e "(telega-browse-url \"''${1}\")"
'';
in
{
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";
safe.directory = [ "/depot" ];
};
};
programs.fish = {
enable = true;
interactiveShellInit = ''
# emacs vterm integration
source (find '${pkgs.emacsPackages.vterm}' -name 'emacs-vterm.fish')
# z
${pkgs.zoxide}/bin/zoxide init fish | source
'';
};
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" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
};
};
programs.wpaperd = {
enable = true;
settings = {
default = {
duration = "1d";
mode = "center";
sorting = "random";
};
any.path = ../wallpapers;
};
};
services.swayidle = let cmd = "${pkgs.swaylock}/bin/swaylock -fFkl -c 008080"; in {
enable = true;
events = [
{ event = "before-sleep"; command = cmd; }
{ event = "lock"; command = cmd; }
];
};
# 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
'';
};
gtk = {
enable = true;
theme.name = "Chicago95";
theme.package = chicago95;
iconTheme.name = "Chicago95-tux";
iconTheme.package = chicago95;
cursorTheme.name = "Chicago95_Animated_Hourglass_Cursors_HiDPI";
cursorTheme.package = chicago95;
};
systemd.user.startServices = true;
# Previous default version, see https://github.com/nix-community/home-manager/blob/master/docs/release-notes/rl-2211.adoc
home.stateVersion = "18.09";
}