refactor(home): Remove color options from marleyos.theme
This commit is contained in:
parent
b24720d921
commit
f06c243d43
22 changed files with 376 additions and 482 deletions
|
@ -21,6 +21,10 @@
|
||||||
marleyvim.overlays.default
|
marleyvim.overlays.default
|
||||||
];
|
];
|
||||||
|
|
||||||
|
systems.modules.nixos = with inputs; [
|
||||||
|
rose-pine.nixosModules.rose-pine
|
||||||
|
];
|
||||||
|
|
||||||
systems.modules.darwin = with inputs; [
|
systems.modules.darwin = with inputs; [
|
||||||
lix.nixosModules.default
|
lix.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,41 +5,22 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
|
|
||||||
cfg = config.marleyos.appearance.base;
|
cfg = config.marleyos.appearance.base;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
inherit (config.marleyos) isDesktop;
|
inherit (config.marleyos) isDesktop;
|
||||||
in {
|
in {
|
||||||
options.marleyos.appearance.base.enable = mkEnableOption "base";
|
options.marleyos.appearance.base.enable = mkEnableOption "base";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
rose-pine = {
|
||||||
# TODO: package font with harfbuzz features.
|
enable = true;
|
||||||
maple-mono-NF
|
flavor = "main";
|
||||||
dm-sans
|
};
|
||||||
eb-garamond
|
|
||||||
whatsapp-emoji-font
|
|
||||||
];
|
|
||||||
|
|
||||||
rose-pine.pointerCursor = mkIf colors.isRosePine enabled;
|
rose-pine.pointerCursor.enable = mkIf config.rose-pine.enable true;
|
||||||
|
|
||||||
marleyos = {
|
marleyos = {
|
||||||
theme = {
|
theme = {
|
||||||
colors = {
|
|
||||||
default = "dark";
|
|
||||||
|
|
||||||
dark = {
|
|
||||||
base = "rose-pine";
|
|
||||||
flavor = "main";
|
|
||||||
};
|
|
||||||
|
|
||||||
light = {
|
|
||||||
base = "rose-pine";
|
|
||||||
flavor = "dawn";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
icons = {
|
icons = {
|
||||||
package = pkgs.kora-icon-theme;
|
package = pkgs.kora-icon-theme;
|
||||||
name = "kora";
|
name = "kora";
|
||||||
|
@ -49,6 +30,7 @@ in {
|
||||||
monospace = {
|
monospace = {
|
||||||
package = pkgs.maple-mono-NF;
|
package = pkgs.maple-mono-NF;
|
||||||
name = "Maple Mono NF";
|
name = "Maple Mono NF";
|
||||||
|
# TODO: package font with harfbuzz features.
|
||||||
ligatures = [
|
ligatures = [
|
||||||
"cv02"
|
"cv02"
|
||||||
"ss01"
|
"ss01"
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
inherit (lib.marleyos) enabled;
|
inherit (lib.marleyos) enabled;
|
||||||
|
|
||||||
cfg = config.marleyos.appearance.gtk;
|
cfg = config.marleyos.appearance.gtk;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
in {
|
in {
|
||||||
options.marleyos.appearance.gtk.enable = mkEnableOption "gtk";
|
options.marleyos.appearance.gtk.enable = mkEnableOption "gtk";
|
||||||
|
|
||||||
|
@ -17,7 +16,7 @@ in {
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
rose-pine = mkIf colors.isRosePine enabled;
|
rose-pine = mkIf config.rose-pine.enable enabled;
|
||||||
|
|
||||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,18 +3,15 @@
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
|
||||||
cfg = config.marleyos.appearance.qt;
|
cfg = config.marleyos.appearance.qt;
|
||||||
inherit (config.marleyos.theme) colors;
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.marleyos.appearance.qt.enable = mkEnableOption "qt";
|
options.marleyos.appearance.qt.enable = mkEnableOption "qt";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
xdg.configFile = mkIf (colors.base == "rose-pine") {
|
xdg.configFile = mkIf config.rose-pine.enable {
|
||||||
"qt5ct/colors/rose-pine.conf" = {
|
"qt5ct/colors/rose-pine.conf" = {
|
||||||
source = "${inputs.rose-pine-qt5ct}/rose-pine.conf";
|
source = "${inputs.rose-pine-qt5ct}/rose-pine.conf";
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,48 +9,6 @@
|
||||||
|
|
||||||
cfg = config.marleyos.theme;
|
cfg = config.marleyos.theme;
|
||||||
|
|
||||||
colorThemes = lib.types.enum [
|
|
||||||
"rose-pine"
|
|
||||||
];
|
|
||||||
|
|
||||||
colorThemeType = lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
base = lib.mkOption {
|
|
||||||
type = colorThemes;
|
|
||||||
example = "rose-pine";
|
|
||||||
description = lib.literalMD ''
|
|
||||||
The color theme to use. This should match the base of the enable
|
|
||||||
options provided by the input's module. For instance, the rose-pine
|
|
||||||
home-manager module provides the {option}`rose-pine.enable` base
|
|
||||||
option and the {option}`programs.gtk.rose-pine.enable` option.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
flavor = lib.mkOption {
|
|
||||||
type = with lib.types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
example = "moon";
|
|
||||||
description = "The theme flavor to use, if applicable.";
|
|
||||||
};
|
|
||||||
|
|
||||||
accent = lib.mkOption {
|
|
||||||
type = with lib.types; nullOr str;
|
|
||||||
default = null;
|
|
||||||
example = "rose";
|
|
||||||
description = "The theme accent to use, if applicable.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
mkColorThemeOpt = mode: flavor: (lib.mkOption {
|
|
||||||
type = with lib.types; either str colorThemeType;
|
|
||||||
default = {
|
|
||||||
base = "rose-pine";
|
|
||||||
inherit flavor;
|
|
||||||
};
|
|
||||||
description = "The color theme to use in ${mode} mode.";
|
|
||||||
});
|
|
||||||
|
|
||||||
# https://github.com/nix-community/home-manager/blob/master/modules/misc/gtk.nix
|
# https://github.com/nix-community/home-manager/blob/master/modules/misc/gtk.nix
|
||||||
iconThemeType = lib.types.submodule {
|
iconThemeType = lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
@ -100,31 +58,6 @@
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
options.marleyos.theme = {
|
options.marleyos.theme = {
|
||||||
colors = {
|
|
||||||
default = lib.mkOption {
|
|
||||||
type = with lib.types; str;
|
|
||||||
default = "dark";
|
|
||||||
description = "Whether to prefer the light or dark theme.";
|
|
||||||
};
|
|
||||||
|
|
||||||
light = mkColorThemeOpt "light" "dawn";
|
|
||||||
dark = mkColorThemeOpt "dark" "main";
|
|
||||||
|
|
||||||
base = lib.mkOption {
|
|
||||||
type = colorThemes;
|
|
||||||
};
|
|
||||||
flavor = lib.mkOption {
|
|
||||||
type = with lib.types; nullOr str;
|
|
||||||
};
|
|
||||||
accent = lib.mkOption {
|
|
||||||
type = with lib.types; nullOr str;
|
|
||||||
};
|
|
||||||
|
|
||||||
isRosePine = lib.mkOption {
|
|
||||||
type = with lib.types; bool;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
icons = lib.mkOption {
|
icons = lib.mkOption {
|
||||||
type = with lib.types; nullOr iconThemeType;
|
type = with lib.types; nullOr iconThemeType;
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -166,18 +99,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
# colors
|
|
||||||
{
|
|
||||||
marleyos.theme.colors = rec {
|
|
||||||
inherit (cfg.colors."${cfg.colors.default}") base;
|
|
||||||
inherit (cfg.colors."${cfg.colors.default}") flavor;
|
|
||||||
inherit (cfg.colors."${cfg.colors.default}") accent;
|
|
||||||
|
|
||||||
# HACK: Need to come up with a better solution
|
|
||||||
isRosePine = base == "rose-pine";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# icons
|
# icons
|
||||||
(lib.mkIf ((cfg.icons != null) && (is-linux system)) {
|
(lib.mkIf ((cfg.icons != null) && (is-linux system)) {
|
||||||
gtk = lib.mkDefault {
|
gtk = lib.mkDefault {
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
|
||||||
cfg = config.marleyos.programs.amfora;
|
cfg = config.marleyos.programs.amfora;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
|
|
||||||
|
theme =
|
||||||
|
if config.rose-pine.enable
|
||||||
|
then "rose-pine"
|
||||||
|
else "";
|
||||||
themeFiles = {
|
themeFiles = {
|
||||||
rose-pine = "${inputs.rose-pine-amfora}/themes/rose-pine.toml";
|
rose-pine = "${inputs.rose-pine-amfora}/themes/rose-pine.toml";
|
||||||
};
|
};
|
||||||
|
themeFile = themeFiles."${theme}";
|
||||||
themeFile = themeFiles."${colors.base}";
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.marleyos.programs.amfora.enable = mkEnableOption "amfora";
|
options.marleyos.programs.amfora.enable = mkEnableOption "amfora";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -25,12 +25,13 @@ in
|
||||||
amfora
|
amfora
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg.configFile."amfora/theme.toml".source = "${themeFile}";
|
xdg.configFile."amfora/theme.toml".source = themeFile;
|
||||||
|
|
||||||
# https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml
|
# https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml
|
||||||
# Amfora requires a number of options to run - omitting everything I didn't
|
# Amfora requires a number of options to run - omitting everything I didn't
|
||||||
# care to customize resulted in go panic errors.
|
# care to customize resulted in go panic errors.
|
||||||
xdg.configFile."amfora/config.toml".text = # toml
|
xdg.configFile."amfora/config.toml".text =
|
||||||
|
# toml
|
||||||
''
|
''
|
||||||
include = "./theme.toml"
|
include = "./theme.toml"
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ in
|
||||||
underline = true
|
underline = true
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
highlight_style = "${colors.base}"
|
highlight_style = "${theme}"
|
||||||
|
|
||||||
# Defaults {{{
|
# Defaults {{{
|
||||||
[auth]
|
[auth]
|
||||||
|
|
|
@ -3,15 +3,11 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
|
|
||||||
cfg = config.marleyos.programs.bat;
|
cfg = config.marleyos.programs.bat;
|
||||||
inherit (config.marleyos.theme) colors;
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.marleyos.programs.bat.enable = mkEnableOption "bat";
|
options.marleyos.programs.bat.enable = mkEnableOption "bat";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -23,8 +19,6 @@ in
|
||||||
batman
|
batman
|
||||||
];
|
];
|
||||||
|
|
||||||
rose-pine = mkIf colors.isRosePine enabled;
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
style = "auto";
|
style = "auto";
|
||||||
};
|
};
|
||||||
|
@ -38,13 +32,15 @@ in
|
||||||
functions = {
|
functions = {
|
||||||
cat = {
|
cat = {
|
||||||
wraps = "bat";
|
wraps = "bat";
|
||||||
body = # fish
|
body =
|
||||||
|
# fish
|
||||||
"bat $argv";
|
"bat $argv";
|
||||||
};
|
};
|
||||||
|
|
||||||
cath = {
|
cath = {
|
||||||
wraps = "bat";
|
wraps = "bat";
|
||||||
body = # fish
|
body =
|
||||||
|
# fish
|
||||||
"bat --plain --language=help $argv";
|
"bat --plain --language=help $argv";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -54,25 +50,29 @@ in
|
||||||
B = {
|
B = {
|
||||||
position = "anywhere";
|
position = "anywhere";
|
||||||
setCursor = true;
|
setCursor = true;
|
||||||
expansion = # fish
|
expansion =
|
||||||
|
# fish
|
||||||
"% | bat";
|
"% | bat";
|
||||||
};
|
};
|
||||||
|
|
||||||
"-h" = {
|
"-h" = {
|
||||||
position = "anywhere";
|
position = "anywhere";
|
||||||
expansion = # fish
|
expansion =
|
||||||
|
# fish
|
||||||
"-h | cath";
|
"-h | cath";
|
||||||
};
|
};
|
||||||
|
|
||||||
"--help" = {
|
"--help" = {
|
||||||
position = "anywhere";
|
position = "anywhere";
|
||||||
expansion = # fish
|
expansion =
|
||||||
|
# fish
|
||||||
"--help | cath";
|
"--help | cath";
|
||||||
};
|
};
|
||||||
|
|
||||||
help = {
|
help = {
|
||||||
position = "anywhere";
|
position = "anywhere";
|
||||||
expansion = # fish
|
expansion =
|
||||||
|
# fish
|
||||||
"help | cath";
|
"help | cath";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,23 +2,17 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
|
|
||||||
cfg = config.marleyos.programs.btop;
|
cfg = config.marleyos.programs.btop;
|
||||||
inherit (config.marleyos.theme) colors;
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.marleyos.programs.btop.enable = mkEnableOption "btop";
|
options.marleyos.programs.btop.enable = mkEnableOption "btop";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
rose-pine = mkIf colors.isRosePine enabled;
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
theme_background = false;
|
theme_background = false;
|
||||||
truecolor = true;
|
truecolor = true;
|
||||||
|
|
|
@ -2,15 +2,11 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
|
|
||||||
cfg = config.marleyos.programs.cava;
|
cfg = config.marleyos.programs.cava;
|
||||||
inherit (config.marleyos.theme) colors;
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.marleyos.programs.cava.enable = mkEnableOption "cava";
|
options.marleyos.programs.cava.enable = mkEnableOption "cava";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -19,8 +15,6 @@ in
|
||||||
# ported to nixpkgs/unstable
|
# ported to nixpkgs/unstable
|
||||||
enable = false;
|
enable = false;
|
||||||
|
|
||||||
rose-pine = mkIf colors.isRosePine enabled;
|
|
||||||
|
|
||||||
# TODO: disable this when mpd is not enabled? Can that be detected on non
|
# TODO: disable this when mpd is not enabled? Can that be detected on non
|
||||||
# NixOS systems?
|
# NixOS systems?
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -3,16 +3,13 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
|
||||||
cfg = config.marleyos.programs.cheat;
|
cfg = config.marleyos.programs.cheat;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
|
|
||||||
toYAML = (pkgs.formats.yaml { }).generate;
|
toYAML = (pkgs.formats.yaml {}).generate;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.marleyos.programs.cheat.enable = mkEnableOption "cheat";
|
options.marleyos.programs.cheat.enable = mkEnableOption "cheat";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -22,28 +19,26 @@ in
|
||||||
|
|
||||||
xdg.configFile."cheat/conf.yml".source = toYAML "conf.yml" {
|
xdg.configFile."cheat/conf.yml".source = toYAML "conf.yml" {
|
||||||
colorize = true;
|
colorize = true;
|
||||||
style = "${colors.base}";
|
style = lib.mkIf config.rose-pine.enable "rose-pine";
|
||||||
formatter = "terminal256";
|
formatter = "terminal256";
|
||||||
pager = "less -FRX";
|
pager = "less -FRX";
|
||||||
|
|
||||||
cheatpaths =
|
cheatpaths = let
|
||||||
let
|
cheatDir = "${config.xdg.configHome}/cheat/cheatsheets";
|
||||||
cheatDir = "${config.xdg.configHome}/cheat/cheatsheets";
|
in [
|
||||||
in
|
{
|
||||||
[
|
name = "community";
|
||||||
{
|
path = "${cheatDir}/community";
|
||||||
name = "community";
|
tags = ["community"];
|
||||||
path = "${cheatDir}/community";
|
readonly = true;
|
||||||
tags = [ "community" ];
|
}
|
||||||
readonly = true;
|
{
|
||||||
}
|
name = "personal";
|
||||||
{
|
path = "${cheatDir}/personal";
|
||||||
name = "personal";
|
tags = ["personal"];
|
||||||
path = "${cheatDir}/personal";
|
readonly = false;
|
||||||
tags = [ "personal" ];
|
}
|
||||||
readonly = false;
|
];
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,21 +4,16 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf optionals;
|
inherit (lib) mkEnableOption mkIf optionals;
|
||||||
inherit (lib.snowfall.system) is-linux is-darwin;
|
inherit (lib.snowfall.system) is-linux is-darwin;
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
|
|
||||||
cfg = config.marleyos.programs.fish;
|
cfg = config.marleyos.programs.fish;
|
||||||
inherit (config.marleyos.theme) colors;
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.marleyos.programs.fish.enable = mkEnableOption "fish";
|
options.marleyos.programs.fish.enable = mkEnableOption "fish";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages =
|
home.packages = with pkgs;
|
||||||
with pkgs;
|
|
||||||
[
|
[
|
||||||
# general
|
# general
|
||||||
babelfish
|
babelfish
|
||||||
|
@ -36,14 +31,12 @@ in
|
||||||
pax
|
pax
|
||||||
]
|
]
|
||||||
# unrar-free is broken on darwin :(
|
# unrar-free is broken on darwin :(
|
||||||
++ (optionals (is-linux system) [ unrar-free ])
|
++ (optionals (is-linux system) [unrar-free])
|
||||||
++ (optionals (is-darwin system) [ unrar ]);
|
++ (optionals (is-darwin system) [unrar]);
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
rose-pine = mkIf colors.isRosePine enabled;
|
|
||||||
|
|
||||||
preferAbbrs = true;
|
preferAbbrs = true;
|
||||||
|
|
||||||
plugins = with pkgs.fishPlugins; [
|
plugins = with pkgs.fishPlugins; [
|
||||||
|
@ -65,7 +58,8 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
shellInit = # fish
|
shellInit =
|
||||||
|
# fish
|
||||||
''
|
''
|
||||||
set -g fish_key_bindings fish_vi_key_bindings
|
set -g fish_key_bindings fish_vi_key_bindings
|
||||||
'';
|
'';
|
||||||
|
@ -79,7 +73,8 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
functions = {
|
functions = {
|
||||||
fish_greeting = # fish
|
fish_greeting =
|
||||||
|
# fish
|
||||||
''
|
''
|
||||||
echo ""
|
echo ""
|
||||||
figlet -f Elite " marleyOS" | lolcat
|
figlet -f Elite " marleyOS" | lolcat
|
||||||
|
@ -87,7 +82,8 @@ in
|
||||||
|
|
||||||
extract = {
|
extract = {
|
||||||
argumentNames = "file";
|
argumentNames = "file";
|
||||||
body = # fish
|
body =
|
||||||
|
# fish
|
||||||
''
|
''
|
||||||
set --erase argv[1]
|
set --erase argv[1]
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
|
|
||||||
cfg = config.marleyos.programs.fzf;
|
cfg = config.marleyos.programs.fzf;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
|
|
||||||
has-ripgrep = config.programs.ripgrep.enable;
|
has-ripgrep = config.programs.ripgrep.enable;
|
||||||
has-fd = config.programs.fd.enable;
|
has-fd = config.programs.fd.enable;
|
||||||
|
@ -17,16 +14,13 @@ let
|
||||||
has-tmux = config.programs.tmux.enable;
|
has-tmux = config.programs.tmux.enable;
|
||||||
has-delta = config.programs.git.delta.enable;
|
has-delta = config.programs.git.delta.enable;
|
||||||
has-difft = config.programs.git.difftastic.enable;
|
has-difft = config.programs.git.difftastic.enable;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.marleyos.programs.fzf.enable = mkEnableOption "fzf";
|
options.marleyos.programs.fzf.enable = mkEnableOption "fzf";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
rose-pine = mkIf colors.isRosePine enabled;
|
|
||||||
|
|
||||||
defaultOptions = [
|
defaultOptions = [
|
||||||
"--margin=10%,5%"
|
"--margin=10%,5%"
|
||||||
"--border=sharp"
|
"--border=sharp"
|
||||||
|
@ -53,15 +47,14 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables =
|
home.sessionVariables =
|
||||||
if has-delta then
|
if has-delta
|
||||||
{
|
then {
|
||||||
fzf_diff_highlighter = "delta --paging=never --features=arctic-fox";
|
fzf_diff_highlighter = "delta --paging=never --features=arctic-fox";
|
||||||
}
|
}
|
||||||
else if has-difft then
|
else if has-difft
|
||||||
{
|
then {
|
||||||
fzf_diff_highlighter = "difft --color=always";
|
fzf_diff_highlighter = "difft --color=always";
|
||||||
}
|
}
|
||||||
else
|
else {};
|
||||||
{ };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,242 +2,237 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkDefault concatStrings;
|
inherit (lib) mkIf mkDefault concatStrings;
|
||||||
|
|
||||||
cfg = config.marleyos.programs.starship;
|
cfg = config.marleyos.programs.starship;
|
||||||
inherit (config.marleyos.theme) colors;
|
in {
|
||||||
in
|
config = mkIf (cfg.enable && config.rose-pine.enable) {
|
||||||
{
|
programs.starship.settings = let
|
||||||
config = mkIf (cfg.enable && colors.isRosePine) {
|
mkFormat = t: " [](fg:overlay)[${t}]($style)[](fg:overlay) ";
|
||||||
programs.starship.settings =
|
langFormat = mkFormat "$symbol$version";
|
||||||
let
|
in {
|
||||||
mkFormat = t: " [](fg:overlay)[${t}]($style)[](fg:overlay) ";
|
format = mkDefault (concatStrings [
|
||||||
langFormat = mkFormat "$symbol$version";
|
"$username"
|
||||||
in
|
"$directory"
|
||||||
{
|
"$nix_shell"
|
||||||
format = mkDefault (concatStrings [
|
"$git_branch"
|
||||||
"$username"
|
"$git_status"
|
||||||
"$directory"
|
"$fill"
|
||||||
"$nix_shell"
|
"$c"
|
||||||
"$git_branch"
|
"$elixir"
|
||||||
"$git_status"
|
"$elm"
|
||||||
"$fill"
|
"$golang"
|
||||||
"$c"
|
"$haskell"
|
||||||
"$elixir"
|
"$java"
|
||||||
"$elm"
|
"$julia"
|
||||||
"$golang"
|
"$nodejs"
|
||||||
"$haskell"
|
"$nim"
|
||||||
"$java"
|
"$rust"
|
||||||
"$julia"
|
"$scala"
|
||||||
"$nodejs"
|
"$python"
|
||||||
"$nim"
|
"$time"
|
||||||
"$rust"
|
"$line_break"
|
||||||
"$scala"
|
"$character"
|
||||||
"$python"
|
]);
|
||||||
"$time"
|
|
||||||
"$line_break"
|
|
||||||
"$character"
|
|
||||||
]);
|
|
||||||
|
|
||||||
# TODO: Make the palette available from rose-pine-nix.
|
# TODO: Make the palette available from rose-pine-nix.
|
||||||
palettes.rose-pine =
|
palettes.rose-pine =
|
||||||
if (colors.flavor == "moon") then
|
if (config.rose-pine.flavor == "moon")
|
||||||
(mkDefault {
|
then
|
||||||
overlay = "#393552";
|
(mkDefault {
|
||||||
love = "#eb6f92";
|
overlay = "#393552";
|
||||||
gold = "#f6c177";
|
love = "#eb6f92";
|
||||||
rose = "#ea9a97";
|
gold = "#f6c177";
|
||||||
pine = "#3e8fb0";
|
rose = "#ea9a97";
|
||||||
foam = "#9ccfd8";
|
pine = "#3e8fb0";
|
||||||
iris = "#c4a7e7";
|
foam = "#9ccfd8";
|
||||||
})
|
iris = "#c4a7e7";
|
||||||
else if (colors.flavor == "dawn") then
|
})
|
||||||
(mkDefault {
|
else if (config.rose-pine.flavor == "dawn")
|
||||||
overlay = "#f2e9e1";
|
then
|
||||||
love = "#b4637a";
|
(mkDefault {
|
||||||
gold = "#ea9d34";
|
overlay = "#f2e9e1";
|
||||||
rose = "#d7827e";
|
love = "#b4637a";
|
||||||
pine = "#286983";
|
gold = "#ea9d34";
|
||||||
foam = "#56949f";
|
rose = "#d7827e";
|
||||||
iris = "#907aa9";
|
pine = "#286983";
|
||||||
})
|
foam = "#56949f";
|
||||||
else
|
iris = "#907aa9";
|
||||||
(mkDefault {
|
})
|
||||||
overlay = "#26233a";
|
else
|
||||||
love = "#eb6f92";
|
(mkDefault {
|
||||||
gold = "#f6c177";
|
overlay = "#26233a";
|
||||||
rose = "#ebbcba";
|
love = "#eb6f92";
|
||||||
pine = "#31748f";
|
gold = "#f6c177";
|
||||||
foam = "#9ccfd8";
|
rose = "#ebbcba";
|
||||||
iris = "#c4a7e7";
|
pine = "#31748f";
|
||||||
});
|
foam = "#9ccfd8";
|
||||||
|
iris = "#c4a7e7";
|
||||||
|
});
|
||||||
|
|
||||||
palette = "rose-pine";
|
palette = "rose-pine";
|
||||||
|
|
||||||
username = {
|
username = {
|
||||||
disabled = mkDefault false;
|
disabled = mkDefault false;
|
||||||
format = mkDefault (mkFormat " $user ");
|
format = mkDefault (mkFormat " $user ");
|
||||||
show_always = mkDefault true;
|
show_always = mkDefault true;
|
||||||
style_root = mkDefault "bg:overlay fg:iris";
|
style_root = mkDefault "bg:overlay fg:iris";
|
||||||
style_user = mkDefault "bg:overlay fg:iris";
|
style_user = mkDefault "bg:overlay fg:iris";
|
||||||
};
|
};
|
||||||
|
|
||||||
directory = {
|
directory = {
|
||||||
format = mkDefault (mkFormat " $path ");
|
format = mkDefault (mkFormat " $path ");
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
truncation_length = mkDefault 3;
|
truncation_length = mkDefault 3;
|
||||||
truncation_symbol = mkDefault "…/";
|
truncation_symbol = mkDefault "…/";
|
||||||
|
|
||||||
substitutions = {
|
substitutions = {
|
||||||
Documents = mkDefault "";
|
Documents = mkDefault "";
|
||||||
Downloads = mkDefault " ";
|
Downloads = mkDefault " ";
|
||||||
Music = mkDefault " ";
|
Music = mkDefault " ";
|
||||||
Pictures = mkDefault " ";
|
Pictures = mkDefault " ";
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
git_branch = {
|
|
||||||
format = mkDefault (mkFormat " $symbol $branch ");
|
|
||||||
style = mkDefault "bg:overlay fg:foam";
|
|
||||||
symbol = mkDefault "";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_status = {
|
|
||||||
disabled = mkDefault false;
|
|
||||||
style = mkDefault "bg:overlay fg:love";
|
|
||||||
format = mkDefault (mkFormat " $all_status$ahead_behind");
|
|
||||||
up_to_date = mkDefault "[ ✓ ](bg:overlay fg:iris)";
|
|
||||||
untracked = mkDefault "[?\\($count\\)](bg:overlay fg:gold)";
|
|
||||||
stashed = mkDefault "[\\$](bg:overlay fg:iris)";
|
|
||||||
modified = mkDefault "[!\\($count\\)](bg:overlay fg:gold)";
|
|
||||||
renamed = mkDefault "[»\\($count\\)](bg:overlay fg:iris)";
|
|
||||||
deleted = mkDefault "[✘\\($count\\)](style)";
|
|
||||||
staged = mkDefault "[++\\($count\\)](bg:overlay fg:gold)";
|
|
||||||
ahead = mkDefault "[⇡\\(\${count}\\)](bg:overlay fg:foam)";
|
|
||||||
diverged = mkDefault "⇕[\\[](bg:overlay fg:iris)[⇡\\(\${ahead_count}\\)](bg:overlay fg:foam)[⇣\\(\${behind_count}\\)](bg:overlay fg:rose)[\\]](bg:overlay fg:iris)";
|
|
||||||
behind = mkDefault "[⇣\\(\${count}\\)](bg:overlay fg:rose)";
|
|
||||||
};
|
|
||||||
|
|
||||||
fill = {
|
|
||||||
style = mkDefault "fg:overlay";
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
time = {
|
|
||||||
disabled = mkDefault false;
|
|
||||||
format = mkDefault (mkFormat " $time ");
|
|
||||||
style = mkDefault "bg:overlay fg:rose";
|
|
||||||
time_format = mkDefault "%I:%M%P";
|
|
||||||
use_12hr = mkDefault true;
|
|
||||||
};
|
|
||||||
|
|
||||||
character =
|
|
||||||
let
|
|
||||||
vim = "";
|
|
||||||
mkChar = sym: col: " [${sym}](fg:${col}) [](fg:foam)";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
success_symbol = mkChar "" "iris";
|
|
||||||
error_symbol = mkChar "" "love";
|
|
||||||
vimcmd_symbol = mkChar vim "rose";
|
|
||||||
vimcmd_replace_one_symbol = mkChar vim "foam";
|
|
||||||
vimcmd_replace_symbol = mkChar vim "foam";
|
|
||||||
vimcmd_visual_symbol = mkChar vim "iris";
|
|
||||||
};
|
|
||||||
|
|
||||||
### Languages ###
|
|
||||||
c = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
elixir = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
elm = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
haskell = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
java = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
julia = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
nodejs = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
nim = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
python = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
rust = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault "";
|
|
||||||
};
|
|
||||||
|
|
||||||
scala = {
|
|
||||||
style = "bg:overlay fg:pine";
|
|
||||||
format = mkDefault langFormat;
|
|
||||||
disabled = false;
|
|
||||||
symbol = " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
### Tools ###
|
|
||||||
conda = {
|
|
||||||
style = mkDefault "bg:overlay fg:pine";
|
|
||||||
format = mkDefault (mkFormat "$symbol$environment");
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault "🅒 ";
|
|
||||||
};
|
|
||||||
|
|
||||||
nix_shell = {
|
|
||||||
style = "bg:overlay fg:foam";
|
|
||||||
format = mkDefault (mkFormat " $symbol $state( \($name\)) ");
|
|
||||||
disabled = mkDefault false;
|
|
||||||
symbol = mkDefault " ";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
git_branch = {
|
||||||
|
format = mkDefault (mkFormat " $symbol $branch ");
|
||||||
|
style = mkDefault "bg:overlay fg:foam";
|
||||||
|
symbol = mkDefault "";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_status = {
|
||||||
|
disabled = mkDefault false;
|
||||||
|
style = mkDefault "bg:overlay fg:love";
|
||||||
|
format = mkDefault (mkFormat " $all_status$ahead_behind");
|
||||||
|
up_to_date = mkDefault "[ ✓ ](bg:overlay fg:iris)";
|
||||||
|
untracked = mkDefault "[?\\($count\\)](bg:overlay fg:gold)";
|
||||||
|
stashed = mkDefault "[\\$](bg:overlay fg:iris)";
|
||||||
|
modified = mkDefault "[!\\($count\\)](bg:overlay fg:gold)";
|
||||||
|
renamed = mkDefault "[»\\($count\\)](bg:overlay fg:iris)";
|
||||||
|
deleted = mkDefault "[✘\\($count\\)](style)";
|
||||||
|
staged = mkDefault "[++\\($count\\)](bg:overlay fg:gold)";
|
||||||
|
ahead = mkDefault "[⇡\\(\${count}\\)](bg:overlay fg:foam)";
|
||||||
|
diverged = mkDefault "⇕[\\[](bg:overlay fg:iris)[⇡\\(\${ahead_count}\\)](bg:overlay fg:foam)[⇣\\(\${behind_count}\\)](bg:overlay fg:rose)[\\]](bg:overlay fg:iris)";
|
||||||
|
behind = mkDefault "[⇣\\(\${count}\\)](bg:overlay fg:rose)";
|
||||||
|
};
|
||||||
|
|
||||||
|
fill = {
|
||||||
|
style = mkDefault "fg:overlay";
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
time = {
|
||||||
|
disabled = mkDefault false;
|
||||||
|
format = mkDefault (mkFormat " $time ");
|
||||||
|
style = mkDefault "bg:overlay fg:rose";
|
||||||
|
time_format = mkDefault "%I:%M%P";
|
||||||
|
use_12hr = mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
character = let
|
||||||
|
vim = "";
|
||||||
|
mkChar = sym: col: " [${sym}](fg:${col}) [](fg:foam)";
|
||||||
|
in {
|
||||||
|
success_symbol = mkChar "" "iris";
|
||||||
|
error_symbol = mkChar "" "love";
|
||||||
|
vimcmd_symbol = mkChar vim "rose";
|
||||||
|
vimcmd_replace_one_symbol = mkChar vim "foam";
|
||||||
|
vimcmd_replace_symbol = mkChar vim "foam";
|
||||||
|
vimcmd_visual_symbol = mkChar vim "iris";
|
||||||
|
};
|
||||||
|
|
||||||
|
### Languages ###
|
||||||
|
c = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
elixir = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
elm = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
haskell = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
java = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
julia = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
nodejs = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
nim = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
python = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
rust = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault "";
|
||||||
|
};
|
||||||
|
|
||||||
|
scala = {
|
||||||
|
style = "bg:overlay fg:pine";
|
||||||
|
format = mkDefault langFormat;
|
||||||
|
disabled = false;
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
### Tools ###
|
||||||
|
conda = {
|
||||||
|
style = mkDefault "bg:overlay fg:pine";
|
||||||
|
format = mkDefault (mkFormat "$symbol$environment");
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault "🅒 ";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix_shell = {
|
||||||
|
style = "bg:overlay fg:foam";
|
||||||
|
format = mkDefault (mkFormat " $symbol $state( \($name\)) ");
|
||||||
|
disabled = mkDefault false;
|
||||||
|
symbol = mkDefault " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,23 +3,20 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
|
||||||
cfg = config.marleyos.programs.tmux;
|
cfg = config.marleyos.programs.tmux;
|
||||||
inherit (config.marleyos.theme) colors;
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.marleyos.programs.tmux.enable = mkEnableOption "tmux";
|
options.marleyos.programs.tmux.enable = mkEnableOption "tmux";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
rose-pine = mkIf (colors.base == "rose-pine") {
|
rose-pine = {
|
||||||
enable = true;
|
extraConfig =
|
||||||
extraConfig = # tmux
|
# tmux
|
||||||
''
|
''
|
||||||
set -g @rose_pine_host 'on'
|
set -g @rose_pine_host 'on'
|
||||||
set -g @rose_pine_directory 'on'
|
set -g @rose_pine_directory 'on'
|
||||||
|
@ -51,7 +48,8 @@ in
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = continuum;
|
plugin = continuum;
|
||||||
extraConfig = # tmux
|
extraConfig =
|
||||||
|
# tmux
|
||||||
''
|
''
|
||||||
set -g @continuum-restore 'on'
|
set -g @continuum-restore 'on'
|
||||||
'';
|
'';
|
||||||
|
@ -59,7 +57,8 @@ in
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = tilish;
|
plugin = tilish;
|
||||||
extraConfig = # tmux
|
extraConfig =
|
||||||
|
# tmux
|
||||||
''
|
''
|
||||||
# Don't enforce the layout.
|
# Don't enforce the layout.
|
||||||
set -g @tilish-enforce 'none'
|
set -g @tilish-enforce 'none'
|
||||||
|
@ -77,7 +76,8 @@ in
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = jump;
|
plugin = jump;
|
||||||
extraConfig = # tmux
|
extraConfig =
|
||||||
|
# tmux
|
||||||
''
|
''
|
||||||
set -g @jump-key 's'
|
set -g @jump-key 's'
|
||||||
'';
|
'';
|
||||||
|
@ -85,7 +85,8 @@ in
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = fingers;
|
plugin = fingers;
|
||||||
extraConfig = # tmux
|
extraConfig =
|
||||||
|
# tmux
|
||||||
''
|
''
|
||||||
set -g @fingers-jump-key 'f'
|
set -g @fingers-jump-key 'f'
|
||||||
'';
|
'';
|
||||||
|
@ -93,7 +94,8 @@ in
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = tmux-floax;
|
plugin = tmux-floax;
|
||||||
extraConfig = # tmux
|
extraConfig =
|
||||||
|
# tmux
|
||||||
''
|
''
|
||||||
set -g @floax-bind 'i'
|
set -g @floax-bind 'i'
|
||||||
set -g @floax-text-color 'white'
|
set -g @floax-text-color 'white'
|
||||||
|
@ -101,7 +103,8 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = # tmux
|
extraConfig =
|
||||||
|
# tmux
|
||||||
''
|
''
|
||||||
# Set repeat timeout so keys can be repeated without the prefix.
|
# Set repeat timeout so keys can be repeated without the prefix.
|
||||||
set -g repeat-time 1000
|
set -g repeat-time 1000
|
||||||
|
|
|
@ -8,10 +8,14 @@
|
||||||
inherit (lib.snowfall.system) is-darwin;
|
inherit (lib.snowfall.system) is-darwin;
|
||||||
|
|
||||||
cfg = config.marleyos.programs.wezterm;
|
cfg = config.marleyos.programs.wezterm;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
|
|
||||||
isGenericLinux = config.targets.genericLinux.enable;
|
isGenericLinux = config.targets.genericLinux.enable;
|
||||||
isNotNixOS = isGenericLinux || (is-darwin system);
|
isNotNixOS = isGenericLinux || (is-darwin system);
|
||||||
|
|
||||||
|
theme =
|
||||||
|
if config.rose-pine.enable
|
||||||
|
then "rose-pine"
|
||||||
|
else "";
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.wezterm.enable = lib.mkEnableOption "wezterm";
|
options.marleyos.programs.wezterm.enable = lib.mkEnableOption "wezterm";
|
||||||
|
|
||||||
|
@ -40,7 +44,7 @@ in {
|
||||||
|
|
||||||
config.enable_tab_bar = false
|
config.enable_tab_bar = false
|
||||||
|
|
||||||
config.color_scheme = "${colors.base}"
|
config.color_scheme = "${theme}"
|
||||||
|
|
||||||
config.font = wezterm.font_with_fallback({
|
config.font = wezterm.font_with_fallback({
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,22 +2,16 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
|
|
||||||
cfg = config.marleyos.programs.zathura;
|
cfg = config.marleyos.programs.zathura;
|
||||||
inherit (config.marleyos.theme) colors;
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.marleyos.programs.zathura.enable = mkEnableOption "zathura";
|
options.marleyos.programs.zathura.enable = mkEnableOption "zathura";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.zathura = {
|
programs.zathura = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
rose-pine = mkIf colors.isRosePine enabled;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
inherit (lib.marleyos) disabled;
|
inherit (lib.marleyos) disabled;
|
||||||
|
|
||||||
cfg = config.marleyos.services.dunst;
|
cfg = config.marleyos.services.dunst;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
|
|
||||||
isRosePine = colors.base == "rose-pine";
|
|
||||||
in {
|
in {
|
||||||
options.marleyos.services.dunst.enable = lib.mkEnableOption "dunst";
|
options.marleyos.services.dunst.enable = lib.mkEnableOption "dunst";
|
||||||
|
|
||||||
|
@ -23,7 +20,7 @@ in {
|
||||||
|
|
||||||
settings = lib.mkMerge [
|
settings = lib.mkMerge [
|
||||||
### Rose Pine ###
|
### Rose Pine ###
|
||||||
(lib.mkIf isRosePine {
|
(lib.mkIf config.rose-pine.enable {
|
||||||
global = {
|
global = {
|
||||||
width = 400;
|
width = 400;
|
||||||
offset = "20x60";
|
offset = "20x60";
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.services.waybar;
|
cfg = config.marleyos.services.waybar;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
in {
|
in {
|
||||||
options.marleyos.services.waybar.enable = lib.mkEnableOption "waybar";
|
options.marleyos.services.waybar.enable = lib.mkEnableOption "waybar";
|
||||||
|
|
||||||
|
@ -13,8 +12,6 @@ in {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
rose-pine.enable = lib.mkIf colors.isRosePine true;
|
|
||||||
|
|
||||||
# https://gitlab.com/Zaney/zaneyos/-/blob/main/config/waybar.nix
|
# https://gitlab.com/Zaney/zaneyos/-/blob/main/config/waybar.nix
|
||||||
settings = [
|
settings = [
|
||||||
{
|
{
|
||||||
|
@ -201,7 +198,7 @@ in {
|
||||||
transition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
transition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||||
in
|
in
|
||||||
lib.concatStrings [
|
lib.concatStrings [
|
||||||
(lib.optionalString colors.isRosePine
|
(lib.optionalString config.rose-pine.enable
|
||||||
#css
|
#css
|
||||||
''
|
''
|
||||||
@define-color darkOne @base;
|
@define-color darkOne @base;
|
||||||
|
|
|
@ -5,10 +5,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.marleyos) enabled;
|
|
||||||
|
|
||||||
cfg = config.marleyos.wayland.hyprland;
|
cfg = config.marleyos.wayland.hyprland;
|
||||||
inherit (config.marleyos.theme) colors;
|
|
||||||
in {
|
in {
|
||||||
options.marleyos.wayland.hyprland = {
|
options.marleyos.wayland.hyprland = {
|
||||||
enable = lib.mkEnableOption "hyprland";
|
enable = lib.mkEnableOption "hyprland";
|
||||||
|
@ -45,9 +42,10 @@ in {
|
||||||
|
|
||||||
home.pointerCursor.hyprcursor.enable = true;
|
home.pointerCursor.hyprcursor.enable = true;
|
||||||
|
|
||||||
home.packages = [
|
home.packages =
|
||||||
inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default
|
lib.optional
|
||||||
];
|
config.rose-pine.enable
|
||||||
|
inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default;
|
||||||
|
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -64,8 +62,6 @@ in {
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
|
|
||||||
rose-pine = lib.mkIf colors.isRosePine enabled;
|
|
||||||
|
|
||||||
settings = let
|
settings = let
|
||||||
numMonitors = lib.length (lib.attrNames (cfg.monitors or {}));
|
numMonitors = lib.length (lib.attrNames (cfg.monitors or {}));
|
||||||
workspaces = lib.range 1 10;
|
workspaces = lib.range 1 10;
|
||||||
|
@ -135,7 +131,7 @@ in {
|
||||||
"XCURSOR_SIZE,24"
|
"XCURSOR_SIZE,24"
|
||||||
"HYPRCURSOR_SIZE,24"
|
"HYPRCURSOR_SIZE,24"
|
||||||
]
|
]
|
||||||
++ (lib.optional colors.isRosePine "HYPRCURSOR_THEME,rose-pine-hyprcursor");
|
++ (lib.optional config.rose-pine.enable "HYPRCURSOR_THEME,rose-pine-hyprcursor");
|
||||||
|
|
||||||
workspace =
|
workspace =
|
||||||
lib.mkIf (cfg ? monitors)
|
lib.mkIf (cfg ? monitors)
|
||||||
|
@ -143,8 +139,8 @@ in {
|
||||||
(ws: "${toString ws}, monitor:${wsMons."${toString ws}"}")
|
(ws: "${toString ws}, monitor:${wsMons."${toString ws}"}")
|
||||||
workspaces);
|
workspaces);
|
||||||
|
|
||||||
"$main" = lib.mkIf colors.isRosePine "$love";
|
"$main" = lib.mkIf config.rose-pine.enable "$love";
|
||||||
"$inactive" = lib.mkIf colors.isRosePine "$muted";
|
"$inactive" = lib.mkIf config.rose-pine.enable "$muted";
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
gaps_in = 5;
|
gaps_in = 5;
|
||||||
|
@ -153,7 +149,7 @@ in {
|
||||||
|
|
||||||
"col.inactive_border" = "$inactive";
|
"col.inactive_border" = "$inactive";
|
||||||
"col.active_border" =
|
"col.active_border" =
|
||||||
lib.mkIf colors.isRosePine "$rose $pine $love $iris 90deg";
|
lib.mkIf config.rose-pine.enable "$rose $pine $love $iris 90deg";
|
||||||
|
|
||||||
resize_on_border = false;
|
resize_on_border = false;
|
||||||
|
|
||||||
|
|
16
modules/nixos/appearance/base/default.nix
Normal file
16
modules/nixos/appearance/base/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.marleyos.appearance.base;
|
||||||
|
in {
|
||||||
|
options.marleyos.appearance.base.enable = lib.mkEnableOption "base";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
rose-pine = {
|
||||||
|
enable = true;
|
||||||
|
flavor = "main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
13
modules/nixos/appearance/console/default.nix
Normal file
13
modules/nixos/appearance/console/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.marleyos.appearance.console;
|
||||||
|
in {
|
||||||
|
options.marleyos.appearance.console.enable = lib.mkEnableOption "console";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
console.rose-pine.enable = lib.mkIf config.rose-pine.enable true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -10,11 +10,14 @@ in {
|
||||||
|
|
||||||
marleyos = {
|
marleyos = {
|
||||||
hasNvidia = true;
|
hasNvidia = true;
|
||||||
|
|
||||||
mounts.babeshare = enabled;
|
mounts.babeshare = enabled;
|
||||||
|
|
||||||
wayland.hyprland = enabled;
|
wayland.hyprland = enabled;
|
||||||
|
|
||||||
|
appearance = {
|
||||||
|
base = enabled;
|
||||||
|
console = enabled;
|
||||||
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
fish = enabled;
|
fish = enabled;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue