diff options
Diffstat (limited to 'users/tazjin/home')
-rw-r--r-- | users/tazjin/home/khamovnik.nix | 10 | ||||
-rw-r--r-- | users/tazjin/home/persistence.nix | 42 | ||||
-rw-r--r-- | users/tazjin/home/shared.nix | 71 | ||||
-rw-r--r-- | users/tazjin/home/tverskoy.nix | 2 | ||||
-rw-r--r-- | users/tazjin/home/zamalek.nix | 1 |
5 files changed, 92 insertions, 34 deletions
diff --git a/users/tazjin/home/khamovnik.nix b/users/tazjin/home/khamovnik.nix new file mode 100644 index 0000000000..6bac67eb1c --- /dev/null +++ b/users/tazjin/home/khamovnik.nix @@ -0,0 +1,10 @@ +# Home manage configuration for zamalek. + +{ depot, pkgs, ... }: # readTree +{ config, lib, ... }: # home-manager + +{ + imports = [ + depot.users.tazjin.home.shared + ]; +} diff --git a/users/tazjin/home/persistence.nix b/users/tazjin/home/persistence.nix new file mode 100644 index 0000000000..9ea5ca8eb9 --- /dev/null +++ b/users/tazjin/home/persistence.nix @@ -0,0 +1,42 @@ +# Persistence configuration for machines with throw-away setups. + +{ depot, pkgs, ... }: # readTree +{ config, lib, ... }: # home-manager + +{ + imports = [ (depot.third_party.sources.impermanence + "/home-manager.nix") ]; + + home.persistence."/persist/tazjin/home" = { + allowOther = true; + + directories = [ + ".cargo" + ".config/audacity" + ".config/chromium" + ".config/google-chrome" + ".config/quassel-irc.org" + ".config/syncthing" + ".config/unity3d" + ".electrum" + ".gnupg" + ".local/share/audacity" + ".local/share/direnv" + ".local/share/fish" + ".local/share/keyrings" + ".local/share/zoxide" + ".mozilla/firefox" + ".password-store" + ".rustup" + ".ssh" + ".steam" + ".telega" + ".thunderbird" + "go" + "mail" + ]; + + files = [ + ".notmuch-config" + ]; + }; +} diff --git a/users/tazjin/home/shared.nix b/users/tazjin/home/shared.nix index 070639c05c..38d8add4ac 100644 --- a/users/tazjin/home/shared.nix +++ b/users/tazjin/home/shared.nix @@ -3,39 +3,15 @@ { depot, pkgs, ... }: # readTree { config, lib, ... }: # home-manager -{ - imports = [ "${depot.third_party.impermanence}/home-manager.nix" ]; - - home.persistence."/persist/tazjin/home" = { - allowOther = true; - - directories = [ - ".cargo" - ".config/audacity" - ".config/google-chrome" - ".config/quassel-irc.org" - ".config/unity3d" - ".gnupg" - ".local/share/audacity" - ".local/share/direnv" - ".local/share/fish" - ".local/share/keyrings" - ".local/share/zoxide" - ".mozilla/firefox" - ".password-store" - ".rustup" - ".ssh" - ".steam" - ".telega" - "go" - "mail" - ]; - - files = [ - ".notmuch-config" - ]; - }; +let + # 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 ''; @@ -54,23 +30,49 @@ 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 ''; }; services.screen-locker = { enable = true; - enableDetectSleep = true; inactiveInterval = 10; # minutes lockCmd = "${depot.users.tazjin.screenLock}/bin/tazjin-screen-lock"; }; + 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" ]; + }; + }; + services.picom = { enable = true; vSync = true; backend = "glx"; }; + services.syncthing.enable = true; + # Enable the dunst notification daemon, but force the # configuration file separately instead of going via the strange # Nix->dunstrc encoding route. @@ -83,4 +85,7 @@ }; 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"; } diff --git a/users/tazjin/home/tverskoy.nix b/users/tazjin/home/tverskoy.nix index 674612cf7e..6f1116340c 100644 --- a/users/tazjin/home/tverskoy.nix +++ b/users/tazjin/home/tverskoy.nix @@ -6,13 +6,13 @@ { imports = [ depot.users.tazjin.home.shared + depot.users.tazjin.home.persistence ]; home.persistence."/persist/tazjin/home" = { directories = [ ".config/spotify" ".local/share/Steam" - ".electrum" ]; }; } diff --git a/users/tazjin/home/zamalek.nix b/users/tazjin/home/zamalek.nix index 6bac67eb1c..d24de945bb 100644 --- a/users/tazjin/home/zamalek.nix +++ b/users/tazjin/home/zamalek.nix @@ -6,5 +6,6 @@ { imports = [ depot.users.tazjin.home.shared + depot.users.tazjin.home.persistence ]; } |