fix fonts and oh-my-posh
Some checks failed
Build all NixOS Configurations / nix build (push) Failing after 7s

This commit is contained in:
Ingolf Wagner 2024-08-11 21:01:34 +02:00
parent 29e3213e4b
commit 4649ea8de0
Signed by: palo
GPG key ID: 76BF5F1928B9618B
10 changed files with 112 additions and 74 deletions

View file

@ -10,7 +10,6 @@ with lib;
./audio.nix
./browser.nix
./cups.nix
./fonts.nix
./home-manager
./kmonad.nix
#./noti.nix # todo: make this different (use password store and such)

View file

@ -1,36 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
{
options.components.gui.style.enable = mkOption {
type = lib.types.bool;
default = config.components.gui.enable;
};
config = mkIf (config.components.gui.style.enable) {
fonts.packages = with pkgs; [
corefonts
hasklig
inconsolata
source-code-pro
symbola
ubuntu_font_family
# symbol fonts
# ------------
#nerdfonts
#powerline-fonts
#font-awesome
#fira-code-symbols
#jetbrains-mono
# shell font
# ----------
#terminus_font
#gohufont
];
};
}

View file

@ -13,7 +13,6 @@ with lib;
./git.nix
./heygpt.nix
./hoard.nix
./oh-my-posh
./remote-install.nix
./wtf.nix
./zsh.nix

View file

@ -1,26 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
{
options.components.terminal.oh-my-posh.enable = mkOption {
type = lib.types.bool;
default = config.components.terminal.enable;
};
config = mkIf (config.components.terminal.oh-my-posh.enable) {
home-manager.users =
let
poshConfig = {
programs.oh-my-posh = {
enable = true;
# useTheme = "gruvbox";
settings = builtins.fromJSON (builtins.readFile ./gruvbox.json);
};
};
in
{
mainUser = poshConfig;
root = poshConfig;
};
};
}

View file

@ -309,15 +309,15 @@
stylix.image = ./assets/wallpaper.png;
stylix.fonts = {
serif = {
package = pkgs.ubuntu_font_family;
package = pkgs.nerdfonts.override { fonts = [ "Ubuntu" ]; };
name = "Ubuntu";
};
sansSerif = {
package = pkgs.ubuntu_font_family;
package = pkgs.nerdfonts.override { fonts = [ "Ubuntu" ]; };
name = "Ubuntu";
};
monospace = {
package = pkgs.jetbrains-mono;
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
name = "JetBrains Mono";
};
emoji = {
@ -326,11 +326,6 @@
};
sizes.popups = 15;
};
# todo: remove this if not needed anymore
#home-manager.sharedModules = [
# { stylix.targets.bemenu.enable = false; }
#];
};
homeManagerModules = { pkgs, config, ... }: {

View file

@ -1,6 +1,7 @@
{ lib, ... }:
{
imports = [
./oh-my-posh
./packages.nix
./terminal.nix
./zfs.nix

View file

@ -0,0 +1,10 @@
{ pkgs, config, lib, ... }:
with lib;
{
programs.oh-my-posh = {
enable = true;
# https://ohmyposh.dev/docs/themes
#useTheme = "gmay"; # ganz nice, aber farben sind ein bisl schrill
settings = builtins.fromJSON (builtins.readFile ./gmay.json);
};
}

View file

@ -0,0 +1,96 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#076678",
"foreground": "#EBDBB2",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ",
"type": "os"
},
{
"background": "#076678",
"foreground": "#EBDBB2",
"style": "powerline",
"template": " {{ .UserName }}@{{ .HostName }} ",
"type": "session"
},
{
"background": "#B57614",
"foreground": "#EBDBB2",
"powerline_symbol": "\ue0b0",
"properties": {
"style": "full"
},
"style": "powerline",
"template": " \ue5ff {{ .Path }} ",
"type": "path"
},
{
"background": "#79740E",
"foreground": "#EBDBB2",
"powerline_symbol": "\ue0b0",
"properties": {
"time_format": "2006-01-02 15:04:05"
},
"style": "powerline",
"template": " {{ .CurrentDate | date .Format }} ",
"type": "time"
},
{
"background": "#8F3F71",
"foreground": "#EBDBB2",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_stash_count": true,
"fetch_upstream_icon": true
},
"style": "powerline",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"type": "git"
},
{
"background": "#ffff66",
"foreground": "#EBDBB2",
"powerline_symbol": "\ue0b0",
"style": "powerline",
"template": " \uf0e7 ",
"type": "root"
},
{
"background": "#427B58",
"background_templates": ["{{ if gt .Code 0 }}#9D0006{{ end }}"],
"foreground": "#EBDBB2",
"leading_diamond": "<transparent,background>\ue0b0</>",
"properties": {
"always_enabled": true
},
"style": "diamond",
"template": " \ueb05 ",
"trailing_diamond": "\ue0b4",
"type": "status"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#076678",
"style": "plain",
"template": "\uf0a9 ",
"type": "text"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
}

View file

@ -49,8 +49,8 @@ in
enable = true;
bars = {
my = {
icons = "awesome5";
theme = "gruvbox-light";
icons = "material-nf"; # nerd fonts (influenced by stylix.font settings)
theme = "gruvbox-light"; # not configured by stylix yet.
# https://github.com/greshake/i3status-rust/blob/v0.22.0/doc/blocks.md
blocks = [
{