From 16de891fc7a7e416f8962fcddd53f0bf3323a7bd Mon Sep 17 00:00:00 2001 From: Jan Bulthuis Date: Fri, 19 Jul 2024 14:00:55 +0200 Subject: [PATCH] Applied formatting --- default.nix | 14 +- machines/laptop.nix | 2 +- modules/base/default.nix | 14 +- modules/boot/clean-tmp.nix | 16 +- modules/boot/silent-boot.nix | 14 +- modules/boot/systemd-boot.nix | 12 +- modules/brightnessctl/default.nix | 18 +- modules/default.nix | 10 +- modules/fontconfig/default.nix | 18 +- modules/graphics/default.nix | 11 +- modules/greeter/greetd/default.nix | 12 +- modules/greeter/greetd/tuigreet.nix | 18 +- modules/locale/default.nix | 9 +- modules/neovim/default.nix | 12 +- modules/sound/pipewire.nix | 12 +- modules/unfree/default.nix | 16 +- modules/users/default.nix | 30 +- modules/users/modules/default.nix | 9 +- modules/users/modules/desktop/bar/waybar.nix | 36 +- modules/users/modules/desktop/default.nix | 29 +- .../modules/desktop/lock-screen/waylock.nix | 16 +- .../modules/desktop/window-manager/river.nix | 300 +++++++++------- modules/users/modules/discord/default.nix | 16 +- modules/users/modules/feishin/default.nix | 18 +- modules/users/modules/firefox/default.nix | 22 +- modules/users/modules/fontconfig/default.nix | 36 +- modules/users/modules/foot/default.nix | 32 +- modules/users/modules/language/nix.nix | 16 +- modules/users/modules/language/rust.nix | 27 +- modules/users/modules/mako/default.nix | 12 +- modules/users/modules/neovim/default.nix | 15 +- modules/users/modules/obsidian/default.nix | 18 +- modules/users/modules/qutebrowser/default.nix | 12 +- modules/users/modules/rofi/default.nix | 82 +++-- modules/users/modules/rofi/rofi-rbw.nix | 16 +- modules/users/modules/shell/bash.nix | 14 +- modules/users/modules/shell/fish.nix | 29 +- modules/users/modules/steam/default.nix | 12 +- modules/users/modules/systemwide/default.nix | 2 +- modules/users/modules/systemwide/river.nix | 16 +- modules/users/modules/systemwide/steam.nix | 16 +- modules/users/modules/systemwide/waylock.nix | 16 +- modules/users/modules/theming/default.nix | 333 ++++++++++-------- .../modules/theming/fonts/cozette-vector.nix | 5 +- .../users/modules/theming/fonts/cozette.nix | 6 +- .../modules/theming/fonts/dejavu-sans.nix | 4 +- .../modules/theming/fonts/dejavu-serif.nix | 4 +- modules/users/modules/theming/fonts/dina.nix | 2 +- .../users/modules/theming/fonts/fira-code.nix | 6 +- .../theming/fonts/nerd-fonts-symbols.nix | 4 +- .../theming/fonts/noto-color-emoji.nix | 4 +- .../modules/theming/fonts/wqy-bitmapsong.nix | 4 +- .../theming/fonts/wqy-microhei-mono.nix | 4 +- .../modules/theming/fonts/wqy-microhei.nix | 4 +- .../modules/theming/fonts/wqy-zenhei-mono.nix | 4 +- .../theming/fonts/wqy-zenhei-sharp.nix | 4 +- .../modules/theming/fonts/wqy-zenhei.nix | 4 +- .../modules/theming/themes/catppuccin.nix | 17 +- .../users/modules/theming/themes/gruvbox.nix | 16 +- modules/users/modules/vscode/default.nix | 26 +- modules/users/modules/winbox/default.nix | 16 +- modules/users/modules/zathura/default.nix | 12 +- modules/vpn/tailscale.nix | 12 +- modules/wifi/wpa_supplicant.nix | 12 +- pkgs/default.nix | 15 +- pkgs/fonts/wqy-bitmapsong.nix | 9 +- pkgs/fonts/wqy-microhei.nix | 11 +- pkgs/fonts/wqy-zenhei.nix | 9 +- users/jan.nix | 30 +- 69 files changed, 997 insertions(+), 635 deletions(-) diff --git a/default.nix b/default.nix index c0d5694..c9094a6 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,11 @@ { ... }: { - imports = [ - # Import modules - ./modules/default.nix + imports = [ + # Import modules + ./modules/default.nix - # Import custom packages - ./pkgs/default.nix - ]; -} \ No newline at end of file + # Import custom packages + ./pkgs/default.nix + ]; +} diff --git a/machines/laptop.nix b/machines/laptop.nix index ed6c056..5819357 100644 --- a/machines/laptop.nix +++ b/machines/laptop.nix @@ -26,4 +26,4 @@ configuration = ../users/jan.nix; }; }; -} \ No newline at end of file +} diff --git a/modules/base/default.nix b/modules/base/default.nix index 65940f9..1e1bc31 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.base; -in { +in +{ options.modules.base = { enable = mkEnableOption "base"; }; @@ -32,7 +38,7 @@ in { programs.dconf.enable = true; xdg.portal = { enable = true; - + extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr @@ -45,4 +51,4 @@ in { "nvidia-settings" ]; }; -} \ No newline at end of file +} diff --git a/modules/boot/clean-tmp.nix b/modules/boot/clean-tmp.nix index cbf0fc6..ac63245 100644 --- a/modules/boot/clean-tmp.nix +++ b/modules/boot/clean-tmp.nix @@ -1,14 +1,18 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.clean-tmp; -in { +in +{ options.modules.clean-tmp = { enable = mkEnableOption "clean-tmp"; }; - config = mkIf cfg.enable { - boot.tmp.cleanOnBoot = true; - }; -} \ No newline at end of file + config = mkIf cfg.enable { boot.tmp.cleanOnBoot = true; }; +} diff --git a/modules/boot/silent-boot.nix b/modules/boot/silent-boot.nix index 0c948e9..f57f385 100644 --- a/modules/boot/silent-boot.nix +++ b/modules/boot/silent-boot.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.silent-boot; -in { +in +{ options.modules.silent-boot = { enable = mkEnableOption "silent-boot"; }; @@ -11,7 +17,7 @@ in { config = mkIf cfg.enable { boot = { loader.timeout = 0; - + consoleLogLevel = 0; initrd.verbose = false; initrd.checkJournalingFS = false; @@ -28,4 +34,4 @@ in { ]; }; }; -} \ No newline at end of file +} diff --git a/modules/boot/systemd-boot.nix b/modules/boot/systemd-boot.nix index 556803a..9f17007 100644 --- a/modules/boot/systemd-boot.nix +++ b/modules/boot/systemd-boot.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.systemd-boot; -in { +in +{ options.modules.systemd-boot = { enable = mkEnableOption "systemd-boot"; }; @@ -15,4 +21,4 @@ in { efi.canTouchEfiVariables = true; }; }; -} \ No newline at end of file +} diff --git a/modules/brightnessctl/default.nix b/modules/brightnessctl/default.nix index 9b0a210..53c9da2 100644 --- a/modules/brightnessctl/default.nix +++ b/modules/brightnessctl/default.nix @@ -1,16 +1,18 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.brightnessctl; -in { +in +{ options.modules.brightnessctl = { enable = mkEnableOption "brightnessctl"; }; - config = mkIf cfg.enable { - environment.systemPackages = [ - pkgs.brightnessctl - ]; - }; -} \ No newline at end of file + config = mkIf cfg.enable { environment.systemPackages = [ pkgs.brightnessctl ]; }; +} diff --git a/modules/default.nix b/modules/default.nix index 1a5c0d9..379f215 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,6 +1,12 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: -with lib; { +with lib; +{ imports = [ # Import modules ./base/default.nix diff --git a/modules/fontconfig/default.nix b/modules/fontconfig/default.nix index ffe5275..3fc9863 100644 --- a/modules/fontconfig/default.nix +++ b/modules/fontconfig/default.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.fontconfig; -in { +in +{ options.modules.fontconfig = { enable = mkEnableOption "fontconfig"; }; @@ -12,10 +18,10 @@ in { fonts.fontconfig.enable = cfg.enable; fonts.enableDefaultPackages = false; fonts.fontconfig.defaultFonts = { - serif = mkDefault []; - sansSerif = mkDefault []; - monospace = mkDefault []; - emoji = mkDefault []; + serif = mkDefault [ ]; + sansSerif = mkDefault [ ]; + monospace = mkDefault [ ]; + emoji = mkDefault [ ]; }; }; } diff --git a/modules/graphics/default.nix b/modules/graphics/default.nix index 57eac06..4c981d8 100644 --- a/modules/graphics/default.nix +++ b/modules/graphics/default.nix @@ -1,4 +1,9 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: { config = { @@ -6,7 +11,7 @@ # Set up graphics hardware.graphics.enable32Bit = true; hardware.graphics.enable = true; - services.xserver.videoDrivers = ["nvidia"]; + services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { modesetting.enable = true; powerManagement.enable = false; @@ -24,4 +29,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/modules/greeter/greetd/default.nix b/modules/greeter/greetd/default.nix index 36fe4a4..c98ab36 100644 --- a/modules/greeter/greetd/default.nix +++ b/modules/greeter/greetd/default.nix @@ -1,9 +1,15 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.greetd; -in { +in +{ options.modules.greetd = { enable = mkEnableOption "greetd"; command = mkOption { @@ -22,4 +28,4 @@ in { }; }; }; -} \ No newline at end of file +} diff --git a/modules/greeter/greetd/tuigreet.nix b/modules/greeter/greetd/tuigreet.nix index 8aaf913..a0e10e6 100644 --- a/modules/greeter/greetd/tuigreet.nix +++ b/modules/greeter/greetd/tuigreet.nix @@ -1,16 +1,22 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.tuigreet; -in { - options.modules.tuigreet = { - enable = mkEnableOption "tuigreet"; +in +{ + options.modules.tuigreet = { + enable = mkEnableOption "tuigreet"; greeting = mkOption { type = types.str; default = "Hewwo! >_< :3"; description = "Greeting message to show."; - }; + }; command = mkOption { type = types.str; default = "~/.initrc"; @@ -28,4 +34,4 @@ in { # Enable silent boot to prevent late log messages from messing up tuigreet modules.silent-boot.enable = true; }; -} \ No newline at end of file +} diff --git a/modules/locale/default.nix b/modules/locale/default.nix index 621f383..29895a1 100644 --- a/modules/locale/default.nix +++ b/modules/locale/default.nix @@ -1,4 +1,9 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: { config = { @@ -6,4 +11,4 @@ i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "us"; }; -} \ No newline at end of file +} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 7046e42..ab507f6 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.neovim; -in { +in +{ options.modules.neovim = { enable = mkEnableOption "neovim"; }; @@ -14,4 +20,4 @@ in { defaultEditor = true; }; }; -} \ No newline at end of file +} diff --git a/modules/sound/pipewire.nix b/modules/sound/pipewire.nix index 202d881..8ec4f68 100644 --- a/modules/sound/pipewire.nix +++ b/modules/sound/pipewire.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.pipewire; -in { +in +{ options.modules.pipewire = { enable = mkEnableOption "pipewire"; }; @@ -15,4 +21,4 @@ in { pulse.enable = true; }; }; -} \ No newline at end of file +} diff --git a/modules/unfree/default.nix b/modules/unfree/default.nix index ba3e5cc..eaae9ee 100644 --- a/modules/unfree/default.nix +++ b/modules/unfree/default.nix @@ -1,18 +1,24 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; -let +let cfg = config.modules.unfree; -in { +in +{ options.modules.unfree = { enable = mkEnableOption "unfree"; allowedPackages = mkOption { type = types.listOf types.str; - default = []; + default = [ ]; }; }; config = mkIf cfg.enable { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (getName pkg) cfg.allowedPackages; }; -} \ No newline at end of file +} diff --git a/modules/users/default.nix b/modules/users/default.nix index a2c17ff..005f682 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -1,19 +1,24 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let # Nixvim - nixvim = import (builtins.fetchGit { - url = "https://github.com/nix-community/nixvim"; - }); + nixvim = import (builtins.fetchGit { url = "https://github.com/nix-community/nixvim"; }); # Stylix - stylix = import (pkgs.fetchFromGitHub { - owner = "danth"; - repo = "stylix"; - rev = "1ff9d37d27377bfe8994c24a8d6c6c1734ffa116"; - sha256 = "0dz8h1ga8lnfvvmvsf6iqvnbvxrvx3qxi0y8s8b72066mqgvy8y5"; - }); + stylix = import ( + pkgs.fetchFromGitHub { + owner = "danth"; + repo = "stylix"; + rev = "1ff9d37d27377bfe8994c24a8d6c6c1734ffa116"; + sha256 = "0dz8h1ga8lnfvvmvsf6iqvnbvxrvx3qxi0y8s8b72066mqgvy8y5"; + } + ); # User configuration userModule = types.submodule { @@ -36,7 +41,8 @@ let }; }; }; -in { +in +{ imports = [ # Import home manager @@ -48,7 +54,7 @@ in { options = { machine.users = mkOption { type = types.attrsOf userModule; - default = {}; + default = { }; description = "Users configured on this system."; }; }; diff --git a/modules/users/modules/default.nix b/modules/users/modules/default.nix index 450a20b..b53f9e0 100644 --- a/modules/users/modules/default.nix +++ b/modules/users/modules/default.nix @@ -1,6 +1,11 @@ -{ input, pkgs, config, ... }: +{ + input, + pkgs, + config, + ... +}: -{ +{ imports = [ # Import all modules ./desktop/default.nix diff --git a/modules/users/modules/desktop/bar/waybar.nix b/modules/users/modules/desktop/bar/waybar.nix index d200757..b1c2f99 100644 --- a/modules/users/modules/desktop/bar/waybar.nix +++ b/modules/users/modules/desktop/bar/waybar.nix @@ -1,11 +1,17 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.waybar; theme = config.theming; colors = theme.colors; -in { +in +{ options.modules.waybar = { enable = mkEnableOption "waybar"; }; @@ -22,9 +28,7 @@ in { mainBar = { layer = "top"; spacing = 16; - modules-left = [ - "river/tags" - ]; + modules-left = [ "river/tags" ]; modules-center = [ #"river/window" "mpris" @@ -61,14 +65,30 @@ in { #default = [ "" "" ]; headphone = ""; headphone-muted = ""; - default = [ "" "" "" ]; + default = [ + "" + "" + "" + ]; }; }; battery = { format = "{icon} {capacity}%"; # Spacing achieved using "Thin Space" format-charging = " {capacity}%"; # Spacing achieved using "Thin Space" #format-icons = [ "󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; - format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ]; + format-icons = [ + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + ]; interval = 1; }; clock = { @@ -117,4 +137,4 @@ in { ''; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/desktop/default.nix b/modules/users/modules/desktop/default.nix index 033f6f1..8e8fcef 100644 --- a/modules/users/modules/desktop/default.nix +++ b/modules/users/modules/desktop/default.nix @@ -1,9 +1,15 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: with lib; let cfg = config.modules.desktop; -in { +in +{ imports = [ # Import desktop environment modules ./bar/waybar.nix @@ -21,18 +27,23 @@ in { }; config = { - home.packages = optionals cfg.wayland (with pkgs; [ - pkgs.wl-clipboard - pkgs.wtype - ]); + home.packages = optionals cfg.wayland ( + with pkgs; + [ + pkgs.wl-clipboard + pkgs.wtype + ] + ); home.file.".initrc" = { enable = true; executable = true; - text = '' - #!${pkgs.bash}/bin/bash + text = + '' + #!${pkgs.bash}/bin/bash - '' + cfg.initScript; + '' + + cfg.initScript; }; }; } diff --git a/modules/users/modules/desktop/lock-screen/waylock.nix b/modules/users/modules/desktop/lock-screen/waylock.nix index 3539fb7..eb3ff42 100644 --- a/modules/users/modules/desktop/lock-screen/waylock.nix +++ b/modules/users/modules/desktop/lock-screen/waylock.nix @@ -1,16 +1,20 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: with lib; let cfg = config.modules.waylock; -in { +in +{ options.modules.waylock = { enable = mkEnableOption "waylock"; }; config = { - home.packages = mkIf cfg.enable (with pkgs; [ - waylock - ]); + home.packages = mkIf cfg.enable (with pkgs; [ waylock ]); }; -} \ No newline at end of file +} diff --git a/modules/users/modules/desktop/window-manager/river.nix b/modules/users/modules/desktop/window-manager/river.nix index f59f101..bec6d31 100644 --- a/modules/users/modules/desktop/window-manager/river.nix +++ b/modules/users/modules/desktop/window-manager/river.nix @@ -1,8 +1,14 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.river; -in { +in +{ options.modules.river.enable = lib.mkEnableOption "river"; # osConfig = lib.mkIf cfg.enable { @@ -12,7 +18,7 @@ in { config = lib.mkIf cfg.enable { # Set desktop type to wayland modules.desktop.wayland = true; - + # TODO: Move elsewhere and make keybindings more configurable modules.rofi.enable = true; @@ -40,152 +46,190 @@ in { enable = true; systemd.enable = false; xwayland.enable = true; - settings = let - layout = "rivertile"; - 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]; - waylockOptions = "-init-color 0x${colors.bg} -input-color 0x${colors.focused} -fail-color 0x${colors.bg}"; + settings = + let + layout = "rivertile"; + 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 + ]; + waylockOptions = "-init-color 0x${colors.bg} -input-color 0x${colors.focused} -fail-color 0x${colors.bg}"; - colors = config.theming.colors; + colors = config.theming.colors; - # Quick pow function - pow2 = power: - if power != 0 - then 2 * (pow2 (power - 1)) - else 1; + # Quick pow function + pow2 = power: if power != 0 then 2 * (pow2 (power - 1)) else 1; - # Modifiers - main = "Super"; - ssm = "Super+Shift"; - sas = "Super+Alt+Shift"; - sam = "Super+Alt"; - scm = "Super+Control"; - scam = "Super+Control+Alt"; - ssc = "Super+Shift+Control"; - in { - default-layout = "${layout}"; - set-repeat = "50 300"; - xcursor-theme = "BreezeX-RosePine-Linux 24"; - keyboard-layout = "-options \"caps:escape\" us"; + # Modifiers + main = "Super"; + ssm = "Super+Shift"; + sas = "Super+Alt+Shift"; + sam = "Super+Alt"; + scm = "Super+Control"; + scam = "Super+Control+Alt"; + ssc = "Super+Shift+Control"; + in + { + default-layout = "${layout}"; + set-repeat = "50 300"; + xcursor-theme = "BreezeX-RosePine-Linux 24"; + keyboard-layout = "-options \"caps:escape\" us"; - border-width = toString config.theming.layout.borderSize; - background-color = "0x${colors.bg}"; - border-color-focused = "0x${colors.fg}"; - border-color-unfocused = "0x${colors.unfocused}"; # TODO: Change to use named color; - border-color-urgent = "0x${colors.fg}"; + border-width = toString config.theming.layout.borderSize; + background-color = "0x${colors.bg}"; + border-color-focused = "0x${colors.fg}"; + border-color-unfocused = "0x${colors.unfocused}"; # TODO: Change to use named color; + border-color-urgent = "0x${colors.fg}"; - spawn = [ - "\"${layout} ${layoutOptions}\"" - "waybar" - ]; - map = (lib.attrsets.recursiveUpdate ({ - normal = { - "${main} Q" = "close"; - "${ssm} E" = "exit"; + spawn = [ + "\"${layout} ${layoutOptions}\"" + "waybar" + ]; + map = ( + lib.attrsets.recursiveUpdate + ({ + normal = + { + "${main} Q" = "close"; + "${ssm} E" = "exit"; - # Basic utilities - "${main} X " = "spawn \"waylock -fork-on-lock ${waylockOptions}\""; - "${ssm} Return" = "spawn foot"; - "${main} P" = "spawn \"rofi -show drun\""; - "${ssm} P" = "spawn rofi-rbw"; + # Basic utilities + "${main} X " = "spawn \"waylock -fork-on-lock ${waylockOptions}\""; + "${ssm} Return" = "spawn foot"; + "${main} P" = "spawn \"rofi -show drun\""; + "${ssm} P" = "spawn rofi-rbw"; - # Window focus - "${main} J" = "focus-view next"; - "${main} K" = "focus-view previous"; + # Window focus + "${main} J" = "focus-view next"; + "${main} K" = "focus-view previous"; - # Swap windows - "${ssm} J" = "swap next"; - "${ssm} K" = "swap previous"; - "${main} Return" = "zoom"; + # Swap windows + "${ssm} J" = "swap next"; + "${ssm} K" = "swap previous"; + "${main} Return" = "zoom"; - # Main ratio - "${main} H" = "send-layout-cmd rivertile 'main-ratio -0.05'"; - "${main} L" = "send-layout-cmd rivertile 'main-ratio +0.05'"; + # Main ratio + "${main} H" = "send-layout-cmd rivertile 'main-ratio -0.05'"; + "${main} L" = "send-layout-cmd rivertile 'main-ratio +0.05'"; - # Main count - "${ssm} H" = "send-layout-cmd rivertile 'main-count +1'"; - "${ssm} L" = "send-layout-cmd rivertile 'main-count -1'"; + # Main count + "${ssm} H" = "send-layout-cmd rivertile 'main-count +1'"; + "${ssm} L" = "send-layout-cmd rivertile 'main-count -1'"; - # Tags - "${main} 0" = "set-focused-tags ${toString (pow2 32 - 1)}"; - "${ssm} 0" = "set-view-tags ${toString (pow2 32 - 1)}"; + # Tags + "${main} 0" = "set-focused-tags ${toString (pow2 32 - 1)}"; + "${ssm} 0" = "set-view-tags ${toString (pow2 32 - 1)}"; - # Orientation - "${main} Up" = "send-layout-cmd rivertile \"main-location top\""; - "${main} Right" = "send-layout-cmd rivertile \"main-location right\""; - "${main} Down" = "send-layout-cmd rivertile \"main-location bottom\""; - "${main} Left" = "send-layout-cmd rivertile \"main-location left\""; + # Orientation + "${main} Up" = "send-layout-cmd rivertile \"main-location top\""; + "${main} Right" = "send-layout-cmd rivertile \"main-location right\""; + "${main} Down" = "send-layout-cmd rivertile \"main-location bottom\""; + "${main} Left" = "send-layout-cmd rivertile \"main-location left\""; - # Move floating windows - "${sam} H" = "move left 100"; - "${sam} J" = "move down 100"; - "${sam} K" = "move up 100"; - "${sam} L" = "move right 100"; + # Move floating windows + "${sam} H" = "move left 100"; + "${sam} J" = "move down 100"; + "${sam} K" = "move up 100"; + "${sam} L" = "move right 100"; - # Snap floating windows - "${scam} H" = "snap left"; - "${scam} J" = "snap down"; - "${scam} K" = "snap up"; - "${scam} L" = "snap right"; + # Snap floating windows + "${scam} H" = "snap left"; + "${scam} J" = "snap down"; + "${scam} K" = "snap up"; + "${scam} L" = "snap right"; - # Resize floating windows - "${sas} H" = "resize horizontal -100"; - "${sas} J" = "resize vertical 100"; - "${sas} K" = "resize vertical -100"; - "${sas} L" = "resize horizontal 100"; + # Resize floating windows + "${sas} H" = "resize horizontal -100"; + "${sas} J" = "resize vertical 100"; + "${sas} K" = "resize vertical -100"; + "${sas} L" = "resize horizontal 100"; - # Toggle modes - "${main} Space" = "toggle-float"; - "${main} F" = "toggle-fullscreen"; - } // builtins.listToAttrs (builtins.concatLists (map (tag: [ - { name = "${main} ${toString tag}"; value = "set-focused-tags ${toString (pow2 (tag - 1))}"; } - { name = "${ssm} ${toString tag}"; value = "set-view-tags ${toString (pow2 (tag - 1))}"; } - { name = "${scm} ${toString tag}"; value = "toggle-focused-tags ${toString (pow2 (tag - 1))}"; } - { name = "${ssc} ${toString tag}"; value = "toggle-view-tags ${toString (pow2 (tag - 1))}"; } - ]) tags)); - }) (builtins.listToAttrs (map (mode: { - name = "${mode}"; - value = { - # Control volume - "None XF86AudioRaiseVolume" = "spawn \"pulsemixer --change-volume +5\""; - "None XF86AudioLowerVolume" = "spawn \"pulsemixer --change-volume -5\""; - "None XF86AudioMute" = "spawn \"pulsemixer --toggle-mute\""; + # Toggle modes + "${main} Space" = "toggle-float"; + "${main} F" = "toggle-fullscreen"; + } + // builtins.listToAttrs ( + builtins.concatLists ( + map (tag: [ + { + name = "${main} ${toString tag}"; + value = "set-focused-tags ${toString (pow2 (tag - 1))}"; + } + { + name = "${ssm} ${toString tag}"; + value = "set-view-tags ${toString (pow2 (tag - 1))}"; + } + { + name = "${scm} ${toString tag}"; + value = "toggle-focused-tags ${toString (pow2 (tag - 1))}"; + } + { + name = "${ssc} ${toString tag}"; + value = "toggle-view-tags ${toString (pow2 (tag - 1))}"; + } + ]) tags + ) + ); + }) + ( + builtins.listToAttrs ( + map (mode: { + name = "${mode}"; + value = { + # Control volume + "None XF86AudioRaiseVolume" = "spawn \"pulsemixer --change-volume +5\""; + "None XF86AudioLowerVolume" = "spawn \"pulsemixer --change-volume -5\""; + "None XF86AudioMute" = "spawn \"pulsemixer --toggle-mute\""; - # Control brightness - "None XF86MonBrightnessUp" = "spawn \"brightnessctl set +5%\""; - "None XF86MonBrightnessDown" = "spawn \"brightnessctl set 5%-\""; + # Control brightness + "None XF86MonBrightnessUp" = "spawn \"brightnessctl set +5%\""; + "None XF86MonBrightnessDown" = "spawn \"brightnessctl set 5%-\""; - # Control music playback - "None XF86Messenger" = "spawn \"playerctl previous\""; - "None XF86Go" = "spawn \"playerctl play-pause\""; - "None Cancel" = "spawn \"playerctl next\""; + # Control music playback + "None XF86Messenger" = "spawn \"playerctl previous\""; + "None XF86Go" = "spawn \"playerctl play-pause\""; + "None Cancel" = "spawn \"playerctl next\""; + }; + }) modes + ) + ) + ); + map-pointer = { + normal = { + "${main} BTN_LEFT" = "move-view"; + "${main} BTN_RIGHT" = "resize-view"; + "${main} BTN_MIDDLE" = "toggle-float"; + }; }; - }) modes))); - map-pointer = { - normal = { - "${main} BTN_LEFT" = "move-view"; - "${main} BTN_RIGHT" = "resize-view"; - "${main} BTN_MIDDLE" = "toggle-float"; + input = { + "'*'" = { + accel-profile = "adaptive"; + pointer-accel = "0.5"; + scroll-factor = "0.8"; + }; + "'*Synaptics*'" = { + natural-scroll = "enabled"; + }; + }; + rule-add = { + "-app-id" = { + "'bar'" = "csd"; + "'*'" = "ssd"; + }; }; }; - input = { - "'*'" = { - accel-profile = "adaptive"; - pointer-accel = "0.5"; - scroll-factor = "0.8"; - }; - "'*Synaptics*'" = { - natural-scroll = "enabled"; - }; - }; - rule-add = { - "-app-id" = { - "'bar'" = "csd"; - "'*'" = "ssd"; - }; - }; - }; }; }; } diff --git a/modules/users/modules/discord/default.nix b/modules/users/modules/discord/default.nix index bd59ac4..fefabb3 100644 --- a/modules/users/modules/discord/default.nix +++ b/modules/users/modules/discord/default.nix @@ -1,9 +1,15 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.discord; -in { +in +{ options.modules.discord = { enable = mkEnableOption "discord"; }; @@ -11,8 +17,6 @@ in { config = mkIf cfg.enable { modules.unfree.allowedPackages = [ "discord" ]; - home.packages = with pkgs; [ - discord - ]; + home.packages = with pkgs; [ discord ]; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/feishin/default.nix b/modules/users/modules/feishin/default.nix index 4f03ca9..0989c89 100644 --- a/modules/users/modules/feishin/default.nix +++ b/modules/users/modules/feishin/default.nix @@ -1,14 +1,16 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.feishin; -in { +in +{ options.modules.feishin.enable = mkEnableOption "feishin"; - config = mkIf cfg.enable { - home.packages = with pkgs; [ - feishin - ]; - }; -} \ No newline at end of file + config = mkIf cfg.enable { home.packages = with pkgs; [ feishin ]; }; +} diff --git a/modules/users/modules/firefox/default.nix b/modules/users/modules/firefox/default.nix index 8487c61..fe92a52 100644 --- a/modules/users/modules/firefox/default.nix +++ b/modules/users/modules/firefox/default.nix @@ -1,8 +1,14 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.firefox; -in { +in +{ options.modules.firefox.enable = lib.mkEnableOption "firefox"; config = lib.mkIf cfg.enable { @@ -32,19 +38,19 @@ in { DisableTelemetry = true; DisplayBookmarksToolbar = "never"; DisplayMenuBar = "never"; - DNSOverHTTPS = { Enabled = false; }; + DNSOverHTTPS = { + Enabled = false; + }; DontCheckDefaultBrowser = true; PasswordManagerEnabled = false; TranslateEnabled = true; UseSystemPrintDialog = true; }; - + profiles.nixos = { search.default = "DuckDuckGo"; - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - ublock-origin - ]; + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ ublock-origin ]; settings = { "browser.tabs.inTitlebar" = 0; @@ -57,4 +63,4 @@ in { }; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/fontconfig/default.nix b/modules/users/modules/fontconfig/default.nix index b3ef4f0..7b7885d 100644 --- a/modules/users/modules/fontconfig/default.nix +++ b/modules/users/modules/fontconfig/default.nix @@ -1,4 +1,9 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let @@ -15,8 +20,11 @@ let ''; - configContent = concatStrings (map (font: aliasConfig config.theming.fonts.pkgs.${font}) config.theming.fonts.installed); -in { + configContent = concatStrings ( + map (font: aliasConfig config.theming.fonts.pkgs.${font}) config.theming.fonts.installed + ); +in +{ options.modules.fontconfig = { enable = mkEnableOption "fontconfig"; }; @@ -26,18 +34,10 @@ in { enable = true; defaultFonts = { - serif = [ - config.theming.fonts.serif.name - ]; - sansSerif = [ - config.theming.fonts.sansSerif.name - ]; - monospace = [ - config.theming.fonts.monospace.name - ]; - emoji = [ - config.theming.fonts.emoji.name - ]; + serif = [ config.theming.fonts.serif.name ]; + sansSerif = [ config.theming.fonts.sansSerif.name ]; + monospace = [ config.theming.fonts.monospace.name ]; + emoji = [ config.theming.fonts.emoji.name ]; }; }; @@ -48,10 +48,10 @@ in { - + ${configContent} - ''; + ''; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/foot/default.nix b/modules/users/modules/foot/default.nix index c0f73b3..2eae4ff 100644 --- a/modules/users/modules/foot/default.nix +++ b/modules/users/modules/foot/default.nix @@ -1,25 +1,33 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.foot; -in { +in +{ options.modules.foot.enable = mkEnableOption "foot"; config = mkIf cfg.enable { programs.foot = { enable = true; settings = { - main = let - font = config.theming.fonts.monospace.name; - size = toString config.theming.fonts.monospace.recommendedSize; - in { - font = mkForce "${font}:style=Regular:size=${size}"; - font-bold = "${font}:style=Bold:size=${size}"; - font-italic = "${font}:style=Italic:size=${size}"; - font-bold-italic = "${font}:style=Bold Italic:size=${size}"; - }; + main = + let + font = config.theming.fonts.monospace.name; + size = toString config.theming.fonts.monospace.recommendedSize; + in + { + font = mkForce "${font}:style=Regular:size=${size}"; + font-bold = "${font}:style=Bold:size=${size}"; + font-italic = "${font}:style=Italic:size=${size}"; + font-bold-italic = "${font}:style=Bold Italic:size=${size}"; + }; }; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/language/nix.nix b/modules/users/modules/language/nix.nix index 38f157e..af8a19c 100644 --- a/modules/users/modules/language/nix.nix +++ b/modules/users/modules/language/nix.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.nix; -in { +in +{ options.modules.nix = { enable = mkEnableOption "nix"; }; @@ -18,9 +24,7 @@ in { # VSCode configuration programs.vscode = { - extensions = with pkgs.vscode-extensions; [ - jnoortheen.nix-ide - ]; + extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ]; userSettings = { "[nix]" = { @@ -43,4 +47,4 @@ in { }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/language/rust.nix b/modules/users/modules/language/rust.nix index 88c7b5e..245f5af 100644 --- a/modules/users/modules/language/rust.nix +++ b/modules/users/modules/language/rust.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.rust; -in { +in +{ options.modules.rust = { enable = mkEnableOption "rust"; }; @@ -11,21 +17,18 @@ in { config = mkIf cfg.enable { # Development packages home.packages = with pkgs; [ - rustc - cargo - rust-analyzer - rustfmt + rustc + cargo + rust-analyzer + rustfmt ]; # VSCode configuration programs.vscode = { - extensions = with pkgs.vscode-extensions; [ - rust-lang.rust-analyzer - ]; + extensions = with pkgs.vscode-extensions; [ rust-lang.rust-analyzer ]; userSettings = { - "[rust]" = { - }; + "[rust]" = { }; }; }; @@ -36,4 +39,4 @@ in { }; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/mako/default.nix b/modules/users/modules/mako/default.nix index 58f5452..2c0f667 100644 --- a/modules/users/modules/mako/default.nix +++ b/modules/users/modules/mako/default.nix @@ -1,11 +1,17 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.mako; theme = config.theming; colors = theme.colors; -in { +in +{ options.modules.mako.enable = mkEnableOption "mako"; config = mkIf cfg.enable { @@ -22,4 +28,4 @@ in { font = "${theme.fonts.monospace.name} ${toString theme.fonts.monospace.recommendedSize}"; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/neovim/default.nix b/modules/users/modules/neovim/default.nix index 5adaf0a..dff8834 100644 --- a/modules/users/modules/neovim/default.nix +++ b/modules/users/modules/neovim/default.nix @@ -1,11 +1,17 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.neovim; theme = config.theming; colors = theme.colors; -in { +in +{ options.modules.neovim = { enable = mkEnableOption "neovim"; }; @@ -17,8 +23,7 @@ in { viAlias = true; vimAlias = true; - extraPackages = with pkgs; [ - ]; + extraPackages = with pkgs; [ ]; opts = { number = true; @@ -179,4 +184,4 @@ in { }; programs.neovim.defaultEditor = true; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/obsidian/default.nix b/modules/users/modules/obsidian/default.nix index 76ab95a..014cf1c 100644 --- a/modules/users/modules/obsidian/default.nix +++ b/modules/users/modules/obsidian/default.nix @@ -1,16 +1,18 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.obsidian; -in { +in +{ options.modules.obsidian = { enable = mkEnableOption "obsidian"; }; - config = mkIf cfg.enable { - home.packages = with pkgs; [ - obsidian - ]; - }; -} \ No newline at end of file + config = mkIf cfg.enable { home.packages = with pkgs; [ obsidian ]; }; +} diff --git a/modules/users/modules/qutebrowser/default.nix b/modules/users/modules/qutebrowser/default.nix index 7b93314..850de0c 100644 --- a/modules/users/modules/qutebrowser/default.nix +++ b/modules/users/modules/qutebrowser/default.nix @@ -1,10 +1,16 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.qutebrowser; theme = config.theming; -in { +in +{ options.modules.qutebrowser.enable = mkEnableOption "qutebrowser"; config = mkIf cfg.enable { @@ -19,4 +25,4 @@ in { ''; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/rofi/default.nix b/modules/users/modules/rofi/default.nix index f12fcae..179bd73 100644 --- a/modules/users/modules/rofi/default.nix +++ b/modules/users/modules/rofi/default.nix @@ -1,11 +1,17 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.rofi; theme = config.theming; colors = theme.colors; -in { +in +{ options.modules.rofi.enable = mkEnableOption "rofi"; config = mkIf cfg.enable { @@ -13,41 +19,43 @@ in { enable = true; package = pkgs.rofi-wayland; font = "${theme.fonts.monospace.name} ${toString theme.fonts.monospace.recommendedSize}"; - theme = let - inherit (config.lib.formats.rasi) mkLiteral; - in { - "*" = { - background-color = mkLiteral "rgba(0, 0, 0, 0%)"; - border-color = mkLiteral "#${colors.fg}"; - text-color = mkLiteral "#${colors.fg}"; + theme = + let + inherit (config.lib.formats.rasi) mkLiteral; + in + { + "*" = { + background-color = mkLiteral "rgba(0, 0, 0, 0%)"; + border-color = mkLiteral "#${colors.fg}"; + text-color = mkLiteral "#${colors.fg}"; + }; + mainbox = { + background-color = mkLiteral "#${colors.bg}"; + border = mkLiteral "${toString theme.layout.borderSize}px"; + }; + element-text = { + highlight = mkLiteral "#${colors.accent}"; + }; + inputbar = { + children = mkLiteral "[textbox-search, entry]"; + }; + listview = { + padding = mkLiteral "2px 0px"; + }; + textbox-search = { + expand = false; + content = "> "; + }; + "inputbar, message" = { + padding = mkLiteral "2px"; + }; + element = { + padding = mkLiteral "0px 2px"; + }; + "element selected" = { + background-color = mkLiteral "#${colors.unfocused}"; + }; }; - mainbox = { - background-color = mkLiteral "#${colors.bg}"; - border = mkLiteral "${toString theme.layout.borderSize}px"; - }; - element-text = { - highlight = mkLiteral "#${colors.accent}"; - }; - inputbar = { - children = mkLiteral "[textbox-search, entry]"; - }; - listview = { - padding = mkLiteral "2px 0px"; - }; - textbox-search = { - expand = false; - content = "> "; - }; - "inputbar, message" = { - padding = mkLiteral "2px"; - }; - element = { - padding = mkLiteral "0px 2px"; - }; - "element selected" = { - background-color = mkLiteral "#${colors.unfocused}"; - }; - }; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/rofi/rofi-rbw.nix b/modules/users/modules/rofi/rofi-rbw.nix index f7be6a2..1859ed6 100644 --- a/modules/users/modules/rofi/rofi-rbw.nix +++ b/modules/users/modules/rofi/rofi-rbw.nix @@ -1,17 +1,21 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.rofi-rbw; -in { +in +{ options.modules.rofi-rbw.enable = mkEnableOption "rofi-rbw"; config = mkIf cfg.enable { modules.rofi.enable = true; - home.packages = [ - pkgs.rofi-rbw - ]; + home.packages = [ pkgs.rofi-rbw ]; # TODO: Move to separate module and make configurable programs.rbw = { @@ -24,4 +28,4 @@ in { }; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/shell/bash.nix b/modules/users/modules/shell/bash.nix index 75e63e6..d71f5f9 100644 --- a/modules/users/modules/shell/bash.nix +++ b/modules/users/modules/shell/bash.nix @@ -1,12 +1,18 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; -let +let cfg = config.modules.bash; -in { +in +{ options.modules.bash = { enable = mkEnableOption "bash"; }; config.programs.bash.enable = cfg.enable; -} \ No newline at end of file +} diff --git a/modules/users/modules/shell/fish.nix b/modules/users/modules/shell/fish.nix index 4118cfd..343fdf7 100644 --- a/modules/users/modules/shell/fish.nix +++ b/modules/users/modules/shell/fish.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; -let +let cfg = config.modules.fish; -in { +in +{ options.modules.fish = { enable = mkEnableOption "fish"; @@ -31,9 +37,18 @@ in { enable = true; plugins = [ - (mkIf cfg.plugins.done { name = "done"; src = pkgs.fishPlugins.done.src; }) - (mkIf cfg.plugins.fzf { name = "fzf"; src = pkgs.fishPlugins.fzf-fish.src; }) - (mkIf cfg.plugins.grc { name = "grc"; src = pkgs.fishPlugins.grc.src; }) + (mkIf cfg.plugins.done { + name = "done"; + src = pkgs.fishPlugins.done.src; + }) + (mkIf cfg.plugins.fzf { + name = "fzf"; + src = pkgs.fishPlugins.fzf-fish.src; + }) + (mkIf cfg.plugins.grc { + name = "grc"; + src = pkgs.fishPlugins.grc.src; + }) ]; }; @@ -43,4 +58,4 @@ in { (mkIf cfg.plugins.grc grc) ]; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/steam/default.nix b/modules/users/modules/steam/default.nix index bdbc46d..01f3021 100644 --- a/modules/users/modules/steam/default.nix +++ b/modules/users/modules/steam/default.nix @@ -1,7 +1,13 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -with lib; { +with lib; +{ options.modules.steam = { enable = mkEnableOption "steam"; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/systemwide/default.nix b/modules/users/modules/systemwide/default.nix index 371e114..62bb6a0 100644 --- a/modules/users/modules/systemwide/default.nix +++ b/modules/users/modules/systemwide/default.nix @@ -7,4 +7,4 @@ ./steam.nix ./waylock.nix ]; -} \ No newline at end of file +} diff --git a/modules/users/modules/systemwide/river.nix b/modules/users/modules/systemwide/river.nix index 3645fff..50726b4 100644 --- a/modules/users/modules/systemwide/river.nix +++ b/modules/users/modules/systemwide/river.nix @@ -1,10 +1,14 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let enabled = any (user: user.modules.river.enable) (attrValues config.home-manager.users); -in { - config = mkIf enabled { - programs.river.enable = true; - }; -} \ No newline at end of file +in +{ + config = mkIf enabled { programs.river.enable = true; }; +} diff --git a/modules/users/modules/systemwide/steam.nix b/modules/users/modules/systemwide/steam.nix index 5358543..e101129 100644 --- a/modules/users/modules/systemwide/steam.nix +++ b/modules/users/modules/systemwide/steam.nix @@ -1,10 +1,14 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let enabled = any (user: user.modules.steam.enable) (attrValues config.home-manager.users); -in { - config = mkIf enabled { - programs.steam.enable = true; - }; -} \ No newline at end of file +in +{ + config = mkIf enabled { programs.steam.enable = true; }; +} diff --git a/modules/users/modules/systemwide/waylock.nix b/modules/users/modules/systemwide/waylock.nix index c683175..41d4c3c 100644 --- a/modules/users/modules/systemwide/waylock.nix +++ b/modules/users/modules/systemwide/waylock.nix @@ -1,10 +1,14 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let enabled = any (user: user.modules.waylock.enable) (attrValues config.home-manager.users); -in { - config = mkIf enabled { - security.pam.services.waylock = {}; - }; -} \ No newline at end of file +in +{ + config = mkIf enabled { security.pam.services.waylock = { }; }; +} diff --git a/modules/users/modules/theming/default.nix b/modules/users/modules/theming/default.nix index a14cf4c..e496370 100644 --- a/modules/users/modules/theming/default.nix +++ b/modules/users/modules/theming/default.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, config, ... }: +{ + pkgs, + lib, + config, + ... +}: with lib; let @@ -30,7 +35,7 @@ let }; fallbackFonts = mkOption { type = types.listOf types.str; - default = []; + default = [ ]; description = "Fallback fonts for specified font."; }; }; @@ -63,25 +68,35 @@ let ] ++ map (font: font.name) cfg.fonts.extraFonts; # Flatten dependencies of fonts - fontPackages = converge (fonts: - listToAttrs (map (font: { - name = font; - value = true; - }) ( - flatten (map (font: - [ font.name ] - ++ cfg.fonts.pkgs.${font.name}.fallbackFonts - ) (attrsToList fonts)) - )) - ) (listToAttrs (map (font: { - name = font; - value = true; - }) enabledFonts)); + fontPackages = + converge + ( + fonts: + listToAttrs ( + map + (font: { + name = font; + value = true; + }) + ( + flatten (map (font: [ font.name ] ++ cfg.fonts.pkgs.${font.name}.fallbackFonts) (attrsToList fonts)) + ) + ) + ) + ( + listToAttrs ( + map (font: { + name = font; + value = true; + }) enabledFonts + ) + ); # Convert set of fonts to list of packages fontNameList = map (font: font.name) (attrsToList fontPackages); fontPackageList = map (font: cfg.fonts.pkgs.${font}.package) fontNameList; -in { +in +{ imports = [ # Import all themes ./themes/gruvbox.nix @@ -90,123 +105,129 @@ in { options.modules.theming.enable = mkEnableOption "theming"; - options.theming = let colors = config.theming.schemeColors; in { - darkMode = mkOption { - type = types.bool; - default = false; - example = true; - description = "Whether the app should use dark mode."; - }; + options.theming = + let + colors = config.theming.schemeColors; + in + { + darkMode = mkOption { + type = types.bool; + default = false; + example = true; + description = "Whether the app should use dark mode."; + }; - colorScheme = mkOption { - type = types.nullOr types.str; - default = null; - description = "Base 16 color scheme to use for styling. See stylix documentation for more information."; - }; + colorScheme = mkOption { + type = types.nullOr types.str; + default = null; + description = "Base 16 color scheme to use for styling. See stylix documentation for more information."; + }; - clientSideDecorations = mkOption { - type = types.bool; - default = false; - description = "Whether to enable client side decorations for windows."; - }; + clientSideDecorations = mkOption { + type = types.bool; + default = false; + description = "Whether to enable client side decorations for windows."; + }; - schemeColors = mkOption { - type = types.attrsOf types.anything; - default = config.lib.stylix.colors; - description = "Generated colors from scheme"; - }; + schemeColors = mkOption { + type = types.attrsOf types.anything; + default = config.lib.stylix.colors; + description = "Generated colors from scheme"; + }; - colors = { - bg = mkOption { - type = types.str; - default = colors.base00; + colors = { + bg = mkOption { + type = types.str; + default = colors.base00; + }; + fg = mkOption { + type = types.str; + default = colors.base05; + }; + accent = mkOption { + type = types.str; + default = colors.base09; + }; + 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 + }; }; - fg = mkOption { - type = types.str; - default = colors.base05; + + layout = { + borderRadius = mkOption { + type = types.int; + default = 0; + description = "Border radius of windows."; + }; + + borderSize = mkOption { + type = types.int; + default = 1; + description = "Size of borders used throughout UI."; + }; + + windowPadding = mkOption { + type = types.int; + default = 2; + description = "Margin of each window, actual space between windows will be twice this number."; + }; }; - accent = mkOption { - type = types.str; - default = colors.base09; - }; - 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 + + fonts = { + pkgs = mkOption { + type = types.attrsOf fontModule; + default = builtins.listToAttrs ( + map (module: { + name = module.name; + value = module; + }) (map (module: (import module) { inherit lib config pkgs; }) fontModules) + ); + description = "All available font modules."; + }; + + installed = mkOption { + type = types.listOf types.str; + default = fontNameList; + description = "List of installed fonts."; + }; + + serif = mkOption { + type = fontModule; + description = "Default serif font"; + }; + + sansSerif = mkOption { + type = fontModule; + description = "Default sansSerif font."; + }; + + monospace = mkOption { + type = fontModule; + description = "Default monospace font."; + }; + + emoji = mkOption { + type = fontModule; + description = "Default emoji font."; + }; + + extraFonts = mkOption { + type = types.listOf fontModule; + default = [ ]; + description = "Additional fonts to install."; + }; }; }; - layout = { - borderRadius = mkOption { - type = types.int; - default = 0; - description = "Border radius of windows."; - }; - - borderSize = mkOption { - type = types.int; - default = 1; - description = "Size of borders used throughout UI."; - }; - - windowPadding = mkOption { - type = types.int; - default = 2; - description = "Margin of each window, actual space between windows will be twice this number."; - }; - }; - - fonts = { - pkgs = mkOption { - type = types.attrsOf fontModule; - default = builtins.listToAttrs (map (module: { - name = module.name; - value = module; - }) (map (module: (import module) { inherit lib config pkgs; }) fontModules)); - description = "All available font modules."; - }; - - installed = mkOption { - type = types.listOf types.str; - default = fontNameList; - description = "List of installed fonts."; - }; - - serif = mkOption { - type = fontModule; - description = "Default serif font"; - }; - - sansSerif = mkOption { - type = fontModule; - description = "Default sansSerif font."; - }; - - monospace = mkOption { - type = fontModule; - description = "Default monospace font."; - }; - - emoji = mkOption { - type = fontModule; - description = "Default emoji font."; - }; - - extraFonts = mkOption { - type = types.listOf fontModule; - default = []; - description = "Additional fonts to install."; - }; - }; - }; - config = mkIf config.modules.theming.enable { # Enable fontconfig modules.fontconfig.enable = true; @@ -229,30 +250,32 @@ in { }; # Configure gtk theme - gtk = let - disableCSD = '' - headerbar.default-decoration { - margin-bottom: 50px; - margin-top: -100px; - } + gtk = + let + disableCSD = '' + headerbar.default-decoration { + margin-bottom: 50px; + margin-top: -100px; + } - window.csd, - window.csd decoration { - box-shadow: none; - } - ''; - in { - enable = true; + window.csd, + window.csd decoration { + box-shadow: none; + } + ''; + in + { + enable = true; - theme = { - name = if cfg.darkMode then "Adwaita-dark" else "Adwaita-light"; - package = pkgs.gnome-themes-extra; + theme = { + name = if cfg.darkMode then "Adwaita-dark" else "Adwaita-light"; + package = pkgs.gnome-themes-extra; + }; + + gtk3.extraCss = mkIf (!cfg.clientSideDecorations) disableCSD; + gtk4.extraCss = mkIf (!cfg.clientSideDecorations) disableCSD; }; - gtk3.extraCss = mkIf (! cfg.clientSideDecorations) disableCSD; - gtk4.extraCss = mkIf (! cfg.clientSideDecorations) disableCSD; - }; - # TODO: This should just straight up not be here programs.direnv = { enable = true; @@ -289,10 +312,22 @@ in { polarity = if cfg.darkMode then "dark" else "light"; fonts = { - serif = getAttrs [ "name" "package" ] cfg.fonts.serif; - sansSerif = getAttrs [ "name" "package" ] cfg.fonts.sansSerif; - monospace = getAttrs [ "name" "package" ] cfg.fonts.monospace; - emoji = getAttrs [ "name" "package" ] cfg.fonts.emoji; + serif = getAttrs [ + "name" + "package" + ] cfg.fonts.serif; + 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; diff --git a/modules/users/modules/theming/fonts/cozette-vector.nix b/modules/users/modules/theming/fonts/cozette-vector.nix index 3ec9984..c29c378 100644 --- a/modules/users/modules/theming/fonts/cozette-vector.nix +++ b/modules/users/modules/theming/fonts/cozette-vector.nix @@ -4,6 +4,5 @@ name = "Cozette Vector"; package = pkgs.cozette; recommendedSize = 9; - fallbackFonts = [ - ]; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/cozette.nix b/modules/users/modules/theming/fonts/cozette.nix index d2f9161..73cff7f 100644 --- a/modules/users/modules/theming/fonts/cozette.nix +++ b/modules/users/modules/theming/fonts/cozette.nix @@ -4,7 +4,5 @@ name = "Cozette"; package = pkgs.cozette; recommendedSize = 9; - fallbackFonts = [ - "Cozette Vector" - ]; -} \ No newline at end of file + fallbackFonts = [ "Cozette Vector" ]; +} diff --git a/modules/users/modules/theming/fonts/dejavu-sans.nix b/modules/users/modules/theming/fonts/dejavu-sans.nix index 9bb65b1..8b1d5f4 100644 --- a/modules/users/modules/theming/fonts/dejavu-sans.nix +++ b/modules/users/modules/theming/fonts/dejavu-sans.nix @@ -4,5 +4,5 @@ name = "DejaVu Sans"; package = pkgs.dejavu_fonts; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/dejavu-serif.nix b/modules/users/modules/theming/fonts/dejavu-serif.nix index d4e0b2d..66e723e 100644 --- a/modules/users/modules/theming/fonts/dejavu-serif.nix +++ b/modules/users/modules/theming/fonts/dejavu-serif.nix @@ -4,5 +4,5 @@ name = "DejaVu Serif"; package = pkgs.dejavu_fonts; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/dina.nix b/modules/users/modules/theming/fonts/dina.nix index 3b49870..35d356d 100644 --- a/modules/users/modules/theming/fonts/dina.nix +++ b/modules/users/modules/theming/fonts/dina.nix @@ -9,4 +9,4 @@ "wenquanyi bitmap song" "Symbols Nerd Font Mono" ]; -} \ No newline at end of file +} diff --git a/modules/users/modules/theming/fonts/fira-code.nix b/modules/users/modules/theming/fonts/fira-code.nix index dca90be..63deb5c 100644 --- a/modules/users/modules/theming/fonts/fira-code.nix +++ b/modules/users/modules/theming/fonts/fira-code.nix @@ -4,7 +4,5 @@ name = "Fira Code"; package = pkgs.fira-code; recommendedSize = 12; - fallbackFonts = [ - "Symbols Nerd Font Mono" - ]; -} \ No newline at end of file + fallbackFonts = [ "Symbols Nerd Font Mono" ]; +} diff --git a/modules/users/modules/theming/fonts/nerd-fonts-symbols.nix b/modules/users/modules/theming/fonts/nerd-fonts-symbols.nix index c6f25af..f53c58b 100644 --- a/modules/users/modules/theming/fonts/nerd-fonts-symbols.nix +++ b/modules/users/modules/theming/fonts/nerd-fonts-symbols.nix @@ -4,5 +4,5 @@ name = "Symbols Nerd Font Mono"; package = pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/noto-color-emoji.nix b/modules/users/modules/theming/fonts/noto-color-emoji.nix index 1b21b52..7aab05c 100644 --- a/modules/users/modules/theming/fonts/noto-color-emoji.nix +++ b/modules/users/modules/theming/fonts/noto-color-emoji.nix @@ -4,5 +4,5 @@ name = "Noto Color Emoji"; package = pkgs.noto-fonts-color-emoji; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/wqy-bitmapsong.nix b/modules/users/modules/theming/fonts/wqy-bitmapsong.nix index 6537b07..61fde6d 100644 --- a/modules/users/modules/theming/fonts/wqy-bitmapsong.nix +++ b/modules/users/modules/theming/fonts/wqy-bitmapsong.nix @@ -4,5 +4,5 @@ name = "wenquanyi bitmap song"; package = pkgs.wqy-bitmapsong; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/wqy-microhei-mono.nix b/modules/users/modules/theming/fonts/wqy-microhei-mono.nix index 3d49fca..bbbfb81 100644 --- a/modules/users/modules/theming/fonts/wqy-microhei-mono.nix +++ b/modules/users/modules/theming/fonts/wqy-microhei-mono.nix @@ -4,5 +4,5 @@ name = "WenQuanYi Micro Hei Mono"; package = pkgs.wqy-microhei; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/wqy-microhei.nix b/modules/users/modules/theming/fonts/wqy-microhei.nix index 1eff1e6..acc61a4 100644 --- a/modules/users/modules/theming/fonts/wqy-microhei.nix +++ b/modules/users/modules/theming/fonts/wqy-microhei.nix @@ -4,5 +4,5 @@ name = "WenQuanYi Micro Hei"; package = pkgs.wqy-microhei; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/wqy-zenhei-mono.nix b/modules/users/modules/theming/fonts/wqy-zenhei-mono.nix index b945f7f..2d575c6 100644 --- a/modules/users/modules/theming/fonts/wqy-zenhei-mono.nix +++ b/modules/users/modules/theming/fonts/wqy-zenhei-mono.nix @@ -4,5 +4,5 @@ name = "WenQuanYi Zen Hei Mono"; package = pkgs.wqy-zenhei; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/wqy-zenhei-sharp.nix b/modules/users/modules/theming/fonts/wqy-zenhei-sharp.nix index f632c51..9c8dbd6 100644 --- a/modules/users/modules/theming/fonts/wqy-zenhei-sharp.nix +++ b/modules/users/modules/theming/fonts/wqy-zenhei-sharp.nix @@ -4,5 +4,5 @@ name = "WenQuanYi Zen Hei Sharp"; package = pkgs.wqy-zenhei; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/fonts/wqy-zenhei.nix b/modules/users/modules/theming/fonts/wqy-zenhei.nix index 05d8776..3f7e39e 100644 --- a/modules/users/modules/theming/fonts/wqy-zenhei.nix +++ b/modules/users/modules/theming/fonts/wqy-zenhei.nix @@ -4,5 +4,5 @@ name = "WenQuanYi Zen Hei"; package = pkgs.wqy-zenhei; recommendedSize = 12; - fallbackFonts = []; -} \ No newline at end of file + fallbackFonts = [ ]; +} diff --git a/modules/users/modules/theming/themes/catppuccin.nix b/modules/users/modules/theming/themes/catppuccin.nix index 5c4d16f..c62b653 100644 --- a/modules/users/modules/theming/themes/catppuccin.nix +++ b/modules/users/modules/theming/themes/catppuccin.nix @@ -1,14 +1,25 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.theming.themes.catppuccin; -in { +in +{ options = { theming.themes.catppuccin = { enable = mkEnableOption "catppuccin"; flavor = mkOption { - type = types.enum [ "latte" "frappe" "macchiato" "mocha" ]; + type = types.enum [ + "latte" + "frappe" + "macchiato" + "mocha" + ]; default = "mocha"; description = "The flavor of catppuccin theme."; }; diff --git a/modules/users/modules/theming/themes/gruvbox.nix b/modules/users/modules/theming/themes/gruvbox.nix index 9bf57f2..499a23a 100644 --- a/modules/users/modules/theming/themes/gruvbox.nix +++ b/modules/users/modules/theming/themes/gruvbox.nix @@ -1,16 +1,26 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.theming.themes.gruvbox; mode = if cfg.darkMode then "dark" else "light"; -in { +in +{ options = { theming.themes.gruvbox = { enable = mkEnableOption "gruvbox-hard"; darkMode = mkEnableOption "dark mode"; contrast = mkOption { - type = types.enum [ "hard" "medium" "soft" ]; + type = types.enum [ + "hard" + "medium" + "soft" + ]; default = "hard"; description = "The contrast level of the theme."; }; diff --git a/modules/users/modules/vscode/default.nix b/modules/users/modules/vscode/default.nix index 654adb5..717cfd3 100644 --- a/modules/users/modules/vscode/default.nix +++ b/modules/users/modules/vscode/default.nix @@ -1,10 +1,16 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.vscode; theme = config.theming; -in { +in +{ options.modules.vscode = { enable = mkEnableOption "vscode"; codeFont = mkOption { @@ -19,28 +25,24 @@ in { config = mkIf cfg.enable { modules.unfree.allowedPackages = [ "vscode" ]; - - theming.fonts.extraFonts = [ - cfg.codeFont - ]; + + theming.fonts.extraFonts = [ cfg.codeFont ]; programs.vscode = { enable = true; mutableExtensionsDir = false; - extensions = with pkgs.vscode-extensions; [ - eamodio.gitlens - ]; + extensions = with pkgs.vscode-extensions; [ eamodio.gitlens ]; userSettings = { # Font setup # TODO: Move the conversion factor to theme settings "editor.fontFamily" = mkForce "'${cfg.codeFont.name}', '${cfg.fallbackFont.name}'"; - "editor.fontSize" = mkForce (cfg.codeFont.recommendedSize); # Convert pt to px + "editor.fontSize" = mkForce (cfg.codeFont.recommendedSize); # Convert pt to px "editor.fontLigatures" = true; "terminal.integrated.fontFamily" = mkForce "'${cfg.codeFont.name}', '${cfg.fallbackFont.name}'"; "terminal.integrated.fontSize" = mkForce (cfg.codeFont.recommendedSize); # Convert pt to px - + # Formatting "editor.formatOnSave" = true; "editor.tabSize" = 4; @@ -50,4 +52,4 @@ in { }; }; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/winbox/default.nix b/modules/users/modules/winbox/default.nix index 9499ba8..bef4cfd 100644 --- a/modules/users/modules/winbox/default.nix +++ b/modules/users/modules/winbox/default.nix @@ -1,9 +1,15 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.modules.winbox; -in { +in +{ options.modules.winbox = { enable = mkEnableOption "winbox"; }; @@ -11,8 +17,6 @@ in { config = mkIf cfg.enable { modules.unfree.allowedPackages = [ "winbox" ]; - home.packages = with pkgs; [ - winbox - ]; + home.packages = with pkgs; [ winbox ]; }; -} \ No newline at end of file +} diff --git a/modules/users/modules/zathura/default.nix b/modules/users/modules/zathura/default.nix index b1f7e0c..fc222ff 100644 --- a/modules/users/modules/zathura/default.nix +++ b/modules/users/modules/zathura/default.nix @@ -1,8 +1,14 @@ -{config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.zathura; -in { +in +{ options.modules.zathura.enable = lib.mkEnableOption "zathura"; config = lib.mkIf cfg.enable { @@ -14,4 +20,4 @@ in { }; }; }; -} \ No newline at end of file +} diff --git a/modules/vpn/tailscale.nix b/modules/vpn/tailscale.nix index 2371be2..1dff284 100644 --- a/modules/vpn/tailscale.nix +++ b/modules/vpn/tailscale.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.tailscale; -in { +in +{ options.modules.tailscale = { enable = mkEnableOption "tailscale"; }; @@ -14,4 +20,4 @@ in { useRoutingFeatures = "client"; }; }; -} \ No newline at end of file +} diff --git a/modules/wifi/wpa_supplicant.nix b/modules/wifi/wpa_supplicant.nix index a1a0b92..c7d90cd 100644 --- a/modules/wifi/wpa_supplicant.nix +++ b/modules/wifi/wpa_supplicant.nix @@ -1,9 +1,15 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; let cfg = config.modules.wpa_supplicant; -in { +in +{ options.modules.wpa_supplicant = { enable = mkEnableOption "wpa_supplicant"; }; @@ -15,4 +21,4 @@ in { allowAuxiliaryImperativeNetworks = true; }; }; -} \ No newline at end of file +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 7581942..e66b7f9 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,4 +1,9 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: with lib; # let @@ -17,8 +22,8 @@ with lib; # } { nixpkgs.config.packageOverrides = pkgs: rec { - wqy-zenhei = pkgs.callPackage ./fonts/wqy-zenhei.nix {}; - wqy-microhei = pkgs.callPackage ./fonts/wqy-microhei.nix {}; - wqy-bitmapsong = pkgs.callPackage ./fonts/wqy-bitmapsong.nix {}; + wqy-zenhei = pkgs.callPackage ./fonts/wqy-zenhei.nix { }; + wqy-microhei = pkgs.callPackage ./fonts/wqy-microhei.nix { }; + wqy-bitmapsong = pkgs.callPackage ./fonts/wqy-bitmapsong.nix { }; }; -} \ No newline at end of file +} diff --git a/pkgs/fonts/wqy-bitmapsong.nix b/pkgs/fonts/wqy-bitmapsong.nix index 23c7630..d266866 100644 --- a/pkgs/fonts/wqy-bitmapsong.nix +++ b/pkgs/fonts/wqy-bitmapsong.nix @@ -1,4 +1,9 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: pkgs.stdenv.mkDerivation rec { pname = "wqy-bitmapsong-pcf"; @@ -30,4 +35,4 @@ pkgs.stdenv.mkDerivation rec { installPhase = '' install -Dm644 *.otb -t $out/share/fonts/ ''; -} \ No newline at end of file +} diff --git a/pkgs/fonts/wqy-microhei.nix b/pkgs/fonts/wqy-microhei.nix index 768d8b0..1418bfa 100644 --- a/pkgs/fonts/wqy-microhei.nix +++ b/pkgs/fonts/wqy-microhei.nix @@ -1,4 +1,9 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: pkgs.stdenv.mkDerivation rec { pname = "wqy-microhei"; @@ -6,7 +11,7 @@ pkgs.stdenv.mkDerivation rec { src = pkgs.fetchurl { url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz"; - hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4="; + hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4="; }; installPhase = '' @@ -16,4 +21,4 @@ pkgs.stdenv.mkDerivation rec { runHook postInstall ''; -} \ No newline at end of file +} diff --git a/pkgs/fonts/wqy-zenhei.nix b/pkgs/fonts/wqy-zenhei.nix index 2bdb05a..0759ad2 100644 --- a/pkgs/fonts/wqy-zenhei.nix +++ b/pkgs/fonts/wqy-zenhei.nix @@ -1,4 +1,9 @@ -{ lib, config, pkgs, ... }: +{ + lib, + config, + pkgs, + ... +}: pkgs.stdenv.mkDerivation rec { pname = "wqy-zenhei"; @@ -16,4 +21,4 @@ pkgs.stdenv.mkDerivation rec { runHook postInstall ''; -} \ No newline at end of file +} diff --git a/users/jan.nix b/users/jan.nix index ed9afda..6743c5e 100644 --- a/users/jan.nix +++ b/users/jan.nix @@ -39,19 +39,23 @@ }; # Theme configuration - theming = let fontpkgs = config.theming.fonts.pkgs; in { - # Fonts - fonts.serif = fontpkgs."DejaVu Serif"; - fonts.sansSerif = fontpkgs."DejaVu Sans"; - fonts.monospace = fontpkgs."Dina"; - fonts.emoji = fontpkgs."Dina"; - fonts.extraFonts = []; - - # Color scheme - themes.catppuccin = { - enable = true; - flavor = "frappe"; + theming = + let + fontpkgs = config.theming.fonts.pkgs; + in + { + # Fonts + fonts.serif = fontpkgs."DejaVu Serif"; + fonts.sansSerif = fontpkgs."DejaVu Sans"; + fonts.monospace = fontpkgs."Dina"; + fonts.emoji = fontpkgs."Dina"; + fonts.extraFonts = [ ]; + + # Color scheme + themes.catppuccin = { + enable = true; + flavor = "frappe"; + }; }; - }; }; }