Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf418ca7a0 | ||
|
|
8ae74a9bc9 | ||
|
|
b74133985c | ||
|
|
2de7650f3d |
+15
-2
@@ -1,6 +1,11 @@
|
|||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
{
|
{
|
||||||
flake.modules.nixos.lxc = { pkgs, lib, ...}: {
|
flake.modules.nixos.lxc = { pkgs, lib, ...}:
|
||||||
|
let
|
||||||
|
selfPackages = inputs.self.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
rootShellPath = lib.getExe' selfPackages.jsl-zsh-tty "jsl-zsh-tty";
|
||||||
|
in
|
||||||
|
{
|
||||||
imports = with inputs.self.modules.nixos; [
|
imports = with inputs.self.modules.nixos; [
|
||||||
({ modulesPath, ... }: { imports = [ "${modulesPath}/virtualisation/proxmox-lxc.nix" ]; })
|
({ modulesPath, ... }: { imports = [ "${modulesPath}/virtualisation/proxmox-lxc.nix" ]; })
|
||||||
];
|
];
|
||||||
@@ -8,7 +13,15 @@
|
|||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
time.timeZone = "US/Central";
|
time.timeZone = "US/Central";
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
environment.systemPackages = with pkgs; [ git zsh ];
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
zsh
|
||||||
|
selfPackages.jsl-zsh-tty
|
||||||
|
];
|
||||||
|
environment.shells = lib.mkAfter [
|
||||||
|
rootShellPath
|
||||||
|
];
|
||||||
|
users.users.root.shell = lib.mkForce rootShellPath;
|
||||||
|
|
||||||
# security.sudo-rs.enable = true;
|
# security.sudo-rs.enable = true;
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
package = ghosttyX11;
|
package = ghosttyX11;
|
||||||
settings = {
|
settings = {
|
||||||
command = "TERM=xterm-256color ${lib.getExe pkgs.zsh}";
|
command = "TERM=xterm-256color ${lib.getExe inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.jsl-zsh}";
|
||||||
font-size = 12;
|
font-size = 12;
|
||||||
font-family = "Source Code Pro";
|
font-family = "Source Code Pro";
|
||||||
theme = "Catppuccin Mocha";
|
theme = "Catppuccin Mocha";
|
||||||
|
|||||||
@@ -50,5 +50,65 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}).wrapper;
|
}).wrapper;
|
||||||
|
|
||||||
|
packages.starship-ascii = (inputs.wrappers.wrapperModules.starship.apply {
|
||||||
|
inherit pkgs;
|
||||||
|
settings = {
|
||||||
|
add_newline = false;
|
||||||
|
|
||||||
|
format = "$username$hostname$directory$git_branch$git_status$cmd_duration$line_break$character";
|
||||||
|
|
||||||
|
username = {
|
||||||
|
show_always = true;
|
||||||
|
format = "[$user]($style)";
|
||||||
|
style_user = "bold blue";
|
||||||
|
style_root = "bold red";
|
||||||
|
};
|
||||||
|
|
||||||
|
hostname = {
|
||||||
|
disabled = false;
|
||||||
|
ssh_only = false;
|
||||||
|
format = "[@$hostname]($style) ";
|
||||||
|
style = "bold blue";
|
||||||
|
};
|
||||||
|
|
||||||
|
directory = {
|
||||||
|
truncation_length = 3;
|
||||||
|
truncate_to_repo = true;
|
||||||
|
format = "[ in $path]($style) ";
|
||||||
|
style = "bold cyan";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_branch = {
|
||||||
|
symbol = "on ";
|
||||||
|
format = "[$symbol$branch]($style) ";
|
||||||
|
style = "bold yellow";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_status = {
|
||||||
|
format = "([$all_status$ahead_behind]($style) )";
|
||||||
|
style = "bold red";
|
||||||
|
ahead = "ahead:$count ";
|
||||||
|
behind = "behind:$count ";
|
||||||
|
diverged = "diverged:$ahead_count/$behind_count ";
|
||||||
|
up_to_date = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
cmd_duration = {
|
||||||
|
min_time = 2000;
|
||||||
|
show_notifications = false;
|
||||||
|
format = "took [$duration]($style) ";
|
||||||
|
style = "bold green";
|
||||||
|
};
|
||||||
|
|
||||||
|
line_break.disabled = false;
|
||||||
|
|
||||||
|
character = {
|
||||||
|
success_symbol = "[\\$](bold green) ";
|
||||||
|
error_symbol = "[\\$](bold red) ";
|
||||||
|
vicmd_symbol = "[\\$](bold yellow) ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}).wrapper;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
+29
-46
@@ -23,58 +23,29 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules = {
|
flake.modules = {
|
||||||
nixos.zsh = { pkgs, ... }: {
|
nixos.zsh = { pkgs, ... }:
|
||||||
users.users."${username}".shell = pkgs.zsh;
|
let
|
||||||
|
selfPackages = inputs.self.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
users.users."${username}".shell = selfPackages.jsl-zsh;
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
# Already being imported by the john.nix module
|
|
||||||
# home-manager.sharedModules = [
|
|
||||||
# inputs.self.modules.homeManager.zsh
|
|
||||||
# ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homeManager.zsh = { pkgs, config, ... }: {
|
homeManager.zsh = { pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
selfPackages = inputs.self.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
in
|
||||||
|
{
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.jsl-zsh;
|
package = selfPackages.jsl-zsh;
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
# syntaxHighlighting.enable = true;
|
|
||||||
initContent = ''
|
|
||||||
HOST=$(hostname -s)
|
|
||||||
${homeEndKeyBindings}
|
|
||||||
'';
|
|
||||||
dotDir = "${config.xdg.configHome}/zsh";
|
dotDir = "${config.xdg.configHome}/zsh";
|
||||||
history = {
|
|
||||||
append = true;
|
|
||||||
ignoreAllDups = true;
|
|
||||||
ignorePatterns = [
|
|
||||||
"history"
|
|
||||||
"ls"
|
|
||||||
"eza"
|
|
||||||
"clear"
|
|
||||||
];
|
|
||||||
save = historySize;
|
|
||||||
size = historySize;
|
|
||||||
share = true;
|
|
||||||
};
|
|
||||||
oh-my-zsh = {
|
|
||||||
enable = true;
|
|
||||||
# theme = "risto";
|
|
||||||
theme = "agnoster";
|
|
||||||
plugins = [
|
|
||||||
"sudo"
|
|
||||||
"dotenv"
|
|
||||||
"git"
|
|
||||||
"ssh"
|
|
||||||
"ssh-agent"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem = { config, self', pkgs, lib, ... }: {
|
perSystem = { config, self', pkgs, lib, ... }:
|
||||||
packages.jsl-zsh =
|
|
||||||
let
|
let
|
||||||
ignorePatterns = [
|
ignorePatterns = [
|
||||||
"ls" "eza" "history" "clear"
|
"ls" "eza" "history" "clear"
|
||||||
@@ -82,7 +53,6 @@ in
|
|||||||
integrationPackages = with pkgs; [
|
integrationPackages = with pkgs; [
|
||||||
fzf
|
fzf
|
||||||
zoxide
|
zoxide
|
||||||
self'.packages.starship
|
|
||||||
];
|
];
|
||||||
extraToolPackages = with pkgs; [
|
extraToolPackages = with pkgs; [
|
||||||
lazygit
|
lazygit
|
||||||
@@ -91,7 +61,6 @@ in
|
|||||||
self'.packages.shell-tools
|
self'.packages.shell-tools
|
||||||
self'.packages.neovim-min
|
self'.packages.neovim-min
|
||||||
];
|
];
|
||||||
loginBootstrapPath = lib.makeBinPath (integrationPackages ++ extraToolPackages);
|
|
||||||
aliasStr = lib.concatStringsSep "\n" (
|
aliasStr = lib.concatStringsSep "\n" (
|
||||||
lib.mapAttrsToList (k: v: "alias -- ${lib.escapeShellArg k}=${lib.escapeShellArg v}") {
|
lib.mapAttrsToList (k: v: "alias -- ${lib.escapeShellArg k}=${lib.escapeShellArg v}") {
|
||||||
ls = "eza";
|
ls = "eza";
|
||||||
@@ -102,10 +71,13 @@ in
|
|||||||
ds = "gdu -i /snap /";
|
ds = "gdu -i /snap /";
|
||||||
ld = "lazydocker";
|
ld = "lazydocker";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mkJslZsh = { binName, starshipPackage }:
|
||||||
|
let
|
||||||
|
loginBootstrapPath = lib.makeBinPath (integrationPackages ++ [ starshipPackage ] ++ extraToolPackages);
|
||||||
in
|
in
|
||||||
(inputs.wrappers.wrapperModules.zsh.apply {
|
(inputs.wrappers.wrapperModules.zsh.apply {
|
||||||
inherit pkgs;
|
inherit pkgs binName;
|
||||||
binName = "jsl-zsh";
|
|
||||||
env = {
|
env = {
|
||||||
LANG = "en_US.UTF-8";
|
LANG = "en_US.UTF-8";
|
||||||
COLORTERM = "truecolor";
|
COLORTERM = "truecolor";
|
||||||
@@ -151,5 +123,16 @@ in
|
|||||||
'';
|
'';
|
||||||
extraPackages = extraToolPackages;
|
extraPackages = extraToolPackages;
|
||||||
}).wrapper;
|
}).wrapper;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.jsl-zsh = mkJslZsh {
|
||||||
|
binName = "jsl-zsh";
|
||||||
|
starshipPackage = self'.packages.starship;
|
||||||
|
};
|
||||||
|
|
||||||
|
packages.jsl-zsh-tty = mkJslZsh {
|
||||||
|
binName = "jsl-zsh-tty";
|
||||||
|
starshipPackage = self'.packages.starship-ascii;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user