This commit is contained in:
dusk 2022-09-12 03:32:23 +03:00
parent 221a4d4183
commit b3d9c44846
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
11 changed files with 79 additions and 29 deletions

View File

@ -1,11 +1,14 @@
{pkgs, lib, ...}:
let
l = lib // builtins;
mkRule = name: type: l.toJSON {
inherit name type;
};
in
{
pkgs,
lib,
...
}: let
l = lib // builtins;
mkRule = name: type:
l.toJSON {
inherit name type;
};
in {
services.ananicy = {
enable = true;
package = pkgs.ananicy-cpp;
@ -36,6 +39,7 @@ in
(mkRule "swayidle" "BG_CPUIO")
# term
(mkRule "wezterm-gui" "Doc-View")
(mkRule "foot" "Doc-View")
# other
(mkRule "syncthing" "BG_CPUIO")
];

View File

@ -7,6 +7,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [
"${inputs.self}/users/modules/settings"
{
home = {
inherit (config.environment) shellAliases sessionVariables;

View File

@ -0,0 +1,33 @@
{config, ...}: {
settings.terminal.name = "foot";
programs.foot = {
enable = true;
server.enable = false;
settings = {
main = {
font = "${config.settings.font.name}:size=${toString config.settings.font.size}";
dpi-aware = "yes";
};
colors = {
foreground = "cdd6f4"; # Text
background = "1e1e2e"; # Base
regular0 = "45475a"; # Surface 1
regular1 = "f38ba8"; # red
regular2 = "a6e3a1"; # green
regular3 = "f9e2af"; # yellow
regular4 = "89b4fa"; # blue
regular5 = "f5c2e7"; # pink
regular6 = "94e2d5"; # teal
regular7 = "bac2de"; # Subtext 1
bright0 = "585b70"; # Surface 2
bright1 = "f38ba8"; # red
bright2 = "a6e3a1"; # green
bright3 = "f9e2af"; # yellow
bright4 = "89b4fa"; # blue
bright5 = "f5c2e7"; # pink
bright6 = "94e2d5"; # teal
bright7 = "a6adc8"; # Subtext 0
};
};
};
}

View File

@ -1,4 +1,5 @@
{
config,
pkgs,
inputs,
...
@ -25,7 +26,7 @@
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
extraConfig = let
launcher = "rofi -show drun";
term = "wezterm";
term = config.settings.terminal.name;
notify-date = with pkgs;
writers.writeBash "notify-date" ''

View File

@ -6,7 +6,7 @@
programs.mako = {
enable = true;
anchor = "top-center";
font = "${config.fonts.settings.name} ${toString config.fonts.settings.size}";
font = "${config.settings.font.name} ${toString config.settings.font.size}";
borderRadius = 16;
extraConfig = builtins.readFile (
builtins.fetchurl {

View File

@ -16,7 +16,7 @@
configuration{
modi: "drun";
lines: 5;
font: "${config.fonts.settings.name} ${toString config.fonts.settings.size}";
font: "${config.settings.font.name} ${toString config.settings.font.size}";
show-icons: true;
terminal: "st";
drun-display-format: "{icon} {name}";

View File

@ -1,12 +1,23 @@
{
lib,
config,
lib,
...
}: let
cfg = config.fonts.settings;
in
with lib; {
options.fonts.settings = {
cfg = config.settings;
inherit
(lib)
types
mkOption
mkIf
;
in {
options = {
settings.terminal = {
name = mkOption {
type = types.str;
};
};
settings.font = {
enable = mkOption {
type = types.bool;
default = false;
@ -21,8 +32,9 @@ in
type = types.ints.unsigned;
};
};
};
config = mkIf cfg.enable {
home.packages = [cfg.package];
};
}
config = mkIf cfg.font.enable {
home.packages = [cfg.font.package];
};
}

View File

@ -12,6 +12,6 @@
effect-scale = "0.5";
effect-greyscale = true;
effect-blur = "20x3";
font = config.fonts.settings.name;
font = config.settings.font.name;
};
}

View File

@ -3,6 +3,7 @@
config,
...
}: {
settings.terminal.name = "wezterm";
home.packages = [pkgs.wezterm];
xdg.enable = true;
xdg.configFile = {
@ -16,8 +17,8 @@
}
return {
font = wezterm.font("${config.fonts.settings.name}"),
font_size = ${builtins.toJSON config.fonts.settings.size},
font = wezterm.font("${config.settings.font.name}"),
font_size = ${builtins.toJSON config.settings.font.size},
default_cursor_style = "BlinkingBar",
enable_wayland = true,
enable_tab_bar = false,

View File

@ -1,8 +1,6 @@
{inputs, ...}:
let
{inputs, ...}: let
geo = import "${inputs.self}/locale/geo.nix";
in
{
in {
services.wlsunset = {
enable = true;
latitude = geo.lat;

View File

@ -96,7 +96,7 @@ in {
imports = let
modulesToEnable = l.flatten [
# desktop stuff
["firefox" "hyprland" "wezterm" "font" "rofi" "mako" "discord"]
["firefox" "hyprland" "foot" "rofi" "mako" "discord"]
# cli stuff
["zoxide" "zsh" "fzf" "starship" "direnv"]
# dev stuff
@ -147,7 +147,7 @@ in {
};
fonts.fontconfig.enable = l.mkForce true;
fonts.settings = {
settings.font = {
enable = true;
name = "Comic Mono";
size = 13;