From cd7060f9233f67879fc24a8f417fa8179f52f683 Mon Sep 17 00:00:00 2001 From: lucy Date: Sat, 7 Mar 2026 10:29:24 +0100 Subject: [PATCH] simplify nixvim setup to not require direnv --- configuration.nix | 31 +++++++++++++++++++++++++++---- home/home.nix | 3 +-- home/hyprland.nix | 12 ++++++------ home/nixvim/coding.nix | 3 ++- home/nixvim/nixvim.nix | 1 + home/nixvim/plugins.nix | 10 +++++----- home/programs.nix | 2 ++ home/stylix.nix | 5 +++-- home/waybar.nix | 10 +++++----- stylix.nix | 3 +-- 10 files changed, 53 insertions(+), 27 deletions(-) diff --git a/configuration.nix b/configuration.nix index d201075..86c3717 100755 --- a/configuration.nix +++ b/configuration.nix @@ -19,12 +19,15 @@ noto-fonts-cjk-sans noto-fonts nerd-fonts._0xproto - gnome-tweaks + material-symbols ]; }; services.displayManager.gdm.enable = true; - services.desktopManager.gnome.enable = true; + services.desktopManager.gnome.enable = false; programs.hyprland.enable = true; + nixpkgs.config.permittedInsecurePackages = [ + "ventoy-1.1.10" + ]; boot = { @@ -76,7 +79,23 @@ boot.kernelPackages = pkgs.linuxPackages_latest; services.power-profiles-daemon.enable = false; services.upower.enable = true; - services.tlp.enable = true; + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "balanced"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "balanced"; + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 20; + START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge + STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging + PCIE_ASPM_ON_BAT = "powersupersave"; + PCIE_ASPM_ON_AC = "default"; + }; + }; services.auto-cpufreq.enable = true; networking.hostName = "wired"; # Define your hostname. @@ -113,7 +132,6 @@ console.keyMap = "us"; # Define a user account. Don't forget to set a password with ‘passwd’. - programs.direnv.enable = true; programs.zsh.enable = true; users.users.lucy = { isNormalUser = true; @@ -140,6 +158,11 @@ gnomeExtensions.blur-my-shell gnomeExtensions.appindicator gnomeExtensions.just-perfection + quickshell + flashrom + usbutils + clang-tools + clang ]; programs.steam = { diff --git a/home/home.nix b/home/home.nix index 79fd02a..c34ff96 100755 --- a/home/home.nix +++ b/home/home.nix @@ -74,7 +74,6 @@ home.stateVersion = "24.05"; # Please read the comment before changing. home.shell.enableShellIntegration = true; home.shellAliases = { - nrs = "sudo nixos-rebuild switch --flake /home/lucy/nixos-conf/"; + nrs = "doas nixos-rebuild switch --flake /home/lucy/nixos/"; }; - } diff --git a/home/hyprland.nix b/home/hyprland.nix index 0b26942..676c3ea 100755 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -12,7 +12,7 @@ }; decoration = { - rounding = 15; + rounding = 24; blur = { enabled = true; size = 3; @@ -29,18 +29,18 @@ bezier = [ "smoothIn, 0.25, 1, 0.5, 1" "smoothOut, 0.25, 1, 0.5, 1" - "overshot, 0.4, 0.8, 0.5, 1" + "overshot, 0.23, 0.5, 0.36, 1.1" "candy, 0.68, -0.6, 0.32, 1.5" ]; animation = [ - "fade, 1, 10, overshot" + "fade, 1, 6, overshot" "fadeIn, 1, 5, overshot" "fadeOut, 1, 5, overshot" "fadeDim, 1, 5, overshot" - "windows, 1, 1, smoothIn, popin" - "border, 1, 10, default" - "workspaces, 1, 6, overshot, slide" + "windows, 1, 3, overshot, popin 80%" + "border, 1, 6, default" + "workspaces, 1, 6, overshot, fade" "specialWorkspace, 1, 8, smoothOut, slidevert" ]; }; diff --git a/home/nixvim/coding.nix b/home/nixvim/coding.nix index 5efa8d5..5d640a0 100755 --- a/home/nixvim/coding.nix +++ b/home/nixvim/coding.nix @@ -13,7 +13,8 @@ servers = { bashls.enable = true; pyright.enable = true; - clangd.package = null; + clangd.package = pkgs.clang-tools; + qmlls.enable = true; clangd.enable = true; clangd.cmd = [ "clangd" diff --git a/home/nixvim/nixvim.nix b/home/nixvim/nixvim.nix index 2706a88..be4f6e3 100755 --- a/home/nixvim/nixvim.nix +++ b/home/nixvim/nixvim.nix @@ -17,6 +17,7 @@ nixpkgs-fmt stylua black + clang ]; globals.mapleader = " "; defaultEditor = true; diff --git a/home/nixvim/plugins.nix b/home/nixvim/plugins.nix index 1c23090..158e18c 100755 --- a/home/nixvim/plugins.nix +++ b/home/nixvim/plugins.nix @@ -1,3 +1,4 @@ +{ pkgs, ... }: let button = shortcut: text: action: { type = "button"; @@ -29,15 +30,13 @@ in treesitter = { enable = true; + highlight.enable = true; + indent.enable = true; settings = { - highlighting.enable = true; - auto_install = true; - ignore_install = [ "ipkg" ]; + install_dir.__raw = "vim.fs.joinpath(vim.fn.stdpath('data'), 'site')"; }; }; - nvim-tree.enable = true; - alpha = { enable = true; settings.layout = [ @@ -134,5 +133,6 @@ in bufferline.enable = true; web-devicons.enable = true; + nvim-tree.enable = true; }; } diff --git a/home/programs.nix b/home/programs.nix index dd37429..98f4653 100755 --- a/home/programs.nix +++ b/home/programs.nix @@ -23,6 +23,8 @@ element-desktop gnome-tweaks btop + ventoy + obsidian (discord.override { withOpenASAR = true; # can do this here too withVencord = true; diff --git a/home/stylix.nix b/home/stylix.nix index 09cc449..355e2fa 100755 --- a/home/stylix.nix +++ b/home/stylix.nix @@ -10,8 +10,9 @@ foot.enable = true; hyprland.hyprpaper.enable = false; gnome.image.enable = false; - gnome.enable = true; - spicetify.enable = true; + gnome.enable = false; + kde.enable = false; + spicetify.enable = false; fuzzel.enable = true; dunst.enable = true; vencord.enable = true; diff --git a/home/waybar.nix b/home/waybar.nix index 7760878..0c495c7 100755 --- a/home/waybar.nix +++ b/home/waybar.nix @@ -12,14 +12,14 @@ window#waybar { background-color: transparent; - border-radius: ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.rounding}; + border-radius: ${toString config.wayland.windowManager.hyprland.settings.decoration.rounding}; } #workspaces button { all: unset; padding: 1px 3px; color: alpha(@base05, 0.5); - border-radius: 1em; + border-radius: ${toString config.wayland.windowManager.hyprland.settings.decoration.rounding}; } @@ -31,7 +31,7 @@ margin: 0px; padding: 2px 6px; background-color: @base00; - border-radius: 1em; + border-radius: ${toString config.wayland.windowManager.hyprland.settings.decoration.rounding}; } #mpris, #backlight, @@ -44,7 +44,7 @@ padding: 2px 10px; background-color: @base00; color: @base05; - border-radius: ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.rounding}; + border-radius: ${toString config.wayland.windowManager.hyprland.settings.decoration.rounding}; } #tray { @@ -96,7 +96,7 @@ "tray" = { icon-size = 14; - spacing = 5; + spacing = 5; }; "hyprland/workspaces" = { diff --git a/stylix.nix b/stylix.nix index 9687f3b..5a52a22 100755 --- a/stylix.nix +++ b/stylix.nix @@ -19,13 +19,12 @@ stylix = { enable = true; autoEnable = true; - base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark.yaml"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml"; polarity = "dark"; image = ./home/wallpaper.png; targets = { qt.platform = lib.mkForce "qtct"; gnome.enable = true; - gtk.enable = true; gtksourceview.enable = false; }; fonts = {