diff options
author | Vincent Ambo <mail@tazj.in> | 2022-05-09T14·42+0200 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-05-10T13·41+0000 |
commit | d54b1f5b30e71c4ddbed476f5588b622f1cc9469 (patch) | |
tree | e024c2bc0bbd2e57c3c27b1f28024476eb20ef4b | |
parent | a23b01c8bc0b29c89f31cde3684bd1b0b5f7ebdf (diff) |
refactor(tazjin/home): Split shared config into separate file r/4045
Change-Id: I898f1552f449e2d6bddc8e3e3a144d6c2490ce29 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5551 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to '')
-rw-r--r-- | users/tazjin/home/shared.nix | 84 | ||||
-rw-r--r-- | users/tazjin/home/tverskoy.nix | 79 |
2 files changed, 88 insertions, 75 deletions
diff --git a/users/tazjin/home/shared.nix b/users/tazjin/home/shared.nix new file mode 100644 index 000000000000..ade1e3a98357 --- /dev/null +++ b/users/tazjin/home/shared.nix @@ -0,0 +1,84 @@ +# Shared home configuration for all machines. + +{ 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" + ".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" + ]; + }; + + 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"; + }; + }; + + programs.fish = { + enable = true; + interactiveShellInit = '' + ${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"; + }; + + services.picom = { + enable = true; + vSync = true; + backend = "glx"; + }; + + # 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; +} diff --git a/users/tazjin/home/tverskoy.nix b/users/tazjin/home/tverskoy.nix index 8928dc76888f..7a997ec8cdd0 100644 --- a/users/tazjin/home/tverskoy.nix +++ b/users/tazjin/home/tverskoy.nix @@ -4,87 +4,16 @@ { config, lib, ... }: # home-manager { - imports = [ "${depot.third_party.impermanence}/home-manager.nix" ]; + imports = [ + depot.users.tazjin.home.shared + ]; home.persistence."/persist/tazjin/home" = { - allowOther = true; - directories = [ - ".cargo" - ".config/audacity" - ".config/google-chrome" - ".config/quassel-irc.org" ".config/spotify" - ".config/syncthing" ".config/unity3d" - ".electrum" - ".elfeed" - ".gnupg" ".local/share/Steam" - ".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" + ".electrum" ]; }; - - 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"; - }; - }; - - programs.fish = { - enable = true; - interactiveShellInit = '' - ${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"; - }; - - services.picom = { - enable = true; - vSync = true; - backend = "glx"; - }; - - # 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; } |