From 6c857ee393d243d71e93a859548b645002ce4267 Mon Sep 17 00:00:00 2001 From: dim Date: Thu, 7 Aug 2025 09:09:38 +0700 Subject: [PATCH] update config --- home/programs/git/default.nix | 5 ++- home/programs/nvim/default.nix | 2 +- home/programs/office/default.nix | 1 + home/system/hyprland/bindings.nix | 1 + home/system/hyprland/windowrule.nix | 2 +- home/system/waybar/default.nix | 62 +++++++++++------------------ hosts/laptop/home.nix | 11 ++--- nixos/tuigreet.nix | 9 ++++- nixos/users.nix | 7 +++- 9 files changed, 51 insertions(+), 49 deletions(-) diff --git a/home/programs/git/default.nix b/home/programs/git/default.nix index 2e7ffcd..8e046b6 100644 --- a/home/programs/git/default.nix +++ b/home/programs/git/default.nix @@ -1,12 +1,14 @@ -{ config, ... }: +{ config, pkgs, ... }: let username = config.var.git.username; email = config.var.git.email; in { + home.packages = with pkgs; [ tea ]; programs.git = { enable = true; userName = username; userEmail = email; + signing.key = "D8EDD65BCB54AC8719BE4EBD8D5D880EB08F1544"; ignores = [ ".cache/" ".DS_Store" @@ -23,6 +25,7 @@ in { init.defaultBranch = "main"; push.autoSetupRemote = true; color.ui = "1"; + commit.gpgSign = true; }; aliases = { essa = "push --force"; diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index e22cbb2..5c616cf 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -1,7 +1,7 @@ # Nixvim is a NixOS module that installs and configures Neovim { inputs, ... }: { imports = [ - inputs.nixvim.homeManagerModules.nixvim + inputs.nixvim.homeModules.nixvim ./plugins/cmp.nix ./plugins/dashboard.nix ./plugins/lsp.nix diff --git a/home/programs/office/default.nix b/home/programs/office/default.nix index 6c9dadf..5365403 100644 --- a/home/programs/office/default.nix +++ b/home/programs/office/default.nix @@ -8,5 +8,6 @@ marp-cli qpdf temurin-jre-bin + librsvg ]; } diff --git a/home/system/hyprland/bindings.nix b/home/system/hyprland/bindings.nix index d798257..0de970c 100644 --- a/home/system/hyprland/bindings.nix +++ b/home/system/hyprland/bindings.nix @@ -4,6 +4,7 @@ "$mod,RETURN, exec, ${pkgs.kitty}/bin/kitty" # Terminal "$mod,E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Thunar "$mod,U, exec, ${pkgs.firefox}/bin/firefox" # Firefox + "$mod,M, exec, ${pkgs.emacs-pgtk}/bin/emacs" # Emacs "$shiftMod,Q, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock "$mod,X, exec, powermenu" # Powermenu "$mod,SPACE, exec, menu" # Launcher diff --git a/home/system/hyprland/windowrule.nix b/home/system/hyprland/windowrule.nix index 1674e6e..e41599f 100644 --- a/home/system/hyprland/windowrule.nix +++ b/home/system/hyprland/windowrule.nix @@ -41,7 +41,7 @@ "float, class:^(thunderbird)$,title:^(Edit Event:)$" "float, class:^(thunderbird)$,title:^(An error has occurred)$" "float, class:^(thunar)$,title:^(File Operation Progress)$" - "float, class:^(firefox)$,title:^(.*Bitwarden Password Manager.*)$" + "float, class:firefox,title:(.*Bitwarden Password Manager.*)" "float, class:^(org.kde.polkit-kde-authentication-agent-1)$" "size 60% 55%, class:^(nwg-look)$" "center, class:^(nwg-look)$" diff --git a/home/system/waybar/default.nix b/home/system/waybar/default.nix index c6575ff..45ffea8 100644 --- a/home/system/waybar/default.nix +++ b/home/system/waybar/default.nix @@ -33,9 +33,11 @@ in { "tray" ]; clock = { - "format" = "{:%d %B %H:%M}  "; + "format" = "{:%d %b %H:%M}  "; "format-alt" = "{:%A, %d %B %Y (%R)} "; - "tooltip-format" = "{calendar}"; + "tooltip-format" = '' + {:%Y %B} + {calendar}''; "calendar" = { "mode" = "year"; "mode-mon-col" = 3; @@ -111,20 +113,7 @@ in { }; separate-outputs = true; }; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - "2" = ""; - "3" = ""; - "9" = ""; - "active" = ""; - "default" = ""; - }; - # "persistent-workspaces" = { - # "eDP-1" = [ 1 2 3 4 5 ]; - # "DP-3" = [ 6 7 8 9 0 ]; - # }; - }; + "hyprland/workspaces" = { format = "{name}"; }; mpris = { "format" = "{player_icon} {dynamic}"; "format-paused" = "{status_icon} {dynamic}"; @@ -182,35 +171,30 @@ in { style = '' * { border: none; border-radius: 0; } + window#waybar { background-color: @base00; color: @base05; transition-property: background-color; transition-duration: 0.5s; } + window#waybar.hidden { opacity: 0.2; } label.module { padding: 0 ${toString gaps-out}px; } + #workspaces { + background-color: @base03; + border-radius: 1em; + margin: 0 1em; + } #workspaces button { - padding-top: ${toString border-size}px; - border-bottom: ${toString border-size}px solid transparent; - } - #workspaces button.focused, - #workspaces button.active { - border-bottom: ${toString border-size}px solid @base09; + padding: 0 .3em; + border-radius: 1em; + background-color: @base03; } + #workspaces button.urgent { background-color: @base09; } + #workspaces button.empty { background-color: @base03; } + #workspaces button.visible { background-color: @base04; color: @base01 } + #workspaces button.active { background-color: @base0A; } label#battery.1 { padding-right: 0; } label#battery.2 { padding-left: ${toString gaps-in}px; } #privacy, #tray { padding: 0 ${toString gaps-in}px; } - #pulseaudio-slider slider { - min-height: 0px; - min-width: 0px; - opacity: 0; - background-image: none; - border: none; - box-shadow: none; - } - #pulseaudio-slider trough { - min-height: 5px; - min-width: 80px; - border-radius: ${toString rounding}px; - } - #pulseaudio-slider highlight { - min-width: 10px; - border-radius: ${toString rounding}px; - } + #tray { background-color: @base03; border-radius: 1em 0 0 1em ; } + #tray > .passive { -gtk-icon-effect: dim; } + #tray > .needs-attention { -gtk-icon-effect: highlight; background-color: @base08; } + tooltip { border-radius: ${toString rounding}px; } ''; }; } diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 04ececd..7cbe714 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -80,7 +80,8 @@ sha256 = "sha256-caff7K4++eQJE/7kbKJb8DgI6aWJdiHBbdV1+46aFMs="; }; doCheck = false; - buildInputs = [ pip ]; + pyproject = true; + propagatedBuildInputs = [ pip setuptools pyyaml mypy ]; }) ])) jq @@ -115,13 +116,13 @@ inxi # Just cool - peaclock - cbonsai - cmatrix + # peaclock + # cbonsai + # cmatrix # cava # Backup - zed-editor + # zed-editor neovide inkscape-with-extensions # gimp-with-plugins diff --git a/nixos/tuigreet.nix b/nixos/tuigreet.nix index c077dad..1fe781b 100644 --- a/nixos/tuigreet.nix +++ b/nixos/tuigreet.nix @@ -29,6 +29,13 @@ }; # To prevent getting stuck at shutdown - systemd.extraConfig = "DefaultTimeoutStopSec=10s"; + # systemd.extraConfig = "DefaultTimeoutStopSec=10s"; + systemd.settings.Manager = { + # KExecWatchdogSec = "5min"; + # RebootWatchdogSec = "10min"; + # RuntimeWatchdogSec = "30s"; + # WatchdogDevice = "/dev/watchdog"; + DefaultTimeoutStopSec = "10s"; + }; } diff --git a/nixos/users.nix b/nixos/users.nix index 57369ca..5e32e69 100644 --- a/nixos/users.nix +++ b/nixos/users.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, inputs, ... }: let username = config.var.username; hashedPassword = config.var.hashedPassword; @@ -14,6 +14,11 @@ in { programs.xfconf.enable = true; services.tumbler.enable = true; + hardware.graphics = { + package = + inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.mesa; + }; + users = { defaultUserShell = pkgs.zsh; users.${username} = {