Signed-off-by: Christoph Schmatzler <christoph@schmatzler.com>
This commit is contained in:
2025-08-27 16:11:36 +00:00
parent b99400b77d
commit 4eac15ffc7
3 changed files with 160 additions and 4 deletions

109
flake.lock generated
View File

@@ -17,6 +17,21 @@
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1754269165,
"narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=",
"owner": "ipetkov",
"repo": "crane",
"rev": "444e81206df3f7d92780680e45858e31d2f07a08",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@@ -95,6 +110,24 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
@@ -270,6 +303,22 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1754800730,
"narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "641d909c4a7538f1539da9240dedb1755c907e40",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
@@ -325,7 +374,29 @@
"nix-homebrew": "nix-homebrew",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",
"sops-nix": "sops-nix"
"sops-nix": "sops-nix",
"zjstatus": "zjstatus"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"zjstatus",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754880555,
"narHash": "sha256-tG6l0wiX8V8IvG4HFYY8IYN5vpNAxQ+UWunjjpE6SqU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "17c591a44e4eb77f05f27cd37e1cfc3f219c7fc4",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": {
@@ -377,6 +448,42 @@
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zjstatus": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_4",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1754932774,
"narHash": "sha256-gJQZS6M2x5oPs089/9kAy0EIriEauUKEm0UNF7HEl6o=",
"owner": "dj95",
"repo": "zjstatus",
"rev": "0a963622fa5cd3d62d6ee9b82f78eacd52ae5647",
"type": "github"
},
"original": {
"owner": "dj95",
"repo": "zjstatus",
"type": "github"
}
}
},
"root": "root",

View File

@@ -27,6 +27,7 @@
flake = false;
};
nixvim.url = "github:nix-community/nixvim";
zjstatus.url = "github:dj95/zjstatus";
};
outputs = inputs @ {flake-parts, ...}:
@@ -46,6 +47,9 @@
hostname: let
syncthingOverlay = import ./overlays/syncthing-darwin.nix;
syncthingModule = (syncthingOverlay null {}).darwinSyncthingModule;
zjstatusOverlay = final: prev: {
zjstatus = inputs.zjstatus.packages.${prev.system}.default;
};
in
inputs.darwin.lib.darwinSystem {
system = "aarch64-darwin";
@@ -60,7 +64,7 @@
syncthingModule
{
nixpkgs.overlays = [syncthingOverlay];
nixpkgs.overlays = [syncthingOverlay zjstatusOverlay];
nix-homebrew = {
inherit user;
@@ -79,7 +83,11 @@
);
flake.nixosConfigurations = inputs.nixpkgs.lib.genAttrs nixosHosts (
hostname:
hostname: let
zjstatusOverlay = final: prev: {
zjstatus = inputs.zjstatus.packages.${prev.system}.default;
};
in
inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs =
@@ -89,6 +97,9 @@
};
modules = [
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [zjstatusOverlay];
}
./hosts/nixos/${hostname}
];
}

View File

@@ -8,11 +8,49 @@
enableFishIntegration = lib.mkDefault false;
settings = {
theme = "catppuccin-latte";
default_layout = "compact";
default_layout = "default";
default_shell = "${pkgs.fish}/bin/fish";
pane_frames = false;
show_startup_tips = false;
show_release_notes = false;
};
};
xdg.configFile."zellij/layouts/default.kdl".text = ''
layout {
default_tab_template {
pane split_direction="vertical" {
pane
}
pane size=1 borderless=true {
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
hide_frame_for_single_pane "true"
format_left "{mode}#[fg=#1e66f5,bg=#eff1f5,bold] {session}#[bg=#eff1f5] {tabs}"
format_right "{datetime}"
format_space "#[bg=#eff1f5]"
mode_normal "#[bg=#1e66f5] "
mode_tab "#[bg=#40a02b] "
mode_pane "#[bg=#8839ef] "
mode_session "#[bg=#179299] "
mode_resize "#[bg=#df8e1d] "
mode_move "#[bg=#ea76cb] "
mode_search "#[bg=#d20f39] "
tab_normal "#[fg=#6c6f85,bg=#eff1f5] {index} {name} {fullscreen_indicator}{sync_indicator}{floating_indicator}"
tab_active "#[fg=#eff1f5,bg=#1e66f5,bold,underline] {index} {name} {fullscreen_indicator}{sync_indicator}{floating_indicator}"
tab_fullscreen_indicator " "
tab_sync_indicator " "
tab_floating_indicator "󰉈 "
datetime "#[fg=#4c4f69,bg=#eff1f5] {format} "
datetime_format "%A, %d %b %Y %H:%M"
datetime_timezone "Europe/Berlin"
}
}
}
}
'';
}