diff --git a/machines/moritz-desktop/configuration.nix b/machines/moritz-desktop/configuration.nix index e089aed..4bb254d 100644 --- a/machines/moritz-desktop/configuration.nix +++ b/machines/moritz-desktop/configuration.nix @@ -34,6 +34,7 @@ personal.contacts = true; impermanence.enable = true; webis.enable = true; + jujutsu.enable = true; }; programs.prismlauncher.enable = true; programs.aider.enable = true; @@ -47,37 +48,6 @@ networking.firewall.allowedTCPPorts = [9090]; - # TODO: make this its own module! - home-manager.users.moritz.programs.jujutsu = { - enable = true; - settings = { - user = { - email = "mail@moritzboeh.me"; - name = "Moritz Böhme"; - }; - ui.paginate = "never"; - ui.default-command = "log"; - signing = { - behavior = "drop"; - backend = "gpg"; - key = "0x970C6E89EB0547A9"; - }; - git.sign-on-push = true; - aliases = { - tug = ["bookmark" "move" "--from" "closest_bookmark(@)" "--to" "closest_pushable(@)"]; - mm-update = ["rebase" "--source" "closest_merge(@)" "--destination" "all:closest_merge(@)-"]; - mm-rebase = ["rebase" "--source" "all:roots(trunk()..closest_merge(@))"]; - }; - revset-aliases = { - "closest_bookmark(to)" = "heads(::to & bookmarks())"; - "closest_pushable(to)" = "heads(::to & mutable() & ~description(exact:'') & (~empty() | merges()) & ~private())"; - "closest_merge(to)" = "heads(::to & merges())"; - "private()" = "description(glob:'wip:*') | description(glob:'private:*')"; - }; - git.private-commits = "private()"; - }; - }; - home-manager.users.moritz.services.kanshi.settings = [ { profile.name = "default"; diff --git a/machines/moritz-laptop/configuration.nix b/machines/moritz-laptop/configuration.nix index 0107bda..b5d6bfc 100644 --- a/machines/moritz-laptop/configuration.nix +++ b/machines/moritz-laptop/configuration.nix @@ -35,6 +35,7 @@ personal.contacts = true; personal.calendar = true; impermanence.enable = true; + jujutsu.enable = true; }; programs.aider.enable = true; }; diff --git a/modules/moritz/profiles/jujutsu.nix b/modules/moritz/profiles/jujutsu.nix new file mode 100644 index 0000000..c376bf3 --- /dev/null +++ b/modules/moritz/profiles/jujutsu.nix @@ -0,0 +1,42 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.my.profiles.jujutsu; +in { + options.my.profiles.jujutsu.enable = mkEnableOption "jujutsu profile"; + + config = mkIf cfg.enable { + home-manager.users.moritz.programs.jujutsu = { + enable = true; + settings = { + user = { + email = "mail@moritzboeh.me"; + name = "Moritz Böhme"; + }; + ui.paginate = "never"; + ui.default-command = "log"; + signing = { + behavior = "drop"; + backend = "gpg"; + key = "0x970C6E89EB0547A9"; + }; + git.sign-on-push = true; + aliases = { + tug = ["bookmark" "move" "--from" "closest_bookmark(@)" "--to" "closest_pushable(@)"]; + mm-update = ["rebase" "--source" "closest_merge(@)" "--destination" "all:closest_merge(@)-"]; + mm-rebase = ["rebase" "--source" "all:roots(trunk()..closest_merge(@))"]; + }; + revset-aliases = { + "closest_bookmark(to)" = "heads(::to & bookmarks())"; + "closest_pushable(to)" = "heads(::to & mutable() & ~description(exact:'') & (~empty() | merges()) & ~private())"; + "closest_merge(to)" = "heads(::to & merges())"; + "private()" = "description(glob:'wip:*') | description(glob:'private:*')"; + }; + git.private-commits = "private()"; + }; + }; + }; +}