Compare commits

...

2 commits

11 changed files with 199 additions and 18 deletions

46
flake.lock generated
View file

@ -455,6 +455,30 @@
"type": "github"
}
},
"jj": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1741300145,
"narHash": "sha256-OhHuNazHHgfDHOeqfITvBwRrtU246JJZYdx7NkIKoTc=",
"owner": "jj-vcs",
"repo": "jj",
"rev": "9aeb13488c10f9e4f599ee76391c2b5956ac6ae8",
"type": "github"
},
"original": {
"owner": "jj-vcs",
"repo": "jj",
"type": "github"
}
},
"lix": {
"flake": false,
"locked": {
@ -749,6 +773,7 @@
"ghostty": "ghostty",
"helix": "helix",
"home-manager": "home-manager",
"jj": "jj",
"lix-module": "lix-module",
"niri-flake": "niri-flake",
"nixos-cosmic": "nixos-cosmic",
@ -785,6 +810,27 @@
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"jj",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737685583,
"narHash": "sha256-p+NVABRpGi+pT+xxf9HcLcFVxG6L+vEEy+NwzB9T0f8=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "eb64cbcc8eee0fa87ebded92805280d2ec97415a",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [

View file

@ -156,6 +156,16 @@
utils.follows = "flake-utils";
};
};
jj = {
type = "github";
owner = "jj-vcs";
repo = "jj";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
outputs =
{

View file

@ -21,6 +21,12 @@
fuzzel.enable = true;
helix.enable = true;
gpg.enable = true;
jujutsu = {
enable = true;
email = "ulic.youthlic@gmail.com";
name = "ulic-youthlic";
signKey = "C6FCBD7F49E1CBBABD6661F7FC02063F04331A95";
};
git = {
email = "ulic.youthlic@gmail.com";
name = "ulic-youthlic";

View file

@ -24,5 +24,6 @@
./swaync.nix
./helix
./waybar.nix
./jujutsu.nix
];
}

View file

@ -8,7 +8,7 @@ term=foot
# title=foot
# locked-title=no
font=FiraCode Nerd Font:size=15:lang=en-US
# font=FiraCode Nerd Font:size=15:lang=en-US
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>

View file

@ -21,22 +21,35 @@
package = pkgs.ghostty;
settings = {
# font-family = "FiraCode Nerd Font";
# font-feature = [
# "calt=1"
# "clig=1"
# "liga=1"
# "cv01"
# "cv02"
# "cv06"
# "zero"
# "onum"
# "cv17"
# "ss05"
# "ss03"
# "cv16"
# "cv31"
# "cv29"
# "cv30"
# ];
# font-family = "Maple Mono SC NF";
font-feature = [
"calt=1"
"clig=1"
"liga=1"
"cv01"
"cv02"
"cv06"
"calt"
"zero"
"onum"
"cv17"
"cv01"
"cv96"
"cv97"
"cv98"
"cv99"
"ss05"
"ss03"
"cv16"
"cv31"
"cv29"
"cv30"
"ss08"
];
font-size = lib.mkForce 17;
# theme = "ayu";

View file

@ -0,0 +1,103 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.youthlic.programs.jujutsu;
in
{
options = {
youthlic.programs.jujutsu = {
enable = lib.mkEnableOption "jujutsu";
email = lib.mkOption {
type = lib.types.str;
description = ''
jujutsu email
'';
};
signKey = lib.mkOption {
type = lib.types.addCheck (lib.types.nullOr lib.types.str) (
x: (x == null || config.youthlic.programs.gpg.enable)
);
default = null;
description = ''
key fingerprint for sign commit
'';
};
name = lib.mkOption {
type = lib.types.str;
example = ''youthlic'';
description = ''
jujutsu name
'';
};
};
};
config = lib.mkMerge [
(lib.mkIf cfg.enable {
home.packages = with pkgs; [
delta
watchman
];
programs.jujutsu = {
enable = true;
settings = {
"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json";
snapshot = {
auto-track = "true";
max-new-file-size = 0;
};
core = {
fsmonitor = "watchman";
watchman.register-snapshot-trigger = true;
};
user = {
name = cfg.name;
email = cfg.email;
};
ui = {
color = "auto";
movement.edit = true;
graph.style = "square";
show-cryptographic-signatures = true;
pager = "delta";
diff = {
tool = "delta";
format = "git";
};
};
templates = {
log = ''
builtin_log_compact_full_description
'';
};
template-aliases = {
"format_short_signature(signature)" = "signature";
};
revset-aliases = {
"immutable_heads()" = ''
builtin_immutable_heads() | (trunk().. & ~mine())
'';
};
git = {
abandon-unreachable-commits = false;
};
};
};
})
(lib.mkIf (cfg.enable && (cfg.signKey != null)) {
programs.jujutsu.settings = {
git = {
sign-on-push = true;
};
signing = {
behavior = "drop";
backend = "gpg";
key = cfg.signKey;
};
};
})
];
}

View file

@ -141,7 +141,7 @@ in
];
style = ''
* {
font-family: LXGW Wenkai, FiraCode Nerd Font;
font-family: LXGW Wenkai, Maple Mono SC NF;
font-weight: bold;
font-size: 14px;
}

View file

@ -15,8 +15,8 @@
name = "Noto Serif CJK SC";
};
monospace = {
package = pkgs.nerd-fonts.fira-code;
name = "FiraCode Nerd Font";
package = pkgs.maple-mono-SC-NF;
name = "Maple Mono SC NF";
};
emoji = {
package = pkgs.noto-fonts-emoji;

View file

@ -38,6 +38,7 @@ in
enableDefaultPackages = false;
packages = with pkgs; [
nerd-fonts.fira-code
maple-mono-SC-NF
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
@ -55,7 +56,7 @@ in
"Noto Serif"
];
monospace = [
"FiraCode Nerd Font"
"Maple Mono SC NF"
];
emoji = [ "Noto Color Emoji" ];
};

View file

@ -8,6 +8,7 @@ let
./ghostty.nix
./juicity.nix
./dae.nix
./jujutsu.nix
];
overlay-list = map (file: import file args) overlay-files;
in