More progress
This commit is contained in:
parent
472731c514
commit
dd327a977a
|
@ -255,6 +255,7 @@ in {
|
|||
# # "Noto Color Emoji"
|
||||
# ];
|
||||
# };
|
||||
|
||||
fonts.fontconfig.localConf = ''
|
||||
<alias>
|
||||
<family>Dina</family>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
with lib; {
|
||||
imports = [
|
||||
# Import modules
|
||||
./fontconfig/default.nix
|
||||
./greeter/greetd/default.nix
|
||||
./greeter/greetd/tuigreet.nix
|
||||
./locale/default.nix
|
||||
|
@ -16,8 +17,9 @@ with lib; {
|
|||
|
||||
config.modules = {
|
||||
# Enable default modules
|
||||
fontconfig.enable = mkDefault true;
|
||||
neovim.enable = mkDefault true;
|
||||
tuigreet.enable = mkDefault true;
|
||||
tailscale.enable = mkDefault true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.fontconfig;
|
||||
in {
|
||||
options.modules.fontconfig = {
|
||||
enable = mkEnableOption "fontconfig";
|
||||
};
|
||||
|
||||
config = {
|
||||
fonts.fontconfig.enable = cfg.enable;
|
||||
fonts.enableDefaultPackages = false;
|
||||
fonts.fontconfig.defaultFonts = {
|
||||
serif = mkDefault [];
|
||||
sansSerif = mkDefault [];
|
||||
monospace = mkDefault [];
|
||||
emoji = mkDefault [];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -24,8 +24,7 @@ in {
|
|||
layoutOptions = "-outer-padding ${toString config.theming.layout.windowPadding} -view-padding ${toString config.theming.layout.windowPadding}";
|
||||
modes = ["normal" "locked"];
|
||||
tags = [1 2 3 4 5 6 7 8 9];
|
||||
# TODO: Replace the base02 color with a named color
|
||||
waylockOptions = "-init-color 0x${colors.bg} -input-color 0x${config.theming.schemeColors.base02} -fail-color 0x${colors.bg}";
|
||||
waylockOptions = "-init-color 0x${colors.bg} -input-color 0x${colors.focused} -fail-color 0x${colors.bg}";
|
||||
|
||||
colors = config.theming.colors;
|
||||
|
||||
|
@ -52,7 +51,7 @@ in {
|
|||
border-width = toString config.theming.layout.borderSize;
|
||||
background-color = "0x${colors.bg}";
|
||||
border-color-focused = "0x${colors.fg}";
|
||||
border-color-unfocused = "0x${config.theming.schemeColors.base01}"; # TODO: Change to use named color;
|
||||
border-color-unfocused = "0x${colors.unfocused}"; # TODO: Change to use named color;
|
||||
border-color-urgent = "0x${colors.fg}";
|
||||
|
||||
spawn = [
|
||||
|
|
|
@ -73,7 +73,7 @@ let
|
|||
}) enabledFonts));
|
||||
|
||||
# Convert set of fonts to list of packages
|
||||
fontPackageList = map (font: cfg.fonts.pkgs.${font.name}.package) (attrsToList (traceVal fontPackages));
|
||||
fontPackageList = map (font: cfg.fonts.pkgs.${font.name}.package) (attrsToList fontPackages);
|
||||
in {
|
||||
imports = [
|
||||
# Import all themes
|
||||
|
@ -118,6 +118,18 @@ in {
|
|||
type = types.str;
|
||||
default = colors.base05;
|
||||
};
|
||||
focused = mkOption {
|
||||
type = types.str;
|
||||
default = cfg.colors.fg;
|
||||
};
|
||||
unfocused = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base02;
|
||||
};
|
||||
alert = mkOption {
|
||||
type = types.str;
|
||||
default = "ffffff"; # TODO: Derive color from theme
|
||||
};
|
||||
};
|
||||
|
||||
layout = {
|
||||
|
@ -191,6 +203,10 @@ in {
|
|||
enable = true;
|
||||
autoEnable = false;
|
||||
|
||||
targets = {
|
||||
vscode.enable = config.modules.vscode.enable;
|
||||
};
|
||||
|
||||
base16Scheme = cfg.colorScheme;
|
||||
polarity = if cfg.darkMode then "dark" else "light";
|
||||
|
||||
|
@ -199,6 +215,13 @@ in {
|
|||
sansSerif = getAttrs [ "name" "package" ] cfg.fonts.sansSerif;
|
||||
monospace = getAttrs [ "name" "package" ] cfg.fonts.monospace;
|
||||
emoji = getAttrs [ "name" "package" ] cfg.fonts.emoji;
|
||||
|
||||
sizes = {
|
||||
applications = mkDefault cfg.fonts.serif.recommendedSize;
|
||||
desktop = mkDefault cfg.fonts.monospace.recommendedSize; # TODO: See below
|
||||
popups = mkDefault cfg.fonts.monospace.recommendedSize; # TODO: Add dedicated UI font
|
||||
terminal = mkDefault cfg.fonts.monospace.recommendedSize;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,15 +1,48 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.vscode;
|
||||
theme = config.theming;
|
||||
in {
|
||||
options.modules.vscode.enable = lib.mkEnableOption "vscode";
|
||||
options.modules.vscode = {
|
||||
enable = mkEnableOption "vscode";
|
||||
codeFont = mkOption {
|
||||
type = types.anything;
|
||||
default = theme.fonts.pkgs."Fira Code";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
config = mkIf cfg.enable {
|
||||
modules.unfree.allowedPackages = [ "vscode" ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
vscode
|
||||
theming.fonts.extraFonts = [
|
||||
cfg.codeFont
|
||||
];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
eamodio.gitlens
|
||||
|
||||
# Language support
|
||||
# TODO: Move to separate language modules
|
||||
bbenoist.nix
|
||||
rust-lang.rust-analyzer
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
# Font setup
|
||||
"editor.fontFamily" = mkForce cfg.codeFont.name;
|
||||
"editor.fontSize" = cfg.codeFont.recommendedSize;
|
||||
"editor.fontLigatures" = true;
|
||||
"terminal.integrated.fontFamily" = mkForce cfg.codeFont.name;
|
||||
"terminal.integrated.fontSize" = cfg.codeFont.recommendedSize;
|
||||
|
||||
# Autoformatting
|
||||
"editor.formatOnSave" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -31,6 +31,7 @@ in {
|
|||
wtype
|
||||
# waylock
|
||||
playerctl
|
||||
nix-tree
|
||||
|
||||
# Fish plugin dependencies
|
||||
# grc
|
||||
|
@ -288,10 +289,10 @@ in {
|
|||
enable = true;
|
||||
|
||||
# Dark mode
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
#theme = {
|
||||
# name = "Adwaita-dark";
|
||||
# package = pkgs.gnome-themes-extra;
|
||||
#};
|
||||
|
||||
# Disable CSD
|
||||
gtk3.extraCss = css;
|
||||
|
|
Loading…
Reference in New Issue