Compare commits

...

8 commits

28 changed files with 347 additions and 155 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 11 MiB

Before After
Before After

152
flake.lock generated
View file

@ -70,11 +70,11 @@
"bt-tracker": {
"flake": false,
"locked": {
"lastModified": 1741046917,
"narHash": "sha256-Pbn6cHfsoSkHUH2+se7pL4zy+iRyb2TQabAdTv/PxWk=",
"lastModified": 1741248524,
"narHash": "sha256-Xjtm8Kgb2uI9bxRKjX//rA6eTObZlHWO28tWYQRJ8GA=",
"owner": "XIU2",
"repo": "TrackersListCollection",
"rev": "71ef675ff8bf2f7a9daf7a837975c1491259a81b",
"rev": "0f4adc547a23d130ab724fd35db9bbb16cd6cc05",
"type": "github"
},
"original": {
@ -83,21 +83,6 @@
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1737563566,
"narHash": "sha256-GLJvkOG29XCynQm8XWPyykMRqIhxKcBARVu7Ydrz02M=",
"owner": "ipetkov",
"repo": "crane",
"rev": "849376434956794ebc7a6b487d31aace395392ba",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"dae": {
"inputs": {
"flake-parts": [
@ -347,11 +332,11 @@
"zig2nix": "zig2nix"
},
"locked": {
"lastModified": 1740954062,
"narHash": "sha256-VVsSwi1sTVCL0fijNHqw1hv/546acgxxrTAChl/K254=",
"lastModified": 1741213203,
"narHash": "sha256-3/z39Y2AuLIm2OKWDAR1iPi1uo+LZju1XwW2NAxKUcY=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "ee8ae196ee0fad3824c7ae9eac947f2128b4ae4f",
"rev": "e07b6fdf6ba342eb1fc4321c26fe5a6475be5133",
"type": "github"
},
"original": {
@ -427,7 +412,6 @@
},
"helix": {
"inputs": {
"crane": "crane",
"flake-utils": [
"flake-utils"
],
@ -437,11 +421,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1741046983,
"narHash": "sha256-Ru+9beBMAMfPQBY1PZQQwDxjoz5E1hg8GZ/r40p+u8s=",
"lastModified": 1741117937,
"narHash": "sha256-3tVOFN2Da0aP+4KTqITEkxUGB9JR2YL8cbAtZf3rS+I=",
"owner": "helix-editor",
"repo": "helix",
"rev": "9440feae7cf1bd67a741eb0b9bc2450a40e1b431",
"rev": "a3fa65880e44e6bb50acb3a407354db174702441",
"type": "github"
},
"original": {
@ -458,11 +442,11 @@
]
},
"locked": {
"lastModified": 1741056285,
"narHash": "sha256-/JKDMVqq8PIqcGonBVKbKq1SooV3kzGmv+cp3rKAgPA=",
"lastModified": 1741217763,
"narHash": "sha256-g/TrltIjFHIjtzKY5CJpoPANfHQWDD43G5U1a/v5oVg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "70fbbf05a5594b0a72124ab211bff1d502c89e3f",
"rev": "486b066025dccd8af7fbe5dd2cc79e46b88c80da",
"type": "github"
},
"original": {
@ -471,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": {
@ -522,11 +530,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1741038776,
"narHash": "sha256-SCsg2krbDYOAZMn2QWYvGPoVgyaFUVTqGWKYNtmv7HI=",
"lastModified": 1741266295,
"narHash": "sha256-qECYk7NciED3rBjkGrLhAdA9+7nkqRbzcBb5baytvrk=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "07eb55b6ef73fae9d702e274411079fe7d9ddfaa",
"rev": "5d72516628f943a5a86bbccd7c650d1c6a468552",
"type": "github"
},
"original": {
@ -555,11 +563,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1741001804,
"narHash": "sha256-rMc6olQE1pT8M9wxapgDLLROBgUUX11SmAcPMRSivsA=",
"lastModified": 1741260996,
"narHash": "sha256-uKWfBwNLZEsDnICY7immZn/oLhQos227SDiEnDQwTI4=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "26618f8d50dffda41791a211fd2aa02479a6d6a9",
"rev": "88fcf0c2a996ef61bb1f51cb02afa7686de1bbe1",
"type": "github"
},
"original": {
@ -575,11 +583,11 @@
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
"lastModified": 1741055622,
"narHash": "sha256-z1y6MSfJ9pntwJ7YCkjNyGnqvYMHMnB9kH3v5Z/g9vQ=",
"lastModified": 1741259319,
"narHash": "sha256-XQrxZmJbsDRFJ78mVtjEzII/UzknDqDq0zVT1WemkLM=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "f3f91440dfd18518445d9ab757cf3e540c7fd6ab",
"rev": "b60b139bf22f5d941b626594981d698502dfc500",
"type": "github"
},
"original": {
@ -606,11 +614,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1740828860,
"narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=",
"lastModified": 1741173522,
"narHash": "sha256-k7VSqvv0r1r53nUI/IfPHCppkUAddeXn843YlAC5DR0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "303bd8071377433a2d8f76e684ec773d70c5b642",
"rev": "d69ab0d71b22fa1ce3dbeff666e6deb4917db049",
"type": "github"
},
"original": {
@ -650,11 +658,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1740932899,
"narHash": "sha256-F0qDu2egq18M3edJwEOAE+D+VQ+yESK6YWPRQBfOqq8=",
"lastModified": 1741048562,
"narHash": "sha256-W4YZ3fvWZiFYYyd900kh8P8wU6DHSiwaH0j4+fai1Sk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1546c45c538633ae40b93e2d14e0bb6fd8f13347",
"rev": "6af28b834daca767a7ef99f8a7defa957d0ade6f",
"type": "github"
},
"original": {
@ -666,11 +674,11 @@
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1740865531,
"narHash": "sha256-h00vGIh/jxcGl8aWdfnVRD74KuLpyY3mZgMFMy7iKIc=",
"lastModified": 1741048562,
"narHash": "sha256-W4YZ3fvWZiFYYyd900kh8P8wU6DHSiwaH0j4+fai1Sk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5ef6c425980847c78a80d759abc476e941a9bf42",
"rev": "6af28b834daca767a7ef99f8a7defa957d0ade6f",
"type": "github"
},
"original": {
@ -706,11 +714,11 @@
"nur-rycee": {
"flake": false,
"locked": {
"lastModified": 1741061004,
"narHash": "sha256-rDqQL+kNpzSNfo5xYIwZiO++TkEU+0CNCtL4dywmw1w=",
"lastModified": 1741233805,
"narHash": "sha256-aNmlbxeKPUfuOynHvIMBPrNgEs1ldHDIz1wbkitKDSs=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "3023b1d8f9f85b9bbc0df2dff78de83cf89dd948",
"rev": "a1cc22e90f45f6075a991348e896f1595c4efce9",
"type": "gitlab"
},
"original": {
@ -723,11 +731,11 @@
"nur-xddxdd": {
"flake": false,
"locked": {
"lastModified": 1741065446,
"narHash": "sha256-uuB16h08egKqEIzZDppBED2toZ8Igbj5ytdNL8TQ79w=",
"lastModified": 1741169085,
"narHash": "sha256-V1H/DSBzOt+jDxckk19ngxwf1JUWOLOG4nZ2Tq3AgMU=",
"owner": "xddxdd",
"repo": "nur-packages",
"rev": "e2f461ce9f29c07154bd97c0e3ef413f0014bed5",
"rev": "75eb8b2b04dc8ee631ef036e8d2ff9c31e2c2ec4",
"type": "github"
},
"original": {
@ -765,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",
@ -788,11 +797,32 @@
]
},
"locked": {
"lastModified": 1737599167,
"narHash": "sha256-S2rHCrQWCDVp63XxL/AQbGr1g5M8Zx14C7Jooa4oM8o=",
"lastModified": 1740623427,
"narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "38374302ae9edf819eac666d1f276d62c712dd06",
"rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"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": {
@ -849,11 +879,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1740959323,
"narHash": "sha256-UtSKsLCWwA4wPFm7mgl33qeu8sj0on9Hyt3YhDWWkAM=",
"lastModified": 1741112087,
"narHash": "sha256-dBGwN4aHmX2QUXolZDhV+p06+WM5ZykL4wd9BD6bT7k=",
"owner": "danth",
"repo": "stylix",
"rev": "489833b201a84488c6b4371a261fdbcafa6abcb6",
"rev": "11780517948f214b9f93d1bf5a2d29bc181d3a33",
"type": "github"
},
"original": {
@ -1016,11 +1046,11 @@
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1739246919,
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
"lastModified": 1741140299,
"narHash": "sha256-Y2bPO92Yg5HcH5ORvrVOQb4wRGEapGEteHXGtNvboxk=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
"rev": "10cb041a80bb815cc1789cfa305923f1f9e3713d",
"type": "github"
},
"original": {

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

@ -20,6 +20,7 @@
hostName = "Cape";
};
users.deploy.enable = true;
containers.interface = "ens3";
programs = {
transfer-sh.enable = true;
rustypaste = {

View file

@ -5,13 +5,12 @@
domain = "forgejo.youthlic.fun";
sshPort = 2222;
httpPort = 8480;
interface = "ens3";
};
networking.firewall.allowedTCPPorts = [ 2222 ];
services.caddy.virtualHosts = {
"forgejo.${config.youthlic.programs.caddy.baseDomain}" = {
extraConfig = ''
reverse_proxy 10.231.136.102:8480
reverse_proxy 192.168.111.101:8480
'';
};
};

View file

@ -4,13 +4,12 @@
};
youthlic.containers.miniflux = {
enable = true;
interface = "ens3";
adminCredentialsFile = config.sops.secrets."miniflux".path;
};
services.caddy.virtualHosts = {
"miniflux.${config.youthlic.programs.caddy.baseDomain}" = {
extraConfig = ''
reverse_proxy 10.231.137.102:8485
reverse_proxy 192.168.111.102:8485
'';
};
};

View file

@ -21,7 +21,7 @@
];
matchConfig.Name = "eno2";
# networkConfig = {
# DHCP = "no";
# DHCP = "yes";
# IPv6AcceptRA = true;
# };
};

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

@ -1,7 +1,46 @@
{ ... }:
{ config, lib, ... }:
let
cfg = config.youthlic.containers;
in
{
imports = [
./forgejo.nix
./miniflux.nix
];
options = {
youthlic.containers = {
enable = lib.mkEnableOption "containers";
interface = lib.mkOption {
type = lib.types.nonEmptyStr;
};
bridgeName = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "br0";
};
};
};
config = lib.mkIf cfg.enable {
networking = {
bridges."${cfg.bridgeName}".interfaces = [
];
interfaces."${cfg.bridgeName}" = {
useDHCP = true;
ipv4.addresses = [
{
address = "192.168.111.1";
prefixLength = 24;
}
];
};
nat = {
enable = true;
internalInterfaces = [
cfg.bridgeName
"ve-+"
"vb-+"
];
externalInterface = cfg.interface;
};
};
};
}

View file

@ -18,25 +18,16 @@ in
type = lib.types.port;
default = 8480;
};
interface = lib.mkOption {
type = lib.types.nonEmptyStr;
example = "ens3";
};
};
};
config = lib.mkIf cfg.enable {
networking.nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = cfg.interface;
enableIPv6 = true;
};
youthlic.containers.enable = true;
containers."forgejo" = {
ephemeral = true;
autoStart = true;
privateNetwork = true;
hostAddress = "10.231.136.1";
localAddress = "10.231.136.102";
hostBridge = "${config.youthlic.containers.bridgeName}";
localAddress = "192.168.111.101/24";
bindMounts = {
"/var/lib/forgejo" = {
hostPath = "/mnt/containers/forgejo/state";
@ -99,6 +90,7 @@ in
};
networking = {
defaultGateway = "192.168.111.1";
firewall = {
enable = true;
allowedTCPPorts = [

View file

@ -9,25 +9,16 @@ in
adminCredentialsFile = lib.mkOption {
type = lib.types.nonEmptyStr;
};
interface = lib.mkOption {
type = lib.types.nonEmptyStr;
example = "ens3";
};
};
};
config = lib.mkIf cfg.enable {
networking.nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = cfg.interface;
enableIPv6 = true;
};
youthlic.containers.enable = true;
containers."miniflux" = {
ephemeral = true;
autoStart = true;
privateNetwork = true;
hostAddress = "10.231.137.1";
localAddress = "10.231.137.102";
hostBridge = "${config.youthlic.containers.bridgeName}";
localAddress = "192.168.111.102/24";
bindMounts = {
"/var/lib/miniflux" = {
hostPath = "/mnt/containers/miniflux/state";
@ -41,18 +32,6 @@ in
isReadOnly = true;
};
};
forwardPorts = [
{
containerPort = 8485;
hostPort = 8485;
protocol = "tcp";
}
{
containerPort = 8485;
hostPort = 8485;
protocol = "udp";
}
];
config =
{ lib, ... }:
@ -92,6 +71,7 @@ in
};
networking = {
defaultGateway = "192.168.111.1";
firewall = {
enable = true;
allowedTCPPorts = [ 8485 ];

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

@ -12,8 +12,8 @@ global {
auto_config_kernel_parameter: true
dial_mode: domain
tcp_check_url: 'http://cp.cloudflare.com'
udp_check_dns: 'dns.google.com:53'
# tcp_check_url: 'http://cp.cloudflare.com'
# udp_check_dns: '114.114.114.114:53'
check_interval: 600s
check_tolerance: 50ms
@ -25,7 +25,7 @@ dns {
upstream {
googledns: 'tcp+udp://8.8.8.8:53'
alidns: 'udp://dns.alidns.com:53'
alidns: 'udp://223.5.5.5:53'
}
routing {
request {

View file

@ -18,6 +18,7 @@ in
(lib.mkIf cfg.enable {
services.dae = {
enable = true;
package = pkgs.dae;
openFirewall = {
enable = true;
port = 12345;
@ -63,6 +64,7 @@ in
fi
done
if [[ -d /etc/dae/proxy.d ]]; then
rm -rf /etc/proxy.d.old
mv /etc/dae/proxy.d /etc/dae/proxy.d.old
fi
mv ''${new_proxy} /etc/dae/proxy.d

View file

@ -31,6 +31,8 @@ in
watch-dir-enabled = true;
default-trackers = builtins.readFile "${inputs.bt-tracker}/all.txt";
rpc-bind-address = "0.0.0.0";
speed-limit-up-enabled = true;
speed-limit-up = 1000;
};
openRPCPort = true;
openPeerPorts = true;

View file

@ -0,0 +1,9 @@
{ inputs, ... }:
final: prev:
let
inherit (final) stdenv;
inherit (stdenv.hostPlatform) system;
in
{
dae = inputs.dae.packages."${system}".dae-unstable;
}

View file

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

View file

@ -0,0 +1 @@
{ inputs, ... }: inputs.jj.overlays.default

View file

@ -5,17 +5,8 @@
...
}@args:
let
inherit (inputs.helix.packages."${pkgs.system}") helix helix-unwrapped;
helix-core = helix-unwrapped.overrideAttrs {
HELIX_DEFAULT_RUNTIME = "${grammarRuntime}";
};
helix-wrapped = (helix.override grammarConfig).passthru.wrapper helix-core;
grammars = import ./grammars args;
grammarOverlays = grammars.overlays;
grammarRuntime = grammars.runtime;
grammarConfig = {
inherit grammarOverlays;
};
inherit (inputs.helix.packages."${pkgs.system}") helix;
runtime = import ./runtime args;
runtimeInputs = (
with pkgs;
[
@ -53,15 +44,15 @@ let
);
in
pkgs.symlinkJoin {
pname = "helix-wrapped";
version = helix-wrapped.version;
paths = [ helix-wrapped ];
inherit (helix-wrapped) meta;
name = "helix-wrapped";
paths = [ helix ];
inherit (helix) meta;
buildInputs = [
pkgs.makeWrapper
];
postBuild = ''
wrapProgram $out/bin/hx \
--suffix PATH : ${lib.makeBinPath runtimeInputs}
--suffix PATH : ${lib.makeBinPath runtimeInputs} \
--set HELIX_RUNTIME ${runtime}
'';
}

View file

@ -65,30 +65,41 @@ let
inherit (grammar) name;
value = builtins.fetchTree {
type = "github";
inherit (grammar) owner repo rev; };
inherit (grammar) owner repo rev;
};
}) grammars
);
queries = lib.mapAttrsToList (name: value: ''
mkdir -p $out/queries/${name}
cp ${value}/queries/* $out/queries/${name}/
mkdir -p $out/${name}
ln -s ${value}/queries/* $out/${name}/
'') sources;
runtime = pkgs.runCommand "helix-default-runtime" { } ''
mkdir -p $out
${builtins.concatStringsSep "\n" queries}
'';
builtGrammars = lib.listToAttrs (
map (grammar: {
inherit (grammar) name;
value = buildGrammar grammar;
}) grammars
);
grammarLinks = lib.mapAttrsToList (
name: value: "ln -s ${value}/${name}.so $out/${name}.so"
) builtGrammars;
grammarDir = pkgs.runCommandNoCCLocal "helix-grammars" { } ''
mkdir -p $out
${builtins.concatStringsSep "\n" grammarLinks}
'';
queryDir = pkgs.runCommandNoCCLocal "helix-query" { } ''
mkdir -p $out
${builtins.concatStringsSep "\n" queries}
'';
grammarFiles = [
./idris.nix
];
in
{
overlays = [
(final: prev: lib.filterAttrs (n: v: !(builtins.hasAttr n prev)) builtGrammars)
];
inherit runtime;
}
pkgs.runCommandNoCCLocal "helix-runtime" { } ''
mkdir -p $out
ln -s ${grammarDir} $out/grammars
ln -s ${queryDir} $out/queries
''

View file

@ -55,8 +55,8 @@ sops:
a1Y1NU9CK2h1SS83VW42bzBMa01yMXMKI1DBtgNlkNCrxUQvnD6a45mQKNfg5gM4
Zb5buo9Jofj4dn/HFwng3T3gxKTrP2Dh74CAH4L0M5yrF9fzk5TCcQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-03-04T06:22:13Z"
mac: ENC[AES256_GCM,data:nQ3ZmOL0MOxL3/dEY0TGsI0003O/ZNjqilSojikn0oN2OyR2chYcpbRDKpPtoZwoJ+QfMH+etnxt9lo+tPKr+hF8a4rQeWK4oErZTAemPoGPPsYgf9TLqjjQ7pUQI/wzLX0OaBJSbITNBiC4I1wUtA3NPyRPhGYNA0st7Mz2fP0=,iv:SkYgbhWrlyQAZer5ZeLExwMdOmnxRQ3mwxsdLtA7DYI=,tag:NAPlZ7UYRT0XXRLSigHfWA==,type:str]
lastmodified: "2025-03-05T19:37:15Z"
mac: ENC[AES256_GCM,data:jrQ3yMHnligZLO4+4i2FWOEZQ/Lnv9EwZQ8WLeNup+gTrOtcU6pjD/Pg3V0xp1Xe/HZCB9+8DRUWxAOjaD1lx7PYkktSJY9dhdF93JulP1G7gm1eG1LMVU3KqWXMzyJ1UwoUd1xrF/9Z7z8FK21CSo7RF9s9S5FmT0uP/1xZJU8=,iv:BIwUiKqrBCOJiE4uOg+vqd94lC+YxbCb7SeomddtB5o=,tag:MFexMkHKQmrI112l4O13jg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.4