refactor: dedupe theme values and app helpers
This commit is contained in:
@@ -3,17 +3,5 @@
|
|||||||
use ../common.nu *
|
use ../common.nu *
|
||||||
|
|
||||||
def main [hostname?: string, ...rest: string] {
|
def main [hostname?: string, ...rest: string] {
|
||||||
let host = if ($hostname | is-empty) {
|
build-config "darwin" $hostname ...$rest
|
||||||
try { scutil --get LocalHostName | str trim } catch { hostname -s | str trim }
|
|
||||||
} else { $hostname }
|
|
||||||
|
|
||||||
print_info $"Building configuration for ($host)"
|
|
||||||
|
|
||||||
nix build $".#darwinConfigurations.($host).system" --show-trace ...$rest
|
|
||||||
|
|
||||||
if ("./result" | path exists) {
|
|
||||||
rm ./result
|
|
||||||
}
|
|
||||||
|
|
||||||
print_success "Build completed successfully"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env nu
|
|
||||||
|
|
||||||
use ../common.nu *
|
|
||||||
|
|
||||||
def main [...inputs: string] {
|
|
||||||
if ($inputs | is-empty) {
|
|
||||||
print_info "Updating all flake inputs"
|
|
||||||
nix flake update
|
|
||||||
} else {
|
|
||||||
print_info $"Updating flake inputs: ($inputs | str join ', ')"
|
|
||||||
nix flake update ...$inputs
|
|
||||||
}
|
|
||||||
|
|
||||||
print_info "Regenerating flake.nix"
|
|
||||||
nix run .#write-flake
|
|
||||||
|
|
||||||
print_info "Formatting"
|
|
||||||
alejandra .
|
|
||||||
|
|
||||||
print_success "Flake updated"
|
|
||||||
}
|
|
||||||
12
apps/apply
12
apps/apply
@@ -2,18 +2,8 @@
|
|||||||
|
|
||||||
use ./common.nu *
|
use ./common.nu *
|
||||||
|
|
||||||
def get-hostname [] {
|
|
||||||
if $nu.os-info.name == "macos" {
|
|
||||||
try { ^scutil --get LocalHostName | str trim } catch { ^hostname -s | str trim }
|
|
||||||
} else {
|
|
||||||
^hostname | str trim
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def main [hostname?: string, ...rest: string] {
|
def main [hostname?: string, ...rest: string] {
|
||||||
let host = if ($hostname | is-empty) {
|
let host = resolve-host $hostname
|
||||||
get-hostname
|
|
||||||
} else { $hostname }
|
|
||||||
|
|
||||||
print_info $"Applying configuration for ($host)"
|
print_info $"Applying configuration for ($host)"
|
||||||
|
|
||||||
|
|||||||
@@ -15,3 +15,58 @@ export def print_error [msg: string] {
|
|||||||
export def print_warning [msg: string] {
|
export def print_warning [msg: string] {
|
||||||
print $"(ansi yellow)[WARN](ansi reset) ($msg)"
|
print $"(ansi yellow)[WARN](ansi reset) ($msg)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export def get-hostname [] {
|
||||||
|
if $nu.os-info.name == "macos" {
|
||||||
|
try { ^scutil --get LocalHostName | str trim } catch { ^hostname -s | str trim }
|
||||||
|
} else {
|
||||||
|
^hostname | str trim
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export def resolve-host [hostname?: string] {
|
||||||
|
if ($hostname | is-empty) {
|
||||||
|
get-hostname
|
||||||
|
} else {
|
||||||
|
$hostname
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export def cleanup-result-link [] {
|
||||||
|
if ("./result" | path exists) {
|
||||||
|
rm ./result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export def build-config [kind: string, hostname?: string, ...rest: string] {
|
||||||
|
let host = resolve-host $hostname
|
||||||
|
|
||||||
|
print_info $"Building configuration for ($host)"
|
||||||
|
|
||||||
|
if $kind == "darwin" {
|
||||||
|
nix build $".#darwinConfigurations.($host).system" --show-trace ...$rest
|
||||||
|
} else {
|
||||||
|
nix build $".#nixosConfigurations.($host).config.system.build.toplevel" --show-trace ...$rest
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup-result-link
|
||||||
|
print_success "Build completed successfully"
|
||||||
|
}
|
||||||
|
|
||||||
|
export def update-flake [inputs: list<string>] {
|
||||||
|
if ($inputs | is-empty) {
|
||||||
|
print_info "Updating all flake inputs"
|
||||||
|
nix flake update
|
||||||
|
} else {
|
||||||
|
print_info $"Updating flake inputs: ($inputs | str join ', ')"
|
||||||
|
nix flake update ...$inputs
|
||||||
|
}
|
||||||
|
|
||||||
|
print_info "Regenerating flake.nix"
|
||||||
|
nix run .#write-flake
|
||||||
|
|
||||||
|
print_info "Formatting"
|
||||||
|
alejandra .
|
||||||
|
|
||||||
|
print_success "Flake updated"
|
||||||
|
}
|
||||||
|
|||||||
7
apps/update
Executable file
7
apps/update
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env nu
|
||||||
|
|
||||||
|
use ./common.nu *
|
||||||
|
|
||||||
|
def main [...inputs: string] {
|
||||||
|
update-flake $inputs
|
||||||
|
}
|
||||||
@@ -3,17 +3,5 @@
|
|||||||
use ../common.nu *
|
use ../common.nu *
|
||||||
|
|
||||||
def main [hostname?: string, ...rest: string] {
|
def main [hostname?: string, ...rest: string] {
|
||||||
let host = if ($hostname | is-empty) {
|
build-config "nixos" $hostname ...$rest
|
||||||
hostname | str trim
|
|
||||||
} else { $hostname }
|
|
||||||
|
|
||||||
print_info $"Building configuration for ($host)"
|
|
||||||
|
|
||||||
nix build $".#nixosConfigurations.($host).config.system.build.toplevel" --show-trace ...$rest
|
|
||||||
|
|
||||||
if ("./result" | path exists) {
|
|
||||||
rm ./result
|
|
||||||
}
|
|
||||||
|
|
||||||
print_success "Build completed successfully"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env nu
|
|
||||||
|
|
||||||
use ../common.nu *
|
|
||||||
|
|
||||||
def main [...inputs: string] {
|
|
||||||
if ($inputs | is-empty) {
|
|
||||||
print_info "Updating all flake inputs"
|
|
||||||
nix flake update
|
|
||||||
} else {
|
|
||||||
print_info $"Updating flake inputs: ($inputs | str join ', ')"
|
|
||||||
nix flake update ...$inputs
|
|
||||||
}
|
|
||||||
|
|
||||||
print_info "Regenerating flake.nix"
|
|
||||||
nix run .#write-flake
|
|
||||||
|
|
||||||
print_info "Formatting"
|
|
||||||
alejandra .
|
|
||||||
|
|
||||||
print_success "Flake updated"
|
|
||||||
}
|
|
||||||
@@ -8,7 +8,7 @@ with lib; let
|
|||||||
cfg = config.local.dock;
|
cfg = config.local.dock;
|
||||||
inherit (pkgs) dockutil stdenv;
|
inherit (pkgs) dockutil stdenv;
|
||||||
local = import ../_lib/local.nix;
|
local = import ../_lib/local.nix;
|
||||||
userHome = local.mkHome local.hosts.chidi.system;
|
userHome = "/Users/${local.user.name}";
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
local.dock = {
|
local.dock = {
|
||||||
|
|||||||
46
modules/_lib/theme.nix
Normal file
46
modules/_lib/theme.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
rosePineDawn = {
|
||||||
|
slug = "rose-pine-dawn";
|
||||||
|
displayName = "Rosé Pine Dawn";
|
||||||
|
ghosttyName = "Rose Pine Dawn";
|
||||||
|
|
||||||
|
hex = {
|
||||||
|
love = "#b4637a";
|
||||||
|
gold = "#ea9d34";
|
||||||
|
rose = "#d7827e";
|
||||||
|
pine = "#286983";
|
||||||
|
foam = "#56949f";
|
||||||
|
iris = "#907aa9";
|
||||||
|
leaf = "#6d8f89";
|
||||||
|
text = "#575279";
|
||||||
|
subtle = "#797593";
|
||||||
|
muted = "#9893a5";
|
||||||
|
highlightHigh = "#cecacd";
|
||||||
|
highlightMed = "#dfdad9";
|
||||||
|
highlightLow = "#f4ede8";
|
||||||
|
overlay = "#f2e9e1";
|
||||||
|
surface = "#fffaf3";
|
||||||
|
base = "#faf4ed";
|
||||||
|
};
|
||||||
|
|
||||||
|
rgb = {
|
||||||
|
love = "180 99 122";
|
||||||
|
gold = "234 157 52";
|
||||||
|
rose = "215 130 126";
|
||||||
|
pine = "40 105 131";
|
||||||
|
foam = "86 148 159";
|
||||||
|
iris = "144 122 169";
|
||||||
|
leaf = "109 143 137";
|
||||||
|
text = "87 82 121";
|
||||||
|
subtle = "121 117 147";
|
||||||
|
muted = "152 147 165";
|
||||||
|
highlightHigh = "206 202 205";
|
||||||
|
highlightMed = "223 218 217";
|
||||||
|
highlightLow = "244 237 232";
|
||||||
|
overlay = "242 233 225";
|
||||||
|
surface = "255 250 243";
|
||||||
|
base = "250 244 237";
|
||||||
|
black = "0 0 0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
'')}/bin/${name}";
|
'')}/bin/${name}";
|
||||||
meta.description = descriptions.${name};
|
meta.description = descriptions.${name};
|
||||||
};
|
};
|
||||||
platformAppNames = ["build" "rollback" "update"];
|
platformAppNames = ["build" "rollback"];
|
||||||
sharedAppNames = ["apply"];
|
sharedAppNames = ["apply" "update"];
|
||||||
in {
|
in {
|
||||||
apps =
|
apps =
|
||||||
pkgs.lib.genAttrs platformAppNames mkPlatformApp
|
pkgs.lib.genAttrs platformAppNames mkPlatformApp
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{inputs, ...}: let
|
{inputs, ...}: let
|
||||||
local = import ./_lib/local.nix;
|
local = import ./_lib/local.nix;
|
||||||
userHome = local.mkHome local.hosts.chidi.system;
|
userHome = "/Users/${local.user.name}";
|
||||||
in {
|
in {
|
||||||
den.aspects.darwin-system.darwin = {pkgs, ...}: {
|
den.aspects.darwin-system.darwin = {pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{...}: let
|
{...}: let
|
||||||
local = import ./_lib/local.nix;
|
local = import ./_lib/local.nix;
|
||||||
|
palette = (import ./_lib/theme.nix).rosePineDawn.hex;
|
||||||
in {
|
in {
|
||||||
den.aspects.dev-tools.homeManager = {
|
den.aspects.dev-tools.homeManager = {
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -145,76 +146,76 @@ in {
|
|||||||
programs.jjui = {
|
programs.jjui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.ui.colors = {
|
settings.ui.colors = {
|
||||||
text = {fg = "#575279";};
|
text = {fg = palette.text;};
|
||||||
dimmed = {fg = "#9893a5";};
|
dimmed = {fg = palette.muted;};
|
||||||
selected = {
|
selected = {
|
||||||
bg = "#f2e9e1";
|
bg = palette.overlay;
|
||||||
fg = "#575279";
|
fg = palette.text;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
border = {fg = "#9893a5";};
|
border = {fg = palette.muted;};
|
||||||
title = {
|
title = {
|
||||||
fg = "#907aa9";
|
fg = palette.iris;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
shortcut = {
|
shortcut = {
|
||||||
fg = "#286983";
|
fg = palette.pine;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
matched = {
|
matched = {
|
||||||
fg = "#ea9d34";
|
fg = palette.gold;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
"revisions selected" = {
|
"revisions selected" = {
|
||||||
bg = "#f2e9e1";
|
bg = palette.overlay;
|
||||||
fg = "#575279";
|
fg = palette.text;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
"status" = {bg = "#f2e9e1";};
|
"status" = {bg = palette.overlay;};
|
||||||
"status title" = {
|
"status title" = {
|
||||||
bg = "#907aa9";
|
bg = palette.iris;
|
||||||
fg = "#faf4ed";
|
fg = palette.base;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
"status shortcut" = {fg = "#286983";};
|
"status shortcut" = {fg = palette.pine;};
|
||||||
"status dimmed" = {fg = "#9893a5";};
|
"status dimmed" = {fg = palette.muted;};
|
||||||
"menu" = {bg = "#faf4ed";};
|
"menu" = {bg = palette.base;};
|
||||||
"menu selected" = {
|
"menu selected" = {
|
||||||
bg = "#f2e9e1";
|
bg = palette.overlay;
|
||||||
fg = "#575279";
|
fg = palette.text;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
"menu border" = {fg = "#9893a5";};
|
"menu border" = {fg = palette.muted;};
|
||||||
"menu title" = {
|
"menu title" = {
|
||||||
fg = "#907aa9";
|
fg = palette.iris;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
"menu shortcut" = {fg = "#286983";};
|
"menu shortcut" = {fg = palette.pine;};
|
||||||
"menu matched" = {
|
"menu matched" = {
|
||||||
fg = "#ea9d34";
|
fg = palette.gold;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
"preview border" = {fg = "#9893a5";};
|
"preview border" = {fg = palette.muted;};
|
||||||
"help" = {bg = "#faf4ed";};
|
"help" = {bg = palette.base;};
|
||||||
"help border" = {fg = "#9893a5";};
|
"help border" = {fg = palette.muted;};
|
||||||
"help title" = {
|
"help title" = {
|
||||||
fg = "#907aa9";
|
fg = palette.iris;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
"confirmation" = {bg = "#faf4ed";};
|
"confirmation" = {bg = palette.base;};
|
||||||
"confirmation border" = {fg = "#9893a5";};
|
"confirmation border" = {fg = palette.muted;};
|
||||||
"confirmation selected" = {
|
"confirmation selected" = {
|
||||||
bg = "#f2e9e1";
|
bg = palette.overlay;
|
||||||
fg = "#575279";
|
fg = palette.text;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
"confirmation dimmed" = {fg = "#9893a5";};
|
"confirmation dimmed" = {fg = palette.muted;};
|
||||||
source_marker = {
|
source_marker = {
|
||||||
fg = "#56949f";
|
fg = palette.foam;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
target_marker = {
|
target_marker = {
|
||||||
fg = "#d7827e";
|
fg = palette.rose;
|
||||||
bold = true;
|
bold = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{inputs, ...}: let
|
{inputs, ...}: let
|
||||||
local = import ./_lib/local.nix;
|
local = import ./_lib/local.nix;
|
||||||
userHome = local.mkHome local.hosts.michael.system;
|
userHome = "/home/${local.user.name}";
|
||||||
in {
|
in {
|
||||||
den.aspects.nixos-system.nixos = {pkgs, ...}: {
|
den.aspects.nixos-system.nixos = {pkgs, ...}: {
|
||||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ in {
|
|||||||
|
|
||||||
# Configure Darwin SOPS defaults
|
# Configure Darwin SOPS defaults
|
||||||
den.default.darwin = {
|
den.default.darwin = {
|
||||||
sops.age.keyFile = "${local.mkHome local.hosts.chidi.system}/.config/sops/age/keys.txt";
|
sops.age.keyFile = "/Users/${local.user.name}/.config/sops/age/keys.txt";
|
||||||
sops.age.sshKeyPaths = [];
|
sops.age.sshKeyPaths = [];
|
||||||
sops.gnupg.sshKeyPaths = [];
|
sops.gnupg.sshKeyPaths = [];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{...}: {
|
{...}: let
|
||||||
|
local = import ./_lib/local.nix;
|
||||||
|
theme = (import ./_lib/theme.nix).rosePineDawn;
|
||||||
|
palette = theme.hex;
|
||||||
|
pineAnsi = builtins.replaceStrings [" "] [";"] theme.rgb.pine;
|
||||||
|
in {
|
||||||
den.aspects.shell.homeManager = {
|
den.aspects.shell.homeManager = {
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -32,7 +37,7 @@
|
|||||||
|
|
||||||
extraEnv =
|
extraEnv =
|
||||||
''
|
''
|
||||||
$env.LS_COLORS = (${pkgs.vivid}/bin/vivid generate rose-pine-dawn)
|
$env.LS_COLORS = (${pkgs.vivid}/bin/vivid generate ${theme.slug})
|
||||||
''
|
''
|
||||||
+ lib.optionalString pkgs.stdenv.isDarwin ''
|
+ lib.optionalString pkgs.stdenv.isDarwin ''
|
||||||
# Nushell on Darwin doesn't source /etc/zprofile or path_helper,
|
# Nushell on Darwin doesn't source /etc/zprofile or path_helper,
|
||||||
@@ -43,22 +48,22 @@
|
|||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
# --- Rosé Pine Dawn Theme ---
|
# --- Rosé Pine Dawn Theme ---
|
||||||
let theme = {
|
let theme = {
|
||||||
love: "#b4637a"
|
love: "${palette.love}"
|
||||||
gold: "#ea9d34"
|
gold: "${palette.gold}"
|
||||||
rose: "#d7827e"
|
rose: "${palette.rose}"
|
||||||
pine: "#286983"
|
pine: "${palette.pine}"
|
||||||
foam: "#56949f"
|
foam: "${palette.foam}"
|
||||||
iris: "#907aa9"
|
iris: "${palette.iris}"
|
||||||
leaf: "#6d8f89"
|
leaf: "${palette.leaf}"
|
||||||
text: "#575279"
|
text: "${palette.text}"
|
||||||
subtle: "#797593"
|
subtle: "${palette.subtle}"
|
||||||
muted: "#9893a5"
|
muted: "${palette.muted}"
|
||||||
highlight_high: "#cecacd"
|
highlight_high: "${palette.highlightHigh}"
|
||||||
highlight_med: "#dfdad9"
|
highlight_med: "${palette.highlightMed}"
|
||||||
highlight_low: "#f4ede8"
|
highlight_low: "${palette.highlightLow}"
|
||||||
overlay: "#f2e9e1"
|
overlay: "${palette.overlay}"
|
||||||
surface: "#fffaf3"
|
surface: "${palette.surface}"
|
||||||
base: "#faf4ed"
|
base: "${palette.base}"
|
||||||
}
|
}
|
||||||
|
|
||||||
let scheme = {
|
let scheme = {
|
||||||
@@ -231,7 +236,7 @@
|
|||||||
# Vi mode indicators — Starship handles the character (green/red for
|
# Vi mode indicators — Starship handles the character (green/red for
|
||||||
# success/error), nushell adds a dot for normal mode.
|
# success/error), nushell adds a dot for normal mode.
|
||||||
$env.PROMPT_INDICATOR_VI_INSERT = "· "
|
$env.PROMPT_INDICATOR_VI_INSERT = "· "
|
||||||
$env.PROMPT_INDICATOR_VI_NORMAL = "\e[1;38;2;40;105;131m·\e[0m "
|
$env.PROMPT_INDICATOR_VI_NORMAL = "\e[1;38;2;${pineAnsi}m·\e[0m "
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -268,9 +273,7 @@
|
|||||||
git_state = {
|
git_state = {
|
||||||
disabled = true;
|
disabled = true;
|
||||||
};
|
};
|
||||||
custom.scm = let
|
custom.scm = {
|
||||||
local = import ./_lib/local.nix;
|
|
||||||
in {
|
|
||||||
when = "jj-starship detect";
|
when = "jj-starship detect";
|
||||||
shell = ["jj-starship" "--strip-bookmark-prefix" "${local.user.name}/" "--truncate-name" "20" "--bookmarks-display-limit" "1"];
|
shell = ["jj-starship" "--strip-bookmark-prefix" "${local.user.name}/" "--truncate-name" "20" "--bookmarks-display-limit" "1"];
|
||||||
format = "$output ";
|
format = "$output ";
|
||||||
|
|||||||
@@ -1,27 +1,17 @@
|
|||||||
{...}: {
|
{...}: {
|
||||||
den.aspects.ssh-client.homeManager = {
|
den.aspects.ssh-client.homeManager = {config, ...}: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
homeDir = "${
|
|
||||||
if pkgs.stdenv.hostPlatform.isDarwin
|
|
||||||
then "/Users"
|
|
||||||
else "/home"
|
|
||||||
}/${config.home.username}";
|
|
||||||
in {
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableDefaultConfig = false;
|
enableDefaultConfig = false;
|
||||||
includes = [
|
includes = [
|
||||||
"${homeDir}/.ssh/config_external"
|
"${config.home.homeDirectory}/.ssh/config_external"
|
||||||
];
|
];
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
"*" = {};
|
"*" = {};
|
||||||
"github.com" = {
|
"github.com" = {
|
||||||
identitiesOnly = true;
|
identitiesOnly = true;
|
||||||
identityFile = [
|
identityFile = [
|
||||||
"${homeDir}/.ssh/id_ed25519"
|
"${config.home.homeDirectory}/.ssh/id_ed25519"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
{...}: {
|
{...}: let
|
||||||
|
theme = (import ./_lib/theme.nix).rosePineDawn;
|
||||||
|
palette = theme.hex;
|
||||||
|
in {
|
||||||
den.aspects.terminal.darwin = {pkgs, ...}: {
|
den.aspects.terminal.darwin = {pkgs, ...}: {
|
||||||
fonts.packages = [
|
fonts.packages = [
|
||||||
pkgs.nerd-fonts.iosevka
|
pkgs.nerd-fonts.iosevka
|
||||||
@@ -40,17 +43,17 @@
|
|||||||
--preview-window='border-rounded' --prompt=' ' --marker=' ' --pointer=' '
|
--preview-window='border-rounded' --prompt=' ' --marker=' ' --pointer=' '
|
||||||
--separator='─' --scrollbar='┃' --layout='reverse'
|
--separator='─' --scrollbar='┃' --layout='reverse'
|
||||||
|
|
||||||
--color=bg+:#f2e9e1,bg:#faf4ed,spinner:#ea9d34,hl:#d7827e
|
--color=bg+:${palette.overlay},bg:${palette.base},spinner:${palette.gold},hl:${palette.rose}
|
||||||
--color=fg:#797593,header:#286983,info:#56949f,pointer:#907aa9
|
--color=fg:${palette.subtle},header:${palette.pine},info:${palette.foam},pointer:${palette.iris}
|
||||||
--color=marker:#b4637a,fg+:#575279,prompt:#797593,hl+:#d7827e
|
--color=marker:${palette.love},fg+:${palette.text},prompt:${palette.subtle},hl+:${palette.rose}
|
||||||
--color=selected-bg:#f2e9e1
|
--color=selected-bg:${palette.overlay}
|
||||||
--color=border:#dfdad9,label:#575279
|
--color=border:${palette.highlightMed},label:${palette.text}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."ghostty/config".text = ''
|
xdg.configFile."ghostty/config".text = ''
|
||||||
command = ${pkgs.nushell}/bin/nu
|
command = ${pkgs.nushell}/bin/nu
|
||||||
theme = Rose Pine Dawn
|
theme = ${theme.ghosttyName}
|
||||||
window-padding-x = 12
|
window-padding-x = 12
|
||||||
window-padding-y = 3
|
window-padding-y = 3
|
||||||
window-padding-balance = true
|
window-padding-balance = true
|
||||||
@@ -69,7 +72,7 @@
|
|||||||
"glow/glow.yml".text =
|
"glow/glow.yml".text =
|
||||||
lib.concatStringsSep "\n" [
|
lib.concatStringsSep "\n" [
|
||||||
"# style name or JSON path (default \"auto\")"
|
"# style name or JSON path (default \"auto\")"
|
||||||
"style: \"${config.xdg.configHome}/glow/rose-pine-dawn.json\""
|
"style: \"${config.xdg.configHome}/glow/${theme.slug}.json\""
|
||||||
"# mouse support (TUI-mode only)"
|
"# mouse support (TUI-mode only)"
|
||||||
"mouse: false"
|
"mouse: false"
|
||||||
"# use pager to display markdown"
|
"# use pager to display markdown"
|
||||||
@@ -80,17 +83,17 @@
|
|||||||
"all: false"
|
"all: false"
|
||||||
""
|
""
|
||||||
];
|
];
|
||||||
"glow/rose-pine-dawn.json".source = ./_terminal/rose-pine-dawn-glow.json;
|
"glow/${theme.slug}.json".source = ./_terminal/rose-pine-dawn-glow.json;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
theme = "Rosé Pine Dawn";
|
theme = theme.displayName;
|
||||||
pager = "ov";
|
pager = "ov";
|
||||||
};
|
};
|
||||||
themes = {
|
themes = {
|
||||||
"Rosé Pine Dawn" = {
|
"${theme.displayName}" = {
|
||||||
src =
|
src =
|
||||||
pkgs.fetchFromGitHub {
|
pkgs.fetchFromGitHub {
|
||||||
owner = "rose-pine";
|
owner = "rose-pine";
|
||||||
@@ -98,7 +101,7 @@
|
|||||||
rev = "23bb25b9c421cdc9ea89ff3ad3825840cd19d65d";
|
rev = "23bb25b9c421cdc9ea89ff3ad3825840cd19d65d";
|
||||||
hash = "sha256-GUFdv5V5OZ2PG+gfsbiohMT23LWsrZda34ReHBr2Xy0=";
|
hash = "sha256-GUFdv5V5OZ2PG+gfsbiohMT23LWsrZda34ReHBr2Xy0=";
|
||||||
};
|
};
|
||||||
file = "dist/rose-pine-dawn.tmTheme";
|
file = "dist/${theme.slug}.tmTheme";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
{...}: {
|
{...}: let
|
||||||
|
theme = (import ./_lib/theme.nix).rosePineDawn;
|
||||||
|
palette = theme.hex;
|
||||||
|
rgb = theme.rgb;
|
||||||
|
in {
|
||||||
den.aspects.zellij.homeManager = {pkgs, ...}: {
|
den.aspects.zellij.homeManager = {pkgs, ...}: {
|
||||||
programs.zellij.enable = true;
|
programs.zellij.enable = true;
|
||||||
|
|
||||||
@@ -8,125 +12,125 @@
|
|||||||
pane_frames false
|
pane_frames false
|
||||||
show_release_notes false
|
show_release_notes false
|
||||||
show_startup_tips false
|
show_startup_tips false
|
||||||
theme "rose-pine-dawn"
|
theme "${theme.slug}"
|
||||||
|
|
||||||
themes {
|
themes {
|
||||||
rose-pine-dawn {
|
${theme.slug} {
|
||||||
text_unselected {
|
text_unselected {
|
||||||
base 87 82 121
|
base ${rgb.text}
|
||||||
background 244 237 232
|
background ${rgb.highlightLow}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 86 148 159
|
emphasis_1 ${rgb.foam}
|
||||||
emphasis_2 40 105 131
|
emphasis_2 ${rgb.pine}
|
||||||
emphasis_3 144 122 169
|
emphasis_3 ${rgb.iris}
|
||||||
}
|
}
|
||||||
text_selected {
|
text_selected {
|
||||||
base 87 82 121
|
base ${rgb.text}
|
||||||
background 223 218 217
|
background ${rgb.highlightMed}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 86 148 159
|
emphasis_1 ${rgb.foam}
|
||||||
emphasis_2 40 105 131
|
emphasis_2 ${rgb.pine}
|
||||||
emphasis_3 144 122 169
|
emphasis_3 ${rgb.iris}
|
||||||
}
|
}
|
||||||
ribbon_selected {
|
ribbon_selected {
|
||||||
base 244 237 232
|
base ${rgb.highlightLow}
|
||||||
background 40 105 131
|
background ${rgb.pine}
|
||||||
emphasis_0 234 157 52
|
emphasis_0 ${rgb.gold}
|
||||||
emphasis_1 215 130 126
|
emphasis_1 ${rgb.rose}
|
||||||
emphasis_2 144 122 169
|
emphasis_2 ${rgb.iris}
|
||||||
emphasis_3 86 148 159
|
emphasis_3 ${rgb.foam}
|
||||||
}
|
}
|
||||||
ribbon_unselected {
|
ribbon_unselected {
|
||||||
base 250 244 237
|
base ${rgb.base}
|
||||||
background 87 82 121
|
background ${rgb.text}
|
||||||
emphasis_0 234 157 52
|
emphasis_0 ${rgb.gold}
|
||||||
emphasis_1 215 130 126
|
emphasis_1 ${rgb.rose}
|
||||||
emphasis_2 144 122 169
|
emphasis_2 ${rgb.iris}
|
||||||
emphasis_3 86 148 159
|
emphasis_3 ${rgb.foam}
|
||||||
}
|
}
|
||||||
table_title {
|
table_title {
|
||||||
base 40 105 131
|
base ${rgb.pine}
|
||||||
background 0 0 0
|
background ${rgb.black}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 86 148 159
|
emphasis_1 ${rgb.foam}
|
||||||
emphasis_2 40 105 131
|
emphasis_2 ${rgb.pine}
|
||||||
emphasis_3 144 122 169
|
emphasis_3 ${rgb.iris}
|
||||||
}
|
}
|
||||||
table_cell_selected {
|
table_cell_selected {
|
||||||
base 87 82 121
|
base ${rgb.text}
|
||||||
background 223 218 217
|
background ${rgb.highlightMed}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 86 148 159
|
emphasis_1 ${rgb.foam}
|
||||||
emphasis_2 40 105 131
|
emphasis_2 ${rgb.pine}
|
||||||
emphasis_3 144 122 169
|
emphasis_3 ${rgb.iris}
|
||||||
}
|
}
|
||||||
table_cell_unselected {
|
table_cell_unselected {
|
||||||
base 87 82 121
|
base ${rgb.text}
|
||||||
background 244 237 232
|
background ${rgb.highlightLow}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 86 148 159
|
emphasis_1 ${rgb.foam}
|
||||||
emphasis_2 40 105 131
|
emphasis_2 ${rgb.pine}
|
||||||
emphasis_3 144 122 169
|
emphasis_3 ${rgb.iris}
|
||||||
}
|
}
|
||||||
list_selected {
|
list_selected {
|
||||||
base 87 82 121
|
base ${rgb.text}
|
||||||
background 223 218 217
|
background ${rgb.highlightMed}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 86 148 159
|
emphasis_1 ${rgb.foam}
|
||||||
emphasis_2 40 105 131
|
emphasis_2 ${rgb.pine}
|
||||||
emphasis_3 144 122 169
|
emphasis_3 ${rgb.iris}
|
||||||
}
|
}
|
||||||
list_unselected {
|
list_unselected {
|
||||||
base 87 82 121
|
base ${rgb.text}
|
||||||
background 244 237 232
|
background ${rgb.highlightLow}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 86 148 159
|
emphasis_1 ${rgb.foam}
|
||||||
emphasis_2 40 105 131
|
emphasis_2 ${rgb.pine}
|
||||||
emphasis_3 144 122 169
|
emphasis_3 ${rgb.iris}
|
||||||
}
|
}
|
||||||
frame_selected {
|
frame_selected {
|
||||||
base 40 105 131
|
base ${rgb.pine}
|
||||||
background 0 0 0
|
background ${rgb.black}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 86 148 159
|
emphasis_1 ${rgb.foam}
|
||||||
emphasis_2 144 122 169
|
emphasis_2 ${rgb.iris}
|
||||||
emphasis_3 0 0 0
|
emphasis_3 ${rgb.black}
|
||||||
}
|
}
|
||||||
frame_highlight {
|
frame_highlight {
|
||||||
base 215 130 126
|
base ${rgb.rose}
|
||||||
background 0 0 0
|
background ${rgb.black}
|
||||||
emphasis_0 215 130 126
|
emphasis_0 ${rgb.rose}
|
||||||
emphasis_1 215 130 126
|
emphasis_1 ${rgb.rose}
|
||||||
emphasis_2 215 130 126
|
emphasis_2 ${rgb.rose}
|
||||||
emphasis_3 215 130 126
|
emphasis_3 ${rgb.rose}
|
||||||
}
|
}
|
||||||
exit_code_success {
|
exit_code_success {
|
||||||
base 40 105 131
|
base ${rgb.pine}
|
||||||
background 0 0 0
|
background ${rgb.black}
|
||||||
emphasis_0 86 148 159
|
emphasis_0 ${rgb.foam}
|
||||||
emphasis_1 244 237 232
|
emphasis_1 ${rgb.highlightLow}
|
||||||
emphasis_2 144 122 169
|
emphasis_2 ${rgb.iris}
|
||||||
emphasis_3 40 105 131
|
emphasis_3 ${rgb.pine}
|
||||||
}
|
}
|
||||||
exit_code_error {
|
exit_code_error {
|
||||||
base 180 99 122
|
base ${rgb.love}
|
||||||
background 0 0 0
|
background ${rgb.black}
|
||||||
emphasis_0 234 157 52
|
emphasis_0 ${rgb.gold}
|
||||||
emphasis_1 0 0 0
|
emphasis_1 ${rgb.black}
|
||||||
emphasis_2 0 0 0
|
emphasis_2 ${rgb.black}
|
||||||
emphasis_3 0 0 0
|
emphasis_3 ${rgb.black}
|
||||||
}
|
}
|
||||||
multiplayer_user_colors {
|
multiplayer_user_colors {
|
||||||
player_1 144 122 169
|
player_1 ${rgb.iris}
|
||||||
player_2 40 105 131
|
player_2 ${rgb.pine}
|
||||||
player_3 215 130 126
|
player_3 ${rgb.rose}
|
||||||
player_4 234 157 52
|
player_4 ${rgb.gold}
|
||||||
player_5 86 148 159
|
player_5 ${rgb.foam}
|
||||||
player_6 180 99 122
|
player_6 ${rgb.love}
|
||||||
player_7 0 0 0
|
player_7 ${rgb.black}
|
||||||
player_8 0 0 0
|
player_8 ${rgb.black}
|
||||||
player_9 0 0 0
|
player_9 ${rgb.black}
|
||||||
player_10 0 0 0
|
player_10 ${rgb.black}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,26 +147,26 @@
|
|||||||
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
|
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
|
||||||
hide_frame_for_single_pane "true"
|
hide_frame_for_single_pane "true"
|
||||||
|
|
||||||
format_left "{mode}#[fg=#286983,bg=#faf4ed,bold] {session}#[bg=#faf4ed] {tabs}"
|
format_left "{mode}#[fg=${palette.pine},bg=${palette.base},bold] {session}#[bg=${palette.base}] {tabs}"
|
||||||
format_right "{datetime}"
|
format_right "{datetime}"
|
||||||
format_space "#[bg=#faf4ed]"
|
format_space "#[bg=${palette.base}]"
|
||||||
|
|
||||||
mode_normal "#[fg=#faf4ed,bg=#286983] "
|
mode_normal "#[fg=${palette.base},bg=${palette.pine}] "
|
||||||
mode_locked "#[fg=#faf4ed,bg=#ea9d34] L "
|
mode_locked "#[fg=${palette.base},bg=${palette.gold}] L "
|
||||||
mode_tab "#[fg=#faf4ed,bg=#6d8f89] T "
|
mode_tab "#[fg=${palette.base},bg=${palette.leaf}] T "
|
||||||
mode_pane "#[fg=#faf4ed,bg=#907aa9] P "
|
mode_pane "#[fg=${palette.base},bg=${palette.iris}] P "
|
||||||
mode_session "#[fg=#faf4ed,bg=#56949f] S "
|
mode_session "#[fg=${palette.base},bg=${palette.foam}] S "
|
||||||
mode_resize "#[fg=#faf4ed,bg=#ea9d34] R "
|
mode_resize "#[fg=${palette.base},bg=${palette.gold}] R "
|
||||||
mode_move "#[fg=#faf4ed,bg=#d7827e] M "
|
mode_move "#[fg=${palette.base},bg=${palette.rose}] M "
|
||||||
mode_search "#[fg=#faf4ed,bg=#b4637a] S "
|
mode_search "#[fg=${palette.base},bg=${palette.love}] S "
|
||||||
|
|
||||||
tab_normal "#[fg=#9893a5,bg=#faf4ed] {index} {name} {fullscreen_indicator}{sync_indicator}{floating_indicator}"
|
tab_normal "#[fg=${palette.muted},bg=${palette.base}] {index} {name} {fullscreen_indicator}{sync_indicator}{floating_indicator}"
|
||||||
tab_active "#[fg=#faf4ed,bg=#286983,bold,underline] {index} {name} {fullscreen_indicator}{sync_indicator}{floating_indicator}"
|
tab_active "#[fg=${palette.base},bg=${palette.pine},bold,underline] {index} {name} {fullscreen_indicator}{sync_indicator}{floating_indicator}"
|
||||||
tab_fullscreen_indicator " "
|
tab_fullscreen_indicator " "
|
||||||
tab_sync_indicator " "
|
tab_sync_indicator " "
|
||||||
tab_floating_indicator " "
|
tab_floating_indicator " "
|
||||||
|
|
||||||
datetime "#[fg=#575279,bg=#faf4ed] {format} "
|
datetime "#[fg=${palette.text},bg=${palette.base}] {format} "
|
||||||
datetime_format "%A, %d %b %Y %H:%M"
|
datetime_format "%A, %d %b %Y %H:%M"
|
||||||
datetime_timezone "Europe/Berlin"
|
datetime_timezone "Europe/Berlin"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user